publish 1.1.2

This commit is contained in:
Henry Hiles 2026-09-24 21:43:33 -04:00
commit aa9a22035c
Signed by: Henry-Hiles
SSH key fingerprint: SHA256:VKQUdS31Q90KvX7EkKMHMBpUspcmItAh86a+v7PGiIs
4 changed files with 35 additions and 14 deletions

View file

@ -28,3 +28,7 @@ Add scrollbar to category list, for more intuitive scrolling on desktop.
## 1.1.1 ## 1.1.1
Wait for end of frame before highlighting categories, fixing an issue where category highlights could be one scroll outdated. Wait for end of frame before highlighting categories, fixing an issue where category highlights could be one scroll outdated.
## 1.1.2
Make search case-insensitive.

View file

@ -1,14 +1,16 @@
A generic but configurable emoji picker for Flutter. Defaults to including only unicode emojis, sourced from gemoji, but can be configured to show custom emotes. A configurable emoji picker for Flutter. It defaults to Unicode emojis sourced from [gemoji](https://github.com/wooorm/gemoji), but can be extended with custom emojis rendered as arbitrary Flutter widgets.
## Features ## Features
- Up-to-date emojis, sourced from gemoji - Up-to-date Unicode emojis, sourced from gemoji
- The ability to prepend or append custom categories with custom emoji - Custom emoji categories that can be prepended or appended to the default categories
- Support for free text selection - Custom emojis can be rendered as arbitrary Flutter widgets, supporting images, GIFs, stickers, and more
- High performance due to using slivers plus a custom listener - Recent emojis can be easily implemented using `prependCategories`
- Sleek M3 design: - Optional free-text selection
- Designed for high performance using slivers and a custom scroll listener
- Sleek Material 3 design
![A screenshot of the emoji picker, showing a searchbar, category selection, and two categories of emojis](https://git.federated.nexus/Henry-Hiles/material_emoji_picker/raw/branch/main/assets/screenshots/main.png) ![A screenshot of the emoji picker, showing a search bar, category selection, and two categories of emojis](https://git.federated.nexus/Henry-Hiles/material_emoji_picker/raw/branch/main/assets/screenshots/main.png)
## Getting started ## Getting started
@ -16,9 +18,9 @@ Add the package to your project with `flutter pub get`.
## Usage ## Usage
`EmojiPicker` is very generic and can be used in multiple context, like a bottom sheet, dialog, or even as just a widget on your page. `EmojiPicker` is can be used in a variety of contexts, including bottom sheets, dialogs, or directly in your widget tree.
An example, using `EmojiPicker` as a bottom sheet: For example, using it as a bottom sheet:
```dart ```dart
showModalBottomSheet( showModalBottomSheet(
@ -33,6 +35,20 @@ showModalBottomSheet(
); );
``` ```
### Custom emojis
Custom categories can contain `Emoji` objects whose `widget` can be any Flutter widget. This makes it possible to use image-based emojis, GIFs, stickers, or other custom visual representations:
```dart
Emoji(
widget: Image.network('https://example.com/blob.webp'),
value: ':blob:',
aliases: ['blob'],
description: 'Blob',
tags: ['custom', 'blob'],
)
```
### Accepted Parameters ### Accepted Parameters
- `IList<EmojiCategory> prependCategories`: Categories to prepend to the default emoji list - `IList<EmojiCategory> prependCategories`: Categories to prepend to the default emoji list

View file

@ -166,19 +166,20 @@ class EmojiPicker extends HookConsumerWidget {
(index, category) => Builder( (index, category) => Builder(
builder: (context) { builder: (context) {
final headerKey = headerKeys[index]; final headerKey = headerKeys[index];
final emojis = search.value.isEmpty final searchTerm = search.value.toLowerCase();
final emojis = searchTerm.isEmpty
? category.emojis ? category.emojis
: category.emojis : category.emojis
.where( .where(
(emoji) => (emoji) =>
emoji.aliases.join().contains( emoji.aliases.join().contains(
search.value, searchTerm,
) || ) ||
emoji.description.contains( emoji.description.contains(
search.value, searchTerm,
) || ) ||
emoji.tags.join().contains( emoji.tags.join().contains(
search.value, searchTerm,
), ),
) )
.toIList(); .toIList();

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: 1.1.1+2 version: 1.1.2
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