Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion lib/src/config.dart
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@ class Config {
});

/// Max Height of the Emoji's view
final double height;
/// If explicitly set to null, the emoji view will not be constrained by
/// height
final double? height;

/// Verify that emoji glyph is supported by the platform (Android only)
final bool checkPlatformCompatibility;
Expand Down Expand Up @@ -79,6 +81,7 @@ class Config {
@override
bool operator ==(other) {
return (other is Config) &&
other.height == height &&
other.viewOrderConfig == viewOrderConfig &&
other.checkPlatformCompatibility == checkPlatformCompatibility &&
other.emojiSet == emojiSet &&
Expand All @@ -94,6 +97,7 @@ class Config {

@override
int get hashCode =>
(height?.hashCode ?? 0) ^
viewOrderConfig.hashCode ^
checkPlatformCompatibility.hashCode ^
emojiSet.hashCode ^
Expand Down
32 changes: 18 additions & 14 deletions lib/src/emoji_picker.dart
Original file line number Diff line number Diff line change
Expand Up @@ -411,21 +411,25 @@ class EmojiPickerState extends State<EmojiPicker> {
}

Widget _buildEmojiView() {
final content = widget.customWidget == null
? DefaultEmojiPickerView(
widget.config,
_state,
_showSearchView,
)
: widget.customWidget!(
widget.config,
_state,
_showSearchView,
);

return _wrapScrollBehaviorForPlatforms(
SizedBox(
height: widget.config.height,
child: widget.customWidget == null
? DefaultEmojiPickerView(
widget.config,
_state,
_showSearchView,
)
: widget.customWidget!(
widget.config,
_state,
_showSearchView,
),
),
widget.config.height != null
? SizedBox(
height: widget.config.height,
child: content,
)
: content,
);
}

Expand Down