publish 1.1.2
This commit is contained in:
parent
21de3590c1
commit
aa9a22035c
4 changed files with 35 additions and 14 deletions
|
|
@ -28,3 +28,7 @@ Add scrollbar to category list, for more intuitive scrolling on desktop.
|
|||
## 1.1.1
|
||||
|
||||
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.
|
||||
|
|
|
|||
34
README.md
34
README.md
|
|
@ -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
|
||||
|
||||
- Up-to-date emojis, sourced from gemoji
|
||||
- The ability to prepend or append custom categories with custom emoji
|
||||
- Support for free text selection
|
||||
- High performance due to using slivers plus a custom listener
|
||||
- Sleek M3 design:
|
||||
- Up-to-date Unicode emojis, sourced from gemoji
|
||||
- Custom emoji categories that can be prepended or appended to the default categories
|
||||
- Custom emojis can be rendered as arbitrary Flutter widgets, supporting images, GIFs, stickers, and more
|
||||
- Recent emojis can be easily implemented using `prependCategories`
|
||||
- Optional free-text selection
|
||||
- Designed for high performance using slivers and a custom scroll listener
|
||||
- Sleek Material 3 design
|
||||
|
||||

|
||||

|
||||
|
||||
## Getting started
|
||||
|
||||
|
|
@ -16,9 +18,9 @@ Add the package to your project with `flutter pub get`.
|
|||
|
||||
## 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
|
||||
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
|
||||
|
||||
- `IList<EmojiCategory> prependCategories`: Categories to prepend to the default emoji list
|
||||
|
|
|
|||
|
|
@ -166,19 +166,20 @@ class EmojiPicker extends HookConsumerWidget {
|
|||
(index, category) => Builder(
|
||||
builder: (context) {
|
||||
final headerKey = headerKeys[index];
|
||||
final emojis = search.value.isEmpty
|
||||
final searchTerm = search.value.toLowerCase();
|
||||
final emojis = searchTerm.isEmpty
|
||||
? category.emojis
|
||||
: category.emojis
|
||||
.where(
|
||||
(emoji) =>
|
||||
emoji.aliases.join().contains(
|
||||
search.value,
|
||||
searchTerm,
|
||||
) ||
|
||||
emoji.description.contains(
|
||||
search.value,
|
||||
searchTerm,
|
||||
) ||
|
||||
emoji.tags.join().contains(
|
||||
search.value,
|
||||
searchTerm,
|
||||
),
|
||||
)
|
||||
.toIList();
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
name: material_emoji_picker
|
||||
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
|
||||
issue_tracker: https://git.federated.nexus/Henry-Hiles/material_emoji_picker/issues
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue