diff --git a/CHANGELOG.md b/CHANGELOG.md index 6dcae99..35d2011 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,7 @@ - Upgrade to Flutter `3.24.0`, Dart `3.4.0` and dependencies e.g. `web: 1.0.0` (thx to @diegotori) - Allow custom icon for Backspace and Search button - Replace `showBackspaceButton` in `CategoryViewConfig` with `extraTab` to allow choosing between Backspace, Search or no extra button in category tab bar +- Fix scroll issue on Linux ## 2.2.0 diff --git a/lib/src/emoji_picker.dart b/lib/src/emoji_picker.dart index 8dd1df0..a50c597 100644 --- a/lib/src/emoji_picker.dart +++ b/lib/src/emoji_picker.dart @@ -1,5 +1,8 @@ +import 'dart:io'; + import 'package:emoji_picker_flutter/emoji_picker_flutter.dart'; import 'package:emoji_picker_flutter/src/emoji_picker_internal_utils.dart'; +import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; /// All the possible categories that [Emoji] can be put into @@ -394,20 +397,33 @@ class EmojiPickerState extends State { ); } - Widget _buildEmojiView() { - return SizedBox( - height: widget.config.height, - child: widget.customWidget == null - ? DefaultEmojiPickerView( - widget.config, - _state, - _showSearchView, - ) - : widget.customWidget!( - widget.config, - _state, - _showSearchView, + Widget _wrapScrollBehaviorForPlatforms(Widget child) { + return !kIsWeb && Platform.isLinux + ? ScrollConfiguration( + behavior: ScrollConfiguration.of(context).copyWith( + scrollbars: false, ), + child: child, + ) + : child; + } + + Widget _buildEmojiView() { + return _wrapScrollBehaviorForPlatforms( + SizedBox( + height: widget.config.height, + child: widget.customWidget == null + ? DefaultEmojiPickerView( + widget.config, + _state, + _showSearchView, + ) + : widget.customWidget!( + widget.config, + _state, + _showSearchView, + ), + ), ); }