Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/alfaizkhan/flutter-emoji-selector
A flutter Emoji picker.
https://github.com/alfaizkhan/flutter-emoji-selector
dart emoji flutter
Last synced: 17 days ago
JSON representation
A flutter Emoji picker.
- Host: GitHub
- URL: https://github.com/alfaizkhan/flutter-emoji-selector
- Owner: Alfaizkhan
- License: mit
- Created: 2022-06-14T14:35:49.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-10-10T06:51:06.000Z (about 1 year ago)
- Last Synced: 2024-11-15T06:42:05.139Z (about 1 month ago)
- Topics: dart, emoji, flutter
- Language: Dart
- Homepage: https://pub.dev/packages/emoji_selector
- Size: 1020 KB
- Stars: 5
- Watchers: 2
- Forks: 9
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# Emoji Selector
Emoji Selector is an emoji picker component for Flutter.
![Screenshot of emoji Selector](https://raw.githubusercontent.com/Alfaizkhan/flutter-emoji_selector/main/images/emoji_selector.png?raw=true)
## Getting Started
Declare dependency in your `pubspec.yaml`
```yaml
dependencies:
emoji_selector: ^0.0.6
```You can then easily embed the Emoji Selector Widget anywhere in your application:
```dart
EmojiSelector(
onSelected: (emoji) {
print('Selected emoji ${emoji.char}');
},
),
```You will receive a callback with an `EmojiData` object represented the emoji picked by the user.
```dart
class EmojiData {
final String id;
final String name;
final String unified;
final String char;
final String category;
final int skin;
}
```When the emoji is qualified with a skin tone, both `unified` and `char` contains the qualifed values.
The `skin` parameter goes from 0 to 6, 0 representing no skin tone applied. 1 is then the lighter skin tone and 6 the darkest.
## How to use as a keyboard
You can use a modal sheet to simulate a keyboard.
```dart
return showModalBottomSheet(
context: context,
builder: (BuildContext subcontext) {
return SizedBox(
height: 256,
child: EmojiSelector(
onSelected: (emoji) {
Navigator.of(subcontext).pop(emoji);
},
),
);
},
);
```