release 2.0.1

This commit is contained in:
Henry Hiles 2026-10-23 17:15:21 -04:00
commit 4a9f1ed84a
Signed by: Henry-Hiles
SSH key fingerprint: SHA256:VKQUdS31Q90KvX7EkKMHMBpUspcmItAh86a+v7PGiIs
3 changed files with 25 additions and 1 deletions

View file

@ -45,3 +45,11 @@ Fixup gemoji URL in README.
- **Breaking:** `onSelection` is now called with the selected `Emoji`, including its aliases, instead of its value. - **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. - **Breaking:** Replace `allowFreeText` and `isFreeText` with an optional `onFreeText` callback, called with the search text. The send button is shown when it's set.
## 2.0.1
- Add `includeDefaultEmoji`, to show only your own categories, e.g. for a sticker picker. The default emoji aren't loaded when it's `false`.
- Add `itemSize`, to set the size of each item in the grid.
- Add `searchHint`, to set the search bar's placeholder text.
- Add an optional `data` field to `Emoji`, for anything else your app needs about a custom emoji. It's passed back as is to `onSelection`.
- Fix changes to categories after the picker is first built not being shown, e.g. custom emojis that finish loading later.

View file

@ -46,6 +46,19 @@ Emoji(
aliases: ['blob'], aliases: ['blob'],
description: 'Blob', description: 'Blob',
tags: ['custom', 'blob'], tags: ['custom', 'blob'],
data: blobImage, // Optional, passed back to onSelection
)
```
To pick from only your own categories, like a sticker picker, turn off the default emojis:
```dart
EmojiPicker(
prependCategories: stickerCategories,
includeDefaultEmoji: false,
itemSize: 96,
searchHint: "Search stickers",
onSelection: (sticker) => sendSticker(sticker.data as StickerImage),
) )
``` ```
@ -55,3 +68,6 @@ Emoji(
- `IList<EmojiCategory> appendCategories`: Categories to append to the default emoji list - `IList<EmojiCategory> appendCategories`: Categories to append to the default emoji list
- `required FutureOr<void> Function(Emoji emoji) onSelection`: Function to be called with the selected emoji - `required FutureOr<void> Function(Emoji emoji) onSelection`: Function to be called with the selected emoji
- `FutureOr<void> Function(String text)? onFreeText`: If set, allows submitting the search text as is, calling this with it - `FutureOr<void> Function(String text)? onFreeText`: If set, allows submitting the search text as is, calling this with it
- `bool includeDefaultEmoji = true`: Whether to show the default emojis after `prependCategories`
- `double itemSize = 56`: The width and height of each item in the grid
- `String searchHint = "Search emoji"`: Placeholder text for the search bar

View file

@ -1,6 +1,6 @@
name: material_emoji_picker name: material_emoji_picker
description: A generic but configurable emoji picker for Flutter description: A generic but configurable emoji picker for Flutter
version: 2.0.0 version: 2.0.1
repository: https://git.federated.nexus/Henry-Hiles/material_emoji_picker repository: https://git.federated.nexus/Henry-Hiles/material_emoji_picker
issue_tracker: https://git.federated.nexus/Henry-Hiles/material_emoji_picker/issues issue_tracker: https://git.federated.nexus/Henry-Hiles/material_emoji_picker/issues