From bd0ee1eed9777a2b4c4d6b19501aada48143cd2a Mon Sep 17 00:00:00 2001 From: Henry-Hiles Date: Fri, 23 Oct 2026 17:01:04 -0400 Subject: [PATCH] release 2.0.0 --- CHANGELOG.md | 5 +++++ README.md | 8 ++++---- pubspec.yaml | 2 +- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index fda3ba4..5eeb3e2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -40,3 +40,8 @@ Add `isFreeText` to `onSelection` callback, useful for recording only recent emo ## 1.2.0+1 Fixup gemoji URL in README. + +## 2.0.0 + +- **Breaking:** `onSelection` is now called with the selected `Emoji`, including its aliases, instead of its value. +- **Breaking:** Replace `allowFreeText` and `isFreeText` with an optional `onFreeText` callback, called with the search text. The send button is shown when it's set. diff --git a/README.md b/README.md index a5cd340..2cc06d4 100644 --- a/README.md +++ b/README.md @@ -27,9 +27,9 @@ showModalBottomSheet( isScrollControlled: true, context: context, builder: (context) => EmojiPicker( - onSelection: (emoji, isFreeText) { + onSelection: (emoji) { Navigator.of(context).pop(); - message.sendReaction(emoji); + message.sendReaction(emoji.value); }, ), ); @@ -53,5 +53,5 @@ Emoji( - `IList prependCategories`: Categories to prepend to the default emoji list - `IList appendCategories`: Categories to append to the default emoji list -- `required FutureOr Function(String value) onSelection`: Function to be called when an emoji is selected -- `bool allowFreeText = false`: Whether to allow free text to be returned. Defaults to `false`. +- `required FutureOr Function(Emoji emoji) onSelection`: Function to be called with the selected emoji +- `FutureOr Function(String text)? onFreeText`: If set, allows submitting the search text as is, calling this with it diff --git a/pubspec.yaml b/pubspec.yaml index f2fb1d5..de3c6b7 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: material_emoji_picker description: A generic but configurable emoji picker for Flutter -version: 1.2.0+1 +version: 2.0.0 repository: https://git.federated.nexus/Henry-Hiles/material_emoji_picker issue_tracker: https://git.federated.nexus/Henry-Hiles/material_emoji_picker/issues