add isFreeText to onSelection
This commit is contained in:
parent
aa9a22035c
commit
a26dac8012
1 changed files with 3 additions and 3 deletions
|
|
@ -19,7 +19,7 @@ class EmojiPicker extends HookConsumerWidget {
|
||||||
|
|
||||||
final IList<EmojiCategory> prependCategories;
|
final IList<EmojiCategory> prependCategories;
|
||||||
final IList<EmojiCategory> appendCategories;
|
final IList<EmojiCategory> appendCategories;
|
||||||
final FutureOr<void> Function(String value) onSelection;
|
final FutureOr<void> Function(String value, bool isFreeText) onSelection;
|
||||||
final bool allowFreeText;
|
final bool allowFreeText;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
|
|
@ -113,7 +113,7 @@ class EmojiPicker extends HookConsumerWidget {
|
||||||
IconButton(
|
IconButton(
|
||||||
onPressed: search.value.isEmpty
|
onPressed: search.value.isEmpty
|
||||||
? null
|
? null
|
||||||
: () => onSelection(search.value),
|
: () => onSelection(search.value, true),
|
||||||
icon: Icon(Icons.send),
|
icon: Icon(Icons.send),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
|
|
@ -214,7 +214,7 @@ class EmojiPicker extends HookConsumerWidget {
|
||||||
return IconButton(
|
return IconButton(
|
||||||
padding: EdgeInsets.zero,
|
padding: EdgeInsets.zero,
|
||||||
onPressed: () =>
|
onPressed: () =>
|
||||||
onSelection(emoji.value),
|
onSelection(emoji.value, false),
|
||||||
icon: SizedBox.square(
|
icon: SizedBox.square(
|
||||||
dimension: 36,
|
dimension: 36,
|
||||||
child: FittedBox(child: emoji.widget),
|
child: FittedBox(child: emoji.widget),
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue