Bring projects, wikis, and teams together with AI. AppFlowy is the AI collaborative workspace where you achieve more without losing control of your data. The leading open source Notion alternative.
Dart blogconfluence-alternativecontent-managementcontent-servicesdocumentationflutternote-takingnotion-alternativeproject-managementtask-managementteam-collaborationwiki
feat: move emoji_picker to appflowy editor plugin
Lucas.Xu15e3d3b4869f
diff --git a/frontend/app_flowy/packages/appflowy_editor/example/lib/pages/simple_editor.dart b/frontend/app_flowy/packages/appflowy_editor/example/lib/pages/simple_editor.dartindex 1eca47a1b4..f8214d9b03 100644--- a/frontend/app_flowy/packages/appflowy_editor/example/lib/pages/simple_editor.dart+++ b/frontend/app_flowy/packages/appflowy_editor/example/lib/pages/simple_editor.dart@@ -59,6 +59,8 @@ class SimpleEditor extends StatelessWidget {mathEquationMenuItem,// Code BlockcodeBlockMenuItem,+ // Emoji+ emojiMenuItem,],);} else {diff --git a/frontend/app_flowy/packages/appflowy_editor/example/linux/flutter/generated_plugin_registrant.cc b/frontend/app_flowy/packages/appflowy_editor/example/linux/flutter/generated_plugin_registrant.ccindex 00fd3bc03f..c6b2120aa0 100644--- a/frontend/app_flowy/packages/appflowy_editor/example/linux/flutter/generated_plugin_registrant.cc+++ b/frontend/app_flowy/packages/appflowy_editor/example/linux/flutter/generated_plugin_registrant.cc@@ -6,10 +6,14 @@#include "generated_plugin_registrant.h"+#include <flowy_infra_ui/flowy_infra_u_i_plugin.h>#include <rich_clipboard_linux/rich_clipboard_plugin.h>#include <url_launcher_linux/url_launcher_plugin.h>void fl_register_plugins(FlPluginRegistry* registry) {+ g_autoptr(FlPluginRegistrar) flowy_infra_ui_registrar =+ fl_plugin_registry_get_registrar_for_plugin(registry, "FlowyInfraUIPlugin");+ flowy_infra_u_i_plugin_register_with_registrar(flowy_infra_ui_registrar);g_autoptr(FlPluginRegistrar) rich_clipboard_linux_registrar =fl_plugin_registry_get_registrar_for_plugin(registry, "RichClipboardPlugin");rich_clipboard_plugin_register_with_registrar(rich_clipboard_linux_registrar);diff --git a/frontend/app_flowy/packages/appflowy_editor/example/linux/flutter/generated_plugins.cmake b/frontend/app_flowy/packages/appflowy_editor/example/linux/flutter/generated_plugins.cmakeindex 0342e3868a..cd997321ab 100644--- a/frontend/app_flowy/packages/appflowy_editor/example/linux/flutter/generated_plugins.cmake+++ b/frontend/app_flowy/packages/appflowy_editor/example/linux/flutter/generated_plugins.cmake@@ -3,6 +3,7 @@#list(APPEND FLUTTER_PLUGIN_LIST+ flowy_infra_uirich_clipboard_linuxurl_launcher_linux)diff --git a/frontend/app_flowy/packages/appflowy_editor/example/macos/Flutter/GeneratedPluginRegistrant.swift b/frontend/app_flowy/packages/appflowy_editor/example/macos/Flutter/GeneratedPluginRegistrant.swiftindex f0f250ebd6..1bc26379f4 100644--- a/frontend/app_flowy/packages/appflowy_editor/example/macos/Flutter/GeneratedPluginRegistrant.swift+++ b/frontend/app_flowy/packages/appflowy_editor/example/macos/Flutter/GeneratedPluginRegistrant.swift@@ -5,12 +5,16 @@import FlutterMacOSimport Foundation+import flowy_infra_uiimport path_provider_macosimport rich_clipboard_macos+import shared_preferences_macosimport url_launcher_macosfunc RegisterGeneratedPlugins(registry: FlutterPluginRegistry) {+ FlowyInfraUIPlugin.register(with: registry.registrar(forPlugin: "FlowyInfraUIPlugin"))PathProviderPlugin.register(with: registry.registrar(forPlugin: "PathProviderPlugin"))RichClipboardPlugin.register(with: registry.registrar(forPlugin: "RichClipboardPlugin"))+ SharedPreferencesPlugin.register(with: registry.registrar(forPlugin: "SharedPreferencesPlugin"))UrlLauncherPlugin.register(with: registry.registrar(forPlugin: "UrlLauncherPlugin"))}diff --git a/frontend/app_flowy/packages/appflowy_editor/example/macos/Podfile.lock b/frontend/app_flowy/packages/appflowy_editor/example/macos/Podfile.lockindex 49a5879fa6..1399b50219 100644--- a/frontend/app_flowy/packages/appflowy_editor/example/macos/Podfile.lock+++ b/frontend/app_flowy/packages/appflowy_editor/example/macos/Podfile.lock@@ -1,32 +1,44 @@PODS:+ - flowy_infra_ui (0.0.1):+ - FlutterMacOS- FlutterMacOS (1.0.0)- path_provider_macos (0.0.1):- FlutterMacOS- rich_clipboard_macos (0.0.1):- FlutterMacOS+ - shared_preferences_macos (0.0.1):+ - FlutterMacOS- url_launcher_macos (0.0.1):- FlutterMacOSDEPENDENCIES:+ - flowy_infra_ui (from `Flutter/ephemeral/.symlinks/plugins/flowy_infra_ui/macos`)- FlutterMacOS (from `Flutter/ephemeral`)- path_provider_macos (from `Flutter/ephemeral/.symlinks/plugins/path_provider_macos/macos`)- rich_clipboard_macos (from `Flutter/ephemeral/.symlinks/plugins/rich_clipboard_macos/macos`)+ - shared_preferences_macos (from `Flutter/ephemeral/.symlinks/plugins/shared_preferences_macos/macos`)- url_launcher_macos (from `Flutter/ephemeral/.symlinks/plugins/url_launcher_macos/macos`)EXTERNAL SOURCES:+ flowy_infra_ui:+ :path: Flutter/ephemeral/.symlinks/plugins/flowy_infra_ui/macosFlutterMacOS::path: Flutter/ephemeralpath_provider_macos::path: Flutter/ephemeral/.symlinks/plugins/path_provider_macos/macosrich_clipboard_macos::path: Flutter/ephemeral/.symlinks/plugins/rich_clipboard_macos/macos+ shared_preferences_macos:+ :path: Flutter/ephemeral/.symlinks/plugins/shared_preferences_macos/macosurl_launcher_macos::path: Flutter/ephemeral/.symlinks/plugins/url_launcher_macos/macosSPEC CHECKSUMS:+ flowy_infra_ui: c34d49d615ed9fe552cd47f90d7850815a74e9e9FlutterMacOS: 57701585bf7de1b3fc2bb61f6378d73bbdea8424path_provider_macos: 3c0c3b4b0d4a76d2bf989a913c2de869c5641a19rich_clipboard_macos: 43364b66b9dc69d203eb8dd6d758e2d12e02723c+ shared_preferences_macos: a64dc611287ed6cbe28fd1297898db1336975727url_launcher_macos: 597e05b8e514239626bcf4a850fcf9ef5c856ec3PODFILE CHECKSUM: 6eac6b3292e5142cfc23bdeb71848a40ec51c14cdiff --git a/frontend/app_flowy/packages/appflowy_editor/example/windows/flutter/generated_plugin_registrant.cc b/frontend/app_flowy/packages/appflowy_editor/example/windows/flutter/generated_plugin_registrant.ccindex 4f7884874d..f1fe1bdbdb 100644--- a/frontend/app_flowy/packages/appflowy_editor/example/windows/flutter/generated_plugin_registrant.cc+++ b/frontend/app_flowy/packages/appflowy_editor/example/windows/flutter/generated_plugin_registrant.cc@@ -6,9 +6,12 @@#include "generated_plugin_registrant.h"+#include <flowy_infra_ui/flowy_infra_u_i_plugin.h>#include <url_launcher_windows/url_launcher_windows.h>void RegisterPlugins(flutter::PluginRegistry* registry) {+ FlowyInfraUIPluginRegisterWithRegistrar(+ registry->GetRegistrarForPlugin("FlowyInfraUIPlugin"));UrlLauncherWindowsRegisterWithRegistrar(registry->GetRegistrarForPlugin("UrlLauncherWindows"));}diff --git a/frontend/app_flowy/packages/appflowy_editor/example/windows/flutter/generated_plugins.cmake b/frontend/app_flowy/packages/appflowy_editor/example/windows/flutter/generated_plugins.cmakeindex 88b22e5c77..78c9ccb4d0 100644--- a/frontend/app_flowy/packages/appflowy_editor/example/windows/flutter/generated_plugins.cmake+++ b/frontend/app_flowy/packages/appflowy_editor/example/windows/flutter/generated_plugins.cmake@@ -3,6 +3,7 @@#list(APPEND FLUTTER_PLUGIN_LIST+ flowy_infra_uiurl_launcher_windows)diff --git a/frontend/app_flowy/packages/appflowy_editor/lib/appflowy_editor.dart b/frontend/app_flowy/packages/appflowy_editor/lib/appflowy_editor.dartindex 750ba6c689..983badaaa5 100644--- a/frontend/app_flowy/packages/appflowy_editor/lib/appflowy_editor.dart+++ b/frontend/app_flowy/packages/appflowy_editor/lib/appflowy_editor.dart@@ -15,6 +15,7 @@ export 'src/editor_state.dart';export 'src/core/transform/operation.dart';export 'src/core/transform/transaction.dart';export 'src/render/selection/selectable.dart';+export 'src/render/selection_menu/selection_menu_service.dart';export 'src/service/editor_service.dart';export 'src/service/render_plugin_service.dart';export 'src/service/service.dart';diff --git a/frontend/app_flowy/packages/appflowy_editor/lib/src/l10n/l10n.dart b/frontend/app_flowy/packages/appflowy_editor/lib/src/l10n/l10n.dartindex f14d1e67d6..0d464022d2 100644--- a/frontend/app_flowy/packages/appflowy_editor/lib/src/l10n/l10n.dart+++ b/frontend/app_flowy/packages/appflowy_editor/lib/src/l10n/l10n.dart@@ -131,16 +131,6 @@ class AppFlowyEditorLocalizations {);}- /// `Emoji`- String get emoji {- return Intl.message(- 'Emoji',- name: 'emoji',- desc: '',- args: [],- );- }-/// `Image`String get image {return Intl.message(diff --git a/frontend/app_flowy/packages/appflowy_editor/lib/src/render/selection_menu/selection_menu_service.dart b/frontend/app_flowy/packages/appflowy_editor/lib/src/render/selection_menu/selection_menu_service.dartindex e448b1f9cc..37cd410488 100644--- a/frontend/app_flowy/packages/appflowy_editor/lib/src/render/selection_menu/selection_menu_service.dart+++ b/frontend/app_flowy/packages/appflowy_editor/lib/src/render/selection_menu/selection_menu_service.dart@@ -1,15 +1,17 @@-import 'package:appflowy_editor/src/editor_state.dart';-import 'package:appflowy_editor/src/infra/flowy_svg.dart';-import 'package:appflowy_editor/src/l10n/l10n.dart';-import 'package:appflowy_editor/src/render/image/image_upload_widget.dart';-import 'package:appflowy_editor/src/render/selection_menu/selection_menu_widget.dart';-import 'package:appflowy_editor/src/service/default_text_operations/format_rich_text_style.dart';-import 'package:appflowy_editor/src/render/emoji/emoji_select_widget.dart';import 'package:flutter/material.dart';-import 'package:appflowy_editor/src/core/legacy/built_in_attribute_keys.dart';++import '../../core/legacy/built_in_attribute_keys.dart';+import '../../editor_state.dart';+import '../../infra/flowy_svg.dart';+import '../../l10n/l10n.dart';+import '../../service/default_text_operations/format_rich_text_style.dart';+import '../image/image_upload_widget.dart';+import 'selection_menu_widget.dart';abstract class SelectionMenuService {Offset get topLeft;+ Offset get offset;+ Alignment get alignment;void show();void dismiss();@@ -27,6 +29,8 @@ class SelectionMenu implements SelectionMenuService {OverlayEntry? _selectionMenuEntry;bool _selectionUpdateByInner = false;Offset? _topLeft;+ Offset _offset = Offset.zero;+ Alignment _alignment = Alignment.topLeft;@overridevoid dismiss() {@@ -67,6 +71,7 @@ class SelectionMenu implements SelectionMenuService {// show below defualtvar showBelow = true;+ _alignment = Alignment.bottomLeft;final bottomRight = selectionRects.first.bottomRight;final topRight = selectionRects.first.topRight;var offset = bottomRight + menuOffset;@@ -75,14 +80,16 @@ class SelectionMenu implements SelectionMenuService {// show aboveoffset = topRight - menuOffset;showBelow = false;+ _alignment = Alignment.topRight;}_topLeft = offset;+ _offset = Offset(offset.dx, showBelow ? offset.dy : MediaQuery.of(context).size.height - offset.dy);_selectionMenuEntry = OverlayEntry(builder: (context) {return Positioned(- top: showBelow ? offset.dy : null,+ top: showBelow ? _offset.dy : null,bottom:- showBelow ? null : MediaQuery.of(context).size.height - offset.dy,+ showBelow ? null : _offset.dy,left: offset.dx,child: SelectionMenuWidget(items: [@@ -114,6 +121,16 @@ class SelectionMenu implements SelectionMenuService {return _topLeft ?? Offset.zero;}+ @override+ Alignment get alignment {+ return _alignment;+ }++ @override+ Offset get offset {+ return _offset;+ }+void _onSelectionChange() {// workaround: SelectionService has been released after hot reload.final isSelectionDisposed =@@ -181,13 +198,6 @@ final List<SelectionMenuItem> _defaultSelectionMenuItems = [keywords: ['image'],handler: showImageUploadMenu,),- SelectionMenuItem(- name: () => AppFlowyEditorLocalizations.current.emoji,- icon: (editorState, onSelected) =>- _selectionMenuIcon('image', editorState, onSelected),- keywords: ['emoji'],- handler: showEmojiSelectionMenu,- ),SelectionMenuItem(name: () => AppFlowyEditorLocalizations.current.bulletedList,icon: (editorState, onSelected) =>diff --git a/frontend/app_flowy/packages/appflowy_editor_plugins/lib/appflowy_editor_plugins.dart b/frontend/app_flowy/packages/appflowy_editor_plugins/lib/appflowy_editor_plugins.dartindex 771a88720c..890208c387 100644--- a/frontend/app_flowy/packages/appflowy_editor_plugins/lib/appflowy_editor_plugins.dart+++ b/frontend/app_flowy/packages/appflowy_editor_plugins/lib/appflowy_editor_plugins.dart@@ -1,12 +1,12 @@library appflowy_editor_plugins;+// Code Block+export 'src/code_block/code_block_node_widget.dart';+export 'src/code_block/code_block_shortcut_event.dart';// Dividerexport 'src/divider/divider_node_widget.dart';export 'src/divider/divider_shortcut_event.dart';-+// Emoji Picker+export 'src/emoji_picker/emoji_menu_item.dart';// Math Equation-export 'src/math_ equation/math_equation_node_widget.dart';--// Code Block-export 'src/code_block/code_block_node_widget.dart';-export 'src/code_block/code_block_shortcut_event.dart';+export 'src/math_ equation/math_equation_node_widget.dart';\ No newline at end of filediff --git a/frontend/app_flowy/packages/appflowy_editor/lib/src/render/emoji/emoji_select_widget.dart b/frontend/app_flowy/packages/appflowy_editor_plugins/lib/src/emoji_picker/emoji_menu_item.dartsimilarity index 68%rename from frontend/app_flowy/packages/appflowy_editor/lib/src/render/emoji/emoji_select_widget.dartrename to frontend/app_flowy/packages/appflowy_editor_plugins/lib/src/emoji_picker/emoji_menu_item.dartindex 76443707eb..0868d4c7d0 100644--- a/frontend/app_flowy/packages/appflowy_editor/lib/src/render/emoji/emoji_select_widget.dart+++ b/frontend/app_flowy/packages/appflowy_editor_plugins/lib/src/emoji_picker/emoji_menu_item.dart@@ -1,42 +1,48 @@-import 'package:appflowy_editor/src/core/document/node.dart';-import 'package:appflowy_editor/src/editor_state.dart';-import 'package:appflowy_editor/src/infra/flowy_svg.dart';-import 'package:appflowy_editor/src/render/selection_menu/selection_menu_service.dart';-import 'package:appflowy_editor/src/render/style/editor_style.dart';-import 'package:flutter/material.dart';-import 'package:app_flowy/workspace/presentation/widgets/emoji_picker/src/emoji_picker.dart';-import 'package:appflowy_editor/appflowy_editor.dart';--import 'package:app_flowy/workspace/presentation/widgets/emoji_picker/src/models/emoji_model.dart';-import 'package:app_flowy/workspace/presentation/widgets/emoji_picker/src/config.dart';-import 'package:app_flowy/workspace/presentation/widgets/emoji_picker/src/emoji_button.dart';-import 'dart:collection';-import 'package:appflowy_popover/appflowy_popover.dart';+import 'package:appflowy_editor/appflowy_editor.dart';import 'package:flutter/material.dart';import 'package:flutter/services.dart';-import 'package:flutter/foundation.dart' as foundation;-OverlayEntry? _imojiSelectionMenu;+import 'emoji_picker.dart';++SelectionMenuItem emojiMenuItem =+ SelectionMenuItem(+ name: () => 'emoji',+ icon: (editorState, onSelected) => Icon(+ Icons.emoji_emotions_outlined,+ color: onSelected+ ? editorState.editorStyle.selectionMenuItemSelectedIconColor+ : editorState.editorStyle.selectionMenuItemIconColor,+ size: 18.0,+ ),+ keywords: ['emoji'],+ handler: _showEmojiSelectionMenu,+ );++OverlayEntry? _emojiSelectionMenu;EditorState? _editorState;-void showEmojiSelectionMenu(+void _showEmojiSelectionMenu(EditorState editorState,SelectionMenuService menuService,BuildContext context,) {+ final aligment = menuService.alignment;+ final offset = menuService.offset;menuService.dismiss();- _imojiSelectionMenu?.remove();- _imojiSelectionMenu = OverlayEntry(builder: (context) {+ _emojiSelectionMenu?.remove();+ _emojiSelectionMenu = OverlayEntry(builder: (context) {return Positioned(- top: menuService.topLeft.dy,- left: menuService.topLeft.dx,+ top: aligment == Alignment.bottomRight ? offset.dy : null,+ bottom:+ aligment == Alignment.topRight ? offset.dy : null,+ left: offset.dx,child: Material(child: EmojiSelectionMenu(editorState: editorState,onSubmitted: (text) {// insert emoji- editorState.insertEmojiNode(text);+ editorState.insertEmoji(text);},onExit: () {_dismissEmojiSelectionMenu();@@ -47,15 +53,15 @@ void showEmojiSelectionMenu();});- Overlay.of(context)?.insert(_imojiSelectionMenu!);+ Overlay.of(context)?.insert(_emojiSelectionMenu!);editorState.service.selectionService.currentSelection.addListener(_dismissEmojiSelectionMenu);}void _dismissEmojiSelectionMenu() {- _imojiSelectionMenu?.remove();- _imojiSelectionMenu = null;+ _emojiSelectionMenu?.remove();+ _emojiSelectionMenu = null;_editorState?.service.selectionService.currentSelection.removeListener(_dismissEmojiSelectionMenu);@@ -70,7 +76,7 @@ class EmojiSelectionMenu extends StatefulWidget {this.editorState,}) : super(key: key);- final void Function(Emoji Emoji) onSubmitted;+ final void Function(Emoji emoji) onSubmitted;final void Function() onExit;final EditorState? editorState;@@ -129,7 +135,7 @@ class _EmojiSelectionMenuState extends State<EmojiSelectionMenu> {crossAxisAlignment: CrossAxisAlignment.start,children: [_buildHeader(context),- FlowyEmojiStyleButton(normalIcon: '', tooltipText: ''),+ // FlowyEmojiStyleButton(normalIcon: '', tooltipText: ''),const SizedBox(height: 10.0),_buildEmojiBox(context),],@@ -171,17 +177,16 @@ class _EmojiSelectionMenuState extends State<EmojiSelectionMenu> {}extension on EditorState {- void insertEmojiNode(Emoji emoji) {+ void insertEmoji(Emoji emoji) {final selectionService = service.selectionService;final currentSelection = selectionService.currentSelection.value;-- if (currentSelection == null) {+ final nodes = selectionService.currentSelectedNodes;+ if (currentSelection == null || !currentSelection.isCollapsed || nodes.first is! TextNode) {return;}-- final textNode = selectionService.currentSelectedNodes.first as TextNode;- final transaction = this.transaction;- transaction.insertText(textNode, currentSelection.endIndex, emoji.emoji);- apply(transaction);+ final textNode = nodes.first as TextNode;+ final tr = transaction;+ tr.insertText(textNode, currentSelection.endIndex, emoji.emoji,);+ apply(tr);}}diff --git a/frontend/app_flowy/packages/appflowy_editor_plugins/lib/src/emoji_picker/emoji_picker.dart b/frontend/app_flowy/packages/appflowy_editor_plugins/lib/src/emoji_picker/emoji_picker.dartnew file mode 100644index 0000000000..fe4580db04--- /dev/null+++ b/frontend/app_flowy/packages/appflowy_editor_plugins/lib/src/emoji_picker/emoji_picker.dart@@ -0,0 +1,4 @@+export 'src/config.dart';+export 'src/emoji_picker.dart';+export 'src/emoji_picker_builder.dart';+export 'src/models/emoji_model.dart';diff --git a/frontend/app_flowy/packages/appflowy_editor_plugins/lib/src/emoji_picker/src/config.dart b/frontend/app_flowy/packages/appflowy_editor_plugins/lib/src/emoji_picker/src/config.dartnew file mode 100644index 0000000000..26046af5bb--- /dev/null+++ b/frontend/app_flowy/packages/appflowy_editor_plugins/lib/src/emoji_picker/src/config.dart@@ -0,0 +1,164 @@+import 'dart:math';++import 'package:flutter/material.dart';++import 'models/category_models.dart';+import 'emoji_picker.dart';++/// Config for customizations+class Config {+ /// Constructor+ const Config(+ {this.columns = 7,+ this.emojiSizeMax = 32.0,+ this.verticalSpacing = 0,+ this.horizontalSpacing = 0,+ this.initCategory = Category.RECENT,+ this.bgColor = const Color(0xFFEBEFF2),+ this.indicatorColor = Colors.blue,+ this.iconColor = Colors.grey,+ this.iconColorSelected = Colors.blue,+ this.progressIndicatorColor = Colors.blue,+ this.backspaceColor = Colors.blue,+ this.showRecentsTab = true,+ this.recentsLimit = 28,+ this.noRecentsText = 'No Recents',+ this.noRecentsStyle = const TextStyle(fontSize: 20, color: Colors.black26),+ this.tabIndicatorAnimDuration = kTabScrollDuration,+ this.categoryIcons = const CategoryIcons(),+ this.buttonMode = ButtonMode.MATERIAL});++ /// Number of emojis per row+ final int columns;++ /// Width and height the emoji will be maximal displayed+ /// Can be smaller due to screen size and amount of columns+ final double emojiSizeMax;++ /// Vertical spacing between emojis+ final double verticalSpacing;++ /// Horizontal spacing between emojis+ final double horizontalSpacing;++ /// The initial [Category] that will be selected+ /// This [Category] will have its button in the bottombar darkened+ final Category initCategory;++ /// The background color of the Widget+ final Color bgColor;++ /// The color of the category indicator+ final Color indicatorColor;++ /// The color of the category icons+ final Color iconColor;++ /// The color of the category icon when selected+ final Color iconColorSelected;++ /// The color of the loading indicator during initialization+ final Color progressIndicatorColor;++ /// The color of the backspace icon button+ final Color backspaceColor;++ /// Show extra tab with recently used emoji+ final bool showRecentsTab;++ /// Limit of recently used emoji that will be saved+ final int recentsLimit;++ /// The text to be displayed if no recent emojis to display+ final String noRecentsText;++ /// The text style for [noRecentsText]+ final TextStyle noRecentsStyle;++ /// Duration of tab indicator to animate to next category+ final Duration tabIndicatorAnimDuration;++ /// Determines the icon to display for each [Category]+ final CategoryIcons categoryIcons;++ /// Change between Material and Cupertino button style+ final ButtonMode buttonMode;++ /// Get Emoji size based on properties and screen width+ double getEmojiSize(double width) {+ final maxSize = width / columns;+ return min(maxSize, emojiSizeMax);+ }++ /// Returns the icon for the category+ IconData getIconForCategory(Category category) {+ switch (category) {+ case Category.RECENT:+ return categoryIcons.recentIcon;+ case Category.SMILEYS:+ return categoryIcons.smileyIcon;+ case Category.ANIMALS:+ return categoryIcons.animalIcon;+ case Category.FOODS:+ return categoryIcons.foodIcon;+ case Category.TRAVEL:+ return categoryIcons.travelIcon;+ case Category.ACTIVITIES:+ return categoryIcons.activityIcon;+ case Category.OBJECTS:+ return categoryIcons.objectIcon;+ case Category.SYMBOLS:+ return categoryIcons.symbolIcon;+ case Category.FLAGS:+ return categoryIcons.flagIcon;+ case Category.SEARCH:+ return categoryIcons.searchIcon;+ default:+ throw Exception('Unsupported Category');+ }+ }++ @override+ bool operator ==(other) {+ return (other is Config) &&+ other.columns == columns &&+ other.emojiSizeMax == emojiSizeMax &&+ other.verticalSpacing == verticalSpacing &&+ other.horizontalSpacing == horizontalSpacing &&+ other.initCategory == initCategory &&+ other.bgColor == bgColor &&+ other.indicatorColor == indicatorColor &&+ other.iconColor == iconColor &&+ other.iconColorSelected == iconColorSelected &&+ other.progressIndicatorColor == progressIndicatorColor &&+ other.backspaceColor == backspaceColor &&+ other.showRecentsTab == showRecentsTab &&+ other.recentsLimit == recentsLimit &&+ other.noRecentsText == noRecentsText &&+ other.noRecentsStyle == noRecentsStyle &&+ other.tabIndicatorAnimDuration == tabIndicatorAnimDuration &&+ other.categoryIcons == categoryIcons &&+ other.buttonMode == buttonMode;+ }++ @override+ int get hashCode =>+ columns.hashCode ^+ emojiSizeMax.hashCode ^+ verticalSpacing.hashCode ^+ horizontalSpacing.hashCode ^+ initCategory.hashCode ^+ bgColor.hashCode ^+ indicatorColor.hashCode ^+ iconColor.hashCode ^+ iconColorSelected.hashCode ^+ progressIndicatorColor.hashCode ^+ backspaceColor.hashCode ^+ showRecentsTab.hashCode ^+ recentsLimit.hashCode ^+ noRecentsText.hashCode ^+ noRecentsStyle.hashCode ^+ tabIndicatorAnimDuration.hashCode ^+ categoryIcons.hashCode ^+ buttonMode.hashCode;+}diff --git a/frontend/app_flowy/packages/appflowy_editor_plugins/lib/src/emoji_picker/src/default_emoji_picker_view.dart b/frontend/app_flowy/packages/appflowy_editor_plugins/lib/src/emoji_picker/src/default_emoji_picker_view.dartnew file mode 100644index 0000000000..271a3b6dd2--- /dev/null+++ b/frontend/app_flowy/packages/appflowy_editor_plugins/lib/src/emoji_picker/src/default_emoji_picker_view.dart@@ -0,0 +1,299 @@+import 'package:flowy_infra_ui/style_widget/scrolling/styled_scroll_bar.dart';+import 'package:flutter/cupertino.dart';+import 'package:flutter/material.dart';++import 'models/category_models.dart';+import 'config.dart';+import 'models/emoji_model.dart';+import 'emoji_picker.dart';+import 'emoji_picker_builder.dart';+import 'emoji_view_state.dart';++class DefaultEmojiPickerView extends EmojiPickerBuilder {+ const DefaultEmojiPickerView(Config config, EmojiViewState state, {Key? key})+ : super(config, state, key: key);++ @override+ DefaultEmojiPickerViewState createState() => DefaultEmojiPickerViewState();+}++class DefaultEmojiPickerViewState extends State<DefaultEmojiPickerView>+ with TickerProviderStateMixin {+ PageController? _pageController;+ TabController? _tabController;+ final TextEditingController _emojiController = TextEditingController();+ final FocusNode _emojiFocusNode = FocusNode();+ final CategoryEmoji _categoryEmoji =+ CategoryEmoji(Category.SEARCH, List.empty(growable: true));+ CategoryEmoji searchEmojiList = CategoryEmoji(Category.SEARCH, <Emoji>[]);++ @override+ void initState() {+ var initCategory = widget.state.categoryEmoji.indexWhere(+ (element) => element.category == widget.config.initCategory);+ if (initCategory == -1) {+ initCategory = 0;+ }+ _tabController = TabController(+ initialIndex: initCategory,+ length: widget.state.categoryEmoji.length,+ vsync: this);+ _pageController = PageController(initialPage: initCategory);+ _emojiFocusNode.requestFocus();++ _emojiController.addListener(() {+ String query = _emojiController.text.toLowerCase();+ if (query.isEmpty) {+ searchEmojiList.emoji.clear();+ _pageController!.jumpToPage(+ _tabController!.index,+ );+ } else {+ searchEmojiList.emoji.clear();+ for (var element in widget.state.categoryEmoji) {+ searchEmojiList.emoji.addAll(+ element.emoji.where((item) {+ return item.name.toLowerCase().contains(query);+ }).toList(),+ );+ }+ }+ setState(() {});+ });+ super.initState();+ }++ @override+ void dispose() {+ _emojiController.dispose();+ _emojiFocusNode.dispose();+ super.dispose();+ }++ Widget _buildBackspaceButton() {+ if (widget.state.onBackspacePressed != null) {+ return Material(+ type: MaterialType.transparency,+ child: IconButton(+ padding: const EdgeInsets.only(bottom: 2),+ icon: Icon(+ Icons.backspace,+ color: widget.config.backspaceColor,+ ),+ onPressed: () {+ widget.state.onBackspacePressed!();+ }),+ );+ }+ return Container();+ }++ bool isEmojiSearching() {+ bool result =+ searchEmojiList.emoji.isNotEmpty || _emojiController.text.isNotEmpty;++ return result;+ }++ @override+ Widget build(BuildContext context) {+ return LayoutBuilder(+ builder: (context, constraints) {+ final emojiSize = widget.config.getEmojiSize(constraints.maxWidth);++ return Container(+ color: widget.config.bgColor,+ padding: const EdgeInsets.all(5.0),+ child: Column(+ children: [+ SizedBox(+ height: 25.0,+ child: TextField(+ controller: _emojiController,+ focusNode: _emojiFocusNode,+ autofocus: true,+ style: const TextStyle(fontSize: 14.0),+ cursorWidth: 1.0,+ cursorColor: Colors.black,+ decoration: InputDecoration(+ contentPadding: const EdgeInsets.symmetric(horizontal: 5.0),+ hintText: "Search emoji",+ focusedBorder: OutlineInputBorder(+ borderRadius: BorderRadius.circular(4.0),+ borderSide: const BorderSide(),+ gapPadding: 0.0,+ ),+ border: OutlineInputBorder(+ borderRadius: BorderRadius.circular(4.0),+ borderSide: const BorderSide(),+ gapPadding: 0.0,+ ),+ filled: true,+ fillColor: Colors.white,+ hoverColor: Colors.white,+ ),+ ),+ ),+ Row(+ children: [+ Expanded(+ child: TabBar(+ labelColor: widget.config.iconColorSelected,+ unselectedLabelColor: widget.config.iconColor,+ controller: isEmojiSearching()+ ? TabController(length: 1, vsync: this)+ : _tabController,+ labelPadding: EdgeInsets.zero,+ indicatorColor: widget.config.indicatorColor,+ padding: const EdgeInsets.symmetric(vertical: 5.0),+ indicator: BoxDecoration(+ border: Border.all(color: Colors.transparent),+ borderRadius: BorderRadius.circular(4.0),+ color: Colors.grey.withOpacity(0.5),+ ),+ onTap: (index) {+ _pageController!.animateToPage(+ index,+ duration: widget.config.tabIndicatorAnimDuration,+ curve: Curves.ease,+ );+ },+ tabs: isEmojiSearching()+ ? [_buildCategory(Category.SEARCH, emojiSize)]+ : widget.state.categoryEmoji+ .asMap()+ .entries+ .map<Widget>((item) => _buildCategory(+ item.value.category, emojiSize))+ .toList(),+ ),+ ),+ _buildBackspaceButton(),+ ],+ ),+ Flexible(+ child: PageView.builder(+ itemCount: searchEmojiList.emoji.isNotEmpty+ ? 1+ : widget.state.categoryEmoji.length,+ controller: _pageController,+ physics: const NeverScrollableScrollPhysics(),+ // onPageChanged: (index) {+ // _tabController!.animateTo(+ // index,+ // duration: widget.config.tabIndicatorAnimDuration,+ // );+ // },+ itemBuilder: (context, index) {+ CategoryEmoji catEmoji = isEmojiSearching()+ ? searchEmojiList+ : widget.state.categoryEmoji[index];+ return _buildPage(emojiSize, catEmoji);+ },+ ),+ ),+ ],+ ),+ );+ },+ );+ }++ Widget _buildCategory(Category category, double categorySize) {+ return Tab(+ height: categorySize,+ child: Icon(+ widget.config.getIconForCategory(category),+ size: categorySize / 1.3,+ ),+ );+ }++ Widget _buildButtonWidget(+ {required VoidCallback onPressed, required Widget child}) {+ if (widget.config.buttonMode == ButtonMode.MATERIAL) {+ return TextButton(+ onPressed: onPressed,+ style: ButtonStyle(padding: MaterialStateProperty.all(EdgeInsets.zero)),+ child: child,+ );+ }+ return CupertinoButton(+ padding: EdgeInsets.zero, onPressed: onPressed, child: child);+ }++ Widget _buildPage(double emojiSize, CategoryEmoji categoryEmoji) {+ // Display notice if recent has no entries yet+ final scrollController = ScrollController();++ if (categoryEmoji.category == Category.RECENT &&+ categoryEmoji.emoji.isEmpty) {+ return _buildNoRecent();+ } else if (categoryEmoji.category == Category.SEARCH &&+ categoryEmoji.emoji.isEmpty) {+ return const Center(child: Text("No Emoji Found"));+ }+ // Build page normally+ return ScrollbarListStack(+ axis: Axis.vertical,+ controller: scrollController,+ barSize: 4.0,+ scrollbarPadding: const EdgeInsets.symmetric(horizontal: 5.0),+ handleColor: const Color(0xffDFE0E0),+ trackColor: const Color(0xffDFE0E0),+ child: ScrollConfiguration(+ behavior: ScrollConfiguration.of(context).copyWith(scrollbars: false),+ child: GridView.count(+ scrollDirection: Axis.vertical,+ physics: const ScrollPhysics(),+ controller: scrollController,+ shrinkWrap: true,+ // primary: true,+ padding: const EdgeInsets.all(0),+ crossAxisCount: widget.config.columns,+ mainAxisSpacing: widget.config.verticalSpacing,+ crossAxisSpacing: widget.config.horizontalSpacing,+ children: _categoryEmoji.emoji.isNotEmpty+ ? _categoryEmoji.emoji+ .map<Widget>((e) => _buildEmoji(emojiSize, categoryEmoji, e))+ .toList()+ : categoryEmoji.emoji+ .map<Widget>(+ (item) => _buildEmoji(emojiSize, categoryEmoji, item))+ .toList(),+ ),+ ),+ );+ }++ Widget _buildEmoji(+ double emojiSize,+ CategoryEmoji categoryEmoji,+ Emoji emoji,+ ) {+ return _buildButtonWidget(+ onPressed: () {+ widget.state.onEmojiSelected(categoryEmoji.category, emoji);+ },+ child: FittedBox(+ fit: BoxFit.fill,+ child: Text(+ emoji.emoji,+ textScaleFactor: 1.0,+ style: TextStyle(+ fontSize: emojiSize,+ backgroundColor: Colors.transparent,+ ),+ ),+ ));+ }++ Widget _buildNoRecent() {+ return Center(+ child: Text(+ widget.config.noRecentsText,+ style: widget.config.noRecentsStyle,+ textAlign: TextAlign.center,+ ));+ }+}diff --git a/frontend/app_flowy/packages/appflowy_editor_plugins/lib/src/emoji_picker/src/emoji_lists.dart b/frontend/app_flowy/packages/appflowy_editor_plugins/lib/src/emoji_picker/src/emoji_lists.dartnew file mode 100644index 0000000000..d012b0e7ca--- /dev/null+++ b/frontend/app_flowy/packages/appflowy_editor_plugins/lib/src/emoji_picker/src/emoji_lists.dart@@ -0,0 +1,3223 @@+// Copyright information+// File originally from https://github.com/JeffG05/emoji_picker++// import 'emoji.dart';++// final List<Map<String, String>> temp = [smileys, animals, foods, activities, travel, objects, symbols, flags];++// final List<Emoji> emojiSearchList = temp+// .map((element) {+// return element.entries.map<Emoji>((entry) => Emoji(entry.key, entry.value)).toList();+// })+// .toList()+// .first;++/// Map of all possible emojis along with their names in [Category.SMILEYS]+final Map<String, String> smileys = Map.fromIterables([+ 'Grinning Face',+ 'Grinning Face With Big Eyes',+ 'Grinning Face With Smiling Eyes',+ 'Beaming Face With Smiling Eyes',+ 'Grinning Squinting Face',+ 'Grinning Face With Sweat',+ 'Rolling on the Floor Laughing',+ 'Face With Tears of Joy',+ 'Slightly Smiling Face',+ 'Upside-Down Face',+ 'Winking Face',+ 'Smiling Face With Smiling Eyes',+ 'Smiling Face With Halo',+ 'Smiling Face With Hearts',+ 'Smiling Face With Heart-Eyes',+ 'Star-Struck',+ 'Face Blowing a Kiss',+ 'Kissing Face',+ 'Smiling Face',+ 'Kissing Face With Closed Eyes',+ 'Kissing Face With Smiling Eyes',+ 'Face Savoring Food',+ 'Face With Tongue',+ 'Winking Face With Tongue',+ 'Zany Face',+ 'Squinting Face With Tongue',+ 'Money-Mouth Face',+ 'Hugging Face',+ 'Face With Hand Over Mouth',+ 'Shushing Face',+ 'Thinking Face',+ 'Zipper-Mouth Face',+ 'Face With Raised Eyebrow',+ 'Neutral Face',+ 'Expressionless Face',+ 'Face Without Mouth',+ 'Smirking Face',+ 'Unamused Face',+ 'Face With Rolling Eyes',+ 'Grimacing Face',+ 'Lying Face',+ 'Relieved Face',+ 'Pensive Face',+ 'Sleepy Face',+ 'Drooling Face',+ 'Sleeping Face',+ 'Face With Medical Mask',+ 'Face With Thermometer',+ 'Face With Head-Bandage',+ 'Nauseated Face',+ 'Face Vomiting',+ 'Sneezing Face',+ 'Hot Face',+ 'Cold Face',+ 'Woozy Face',+ 'Dizzy Face',+ 'Exploding Head',+ 'Cowboy Hat Face',+ 'Partying Face',+ 'Smiling Face With Sunglasses',+ 'Nerd Face',+ 'Face With Monocle',+ 'Confused Face',+ 'Worried Face',+ 'Slightly Frowning Face',+ 'Frowning Face',+ 'Face With Open Mouth',+ 'Hushed Face',+ 'Astonished Face',+ 'Flushed Face',+ 'Pleading Face',+ 'Frowning Face With Open Mouth',+ 'Anguished Face',+ 'Fearful Face',+ 'Anxious Face With Sweat',+ 'Sad but Relieved Face',+ 'Crying Face',+ 'Loudly Crying Face',+ 'Face Screaming in Fear',+ 'Confounded Face',+ 'Persevering Face',+ 'Disappointed Face',+ 'Downcast Face With Sweat',+ 'Weary Face',+ 'Tired Face',+ 'Face With Steam From Nose',+ 'Pouting Face',+ 'Angry Face',+ 'Face With Symbols on Mouth',+ 'Smiling Face With Horns',+ 'Angry Face With Horns',+ 'Skull',+ 'Skull and Crossbones',+ 'Pile of Poo',+ 'Clown Face',+ 'Ogre',+ 'Goblin',+ 'Ghost',+ 'Alien',+ 'Alien Monster',+ 'Robot Face',+ 'Grinning Cat Face',+ 'Grinning Cat Face With Smiling Eyes',+ 'Cat Face With Tears of Joy',+ 'Smiling Cat Face With Heart-Eyes',+ 'Cat Face With Wry Smile',+ 'Kissing Cat Face',+ 'Weary Cat Face',+ 'Crying Cat Face',+ 'Pouting Cat Face',+ 'Kiss Mark',+ 'Waving Hand',+ 'Raised Back of Hand',+ 'Hand With Fingers Splayed',+ 'Raised Hand',+ 'Vulcan Salute',+ 'OK Hand',+ 'Victory Hand',+ 'Crossed Fingers',+ 'Love-You Gesture',+ 'Sign of the Horns',+ 'Call Me Hand',+ 'Backhand Index Pointing Left',+ 'Backhand Index Pointing Right',+ 'Backhand Index Pointing Up',+ 'Middle Finger',+ 'Backhand Index Pointing Down',+ 'Index Pointing Up',+ 'Thumbs Up',+ 'Thumbs Down',+ 'Raised Fist',+ 'Oncoming Fist',+ 'Left-Facing Fist',+ 'Right-Facing Fist',+ 'Clapping Hands',+ 'Raising Hands',+ 'Open Hands',+ 'Palms Up Together',+ 'Handshake',+ 'Folded Hands',+ 'Writing Hand',+ 'Nail Polish',+ 'Selfie',+ 'Flexed Biceps',+ 'Leg',+ 'Foot',+ 'Ear',+ 'Nose',+ 'Brain',+ 'Tooth',+ 'Bone',+ 'Eyes',+ 'Eye',+ 'Tongue',+ 'Mouth',+ 'Baby',+ 'Child',+ 'Boy',+ 'Girl',+ 'Person',+ 'Man',+ 'Man: Beard',+ 'Man: Blond Hair',+ 'Man: Red Hair',+ 'Man: Curly Hair',+ 'Man: White Hair',+ 'Man: Bald',+ 'Woman',+ 'Woman: Blond Hair',+ 'Woman: Red Hair',+ 'Woman: Curly Hair',+ 'Woman: White Hair',+ 'Woman: Bald',+ 'Older Person',+ 'Old Man',+ 'Old Woman',+ 'Man Frowning',+ 'Woman Frowning',+ 'Man Pouting',+ 'Woman Pouting',+ 'Man Gesturing No',+ 'Woman Gesturing No',+ 'Man Gesturing OK',+ 'Woman Gesturing OK',+ 'Man Tipping Hand',+ 'Woman Tipping Hand',+ 'Man Raising Hand',+ 'Woman Raising Hand',+ 'Man Bowing',+ 'Woman Bowing',+ 'Man Facepalming',+ 'Woman Facepalming',+ 'Man Shrugging',+ 'Woman Shrugging',+ 'Man Health Worker',+ 'Woman Health Worker',+ 'Man Student',+ 'Woman Student',+ 'Man Teacher',+ 'Woman Teacher',+ 'Man Judge',+ 'Woman Judge',+ 'Man Farmer',+ 'Woman Farmer',+ 'Man Cook',+ 'Woman Cook',+ 'Man Mechanic',+ 'Woman Mechanic',+ 'Man Factory Worker',+ 'Woman Factory Worker',+ 'Man Office Worker',+ 'Woman Office Worker',+ 'Man Scientist',+ 'Woman Scientist',+ 'Man Technologist',+ 'Woman Technologist',+ 'Man Singer',+ 'Woman Singer',+ 'Man Artist',+ 'Woman Artist',+ 'Man Pilot',+ 'Woman Pilot',+ 'Man Astronaut',+ 'Woman Astronaut',+ 'Man Firefighter',+ 'Woman Firefighter',+ 'Man Police Officer',+ 'Woman Police Officer',+ 'Man Detective',+ 'Woman Detective',+ 'Man Guard',+ 'Woman Guard',+ 'Man Construction Worker',+ 'Woman Construction Worker',+ 'Prince',+ 'Princess',+ 'Man Wearing Turban',+ 'Woman Wearing Turban',+ 'Man With Chinese Cap',+ 'Woman With Headscarf',+ 'Man in Tuxedo',+ 'Bride With Veil',+ 'Pregnant Woman',+ 'Breast-Feeding',+ 'Baby Angel',+ 'Santa Claus',+ 'Mrs. Claus',+ 'Man Superhero',+ 'Woman Superhero',+ 'Man Supervillain',+ 'Woman Supervillain',+ 'Man Mage',+ 'Woman Mage',+ 'Man Fairy',+ 'Woman Fairy',+ 'Man Vampire',+ 'Woman Vampire',+ 'Merman',+ 'Mermaid',+ 'Man Elf',+ 'Woman Elf',+ 'Man Genie',+ 'Woman Genie',+ 'Man Zombie',+ 'Woman Zombie',+ 'Man Getting Massage',+ 'Woman Getting Massage',+ 'Man Getting Haircut',+ 'Woman Getting Haircut',+ 'Man Walking',+ 'Woman Walking',+ 'Man Running',+ 'Woman Running',+ 'Woman Dancing',+ 'Man Dancing',+ 'Man in Suit Levitating',+ 'Men With Bunny Ears',+ 'Women With Bunny Ears',+ 'Man in Steamy Room',+ 'Woman in Steamy Room',+ 'Person in Lotus Position',+ 'Women Holding Hands',+ 'Woman and Man Holding Hands',+ 'Men Holding Hands',+ 'Kiss',+ 'Kiss: Man, Man',+ 'Kiss: Woman, Woman',+ 'Couple With Heart',+ 'Couple With Heart: Man, Man',+ 'Couple With Heart: Woman, Woman',+ 'Family',+ 'Family: Man, Woman, Boy',+ 'Family: Man, Woman, Girl',+ 'Family: Man, Woman, Girl, Boy',+ 'Family: Man, Woman, Boy, Boy',+ 'Family: Man, Woman, Girl, Girl',+ 'Family: Man, Man, Boy',+ 'Family: Man, Man, Girl',+ 'Family: Man, Man, Girl, Boy',+ 'Family: Man, Man, Boy, Boy',+ 'Family: Man, Man, Girl, Girl',+ 'Family: Woman, Woman, Boy',+ 'Family: Woman, Woman, Girl',+ 'Family: Woman, Woman, Girl, Boy',+ 'Family: Woman, Woman, Boy, Boy',+ 'Family: Woman, Woman, Girl, Girl',+ 'Family: Man, Boy',+ 'Family: Man, Boy, Boy',+ 'Family: Man, Girl',+ 'Family: Man, Girl, Boy',+ 'Family: Man, Girl, Girl',+ 'Family: Woman, Boy',+ 'Family: Woman, Boy, Boy',+ 'Family: Woman, Girl',+ 'Family: Woman, Girl, Boy',+ 'Family: Woman, Girl, Girl',+ 'Speaking Head',+ 'Bust in Silhouette',+ 'Busts in Silhouette',+ 'Footprints',+ 'Luggage',+ 'Closed Umbrella',+ 'Umbrella',+ 'Thread',+ 'Yarn',+ 'Glasses',+ 'Sunglasses',+ 'Goggles',+ 'Lab Coat',+ 'Necktie',+ 'T-Shirt',+ 'Jeans',+ 'Scarf',+ 'Gloves',+ 'Coat',+ 'Socks',+ 'Dress',+ 'Kimono',+ 'Bikini',+ 'Womanโs Clothes',+ 'Purse',+ 'Handbag',+ 'Clutch Bag',+ 'Backpack',+ 'Manโs Shoe',+ 'Running Shoe',+ 'Hiking Boot',+ 'Flat Shoe',+ 'High-Heeled Shoe',+ 'Womanโs Sandal',+ 'Womanโs Boot',+ 'Crown',+ 'Womanโs Hat',+ 'Top Hat',+ 'Graduation Cap',+ 'Billed Cap',+ 'Rescue Workerโs Helmet',+ 'Lipstick',+ 'Ring',+ 'Briefcase'+], [+ '๐',+ '๐',+ '๐',+ '๐',+ '๐',+ '๐ ',+ '๐คฃ',+ '๐',+ '๐',+ '๐',+ '๐',+ '๐',+ '๐',+ '๐ฅฐ',+ '๐',+ '๐คฉ',+ '๐',+ '๐',+ 'โบ',+ '๐',+ '๐',+ '๐',+ '๐',+ '๐',+ '๐คช',+ '๐',+ '๐ค',+ '๐ค',+ '๐คญ',+ '๐คซ',+ '๐ค',+ '๐ค',+ '๐คจ',+ '๐',+ '๐',+ '๐ถ',+ '๐',+ '๐',+ '๐',+ '๐ฌ',+ '๐คฅ',+ '๐',+ '๐',+ '๐ช',+ '๐คค',+ '๐ด',+ '๐ท',+ '๐ค',+ '๐ค',+ '๐คข',+ '๐คฎ',+ '๐คง',+ '๐ฅต',+ '๐ฅถ',+ '๐ฅด',+ '๐ต',+ '๐คฏ',+ '๐ค ',+ '๐ฅณ',+ '๐',+ '๐ค',+ '๐ง',+ '๐',+ '๐',+ '๐',+ 'โน๏ธ',+ '๐ฎ',+ '๐ฏ',+ '๐ฒ',+ '๐ณ',+ '๐ฅบ',+ '๐ฆ',+ '๐ง',+ '๐จ',+ '๐ฐ',+ '๐ฅ',+ '๐ข',+ '๐ญ',+ '๐ฑ',+ '๐',+ '๐ฃ',+ '๐',+ '๐',+ '๐ฉ',+ '๐ซ',+ '๐ค',+ '๐ก',+ '๐ ',+ '๐คฌ',+ '๐',+ '๐ฟ',+ '๐',+ 'โ ',+ '๐ฉ',+ '๐คก',+ '๐น',+ '๐บ',+ '๐ป',+ '๐ฝ',+ '๐พ',+ '๐ค',+ '๐บ',+ '๐ธ',+ '๐น',+ '๐ป',+ '๐ผ',+ '๐ฝ',+ '๐',+ '๐ฟ',+ '๐พ',+ '๐',+ '๐',+ '๐ค',+ '๐',+ 'โ',+ '๐',+ '๐',+ 'โ',+ '๐ค',+ '๐ค',+ '๐ค',+ '๐ค',+ '๐',+ '๐',+ '๐',+ '๐',+ '๐',+ 'โ',+ '๐',+ '๐',+ 'โ',+ '๐',+ '๐ค',+ '๐ค',+ '๐',+ '๐',+ '๐',+ '๐คฒ',+ '๐ค',+ '๐',+ 'โ',+ '๐ ',+ '๐คณ',+ '๐ช',+ '๐ฆต',+ '๐ฆถ',+ '๐',+ '๐',+ '๐ง ',+ '๐ฆท',+ '๐ฆด',+ '๐',+ '๐',+ '๐ ',+ '๐',+ '๐ถ',+ '๐ง',+ '๐ฆ',+ '๐ง',+ '๐ง',+ '๐จ',+ '๐ง',+ '๐ฑ',+ '๐จโ๐ฆฐ',+ '๐จโ๐ฆฑ',+ '๐จโ๐ฆณ',+ '๐จโ๐ฆฒ',+ '๐ฉ',+ '๐ฑ',+ '๐ฉโ๐ฆฐ',+ '๐ฉโ๐ฆฑ',+ '๐ฉโ๐ฆณ',+ '๐ฉโ๐ฆฒ',+ '๐ง',+ '๐ด',+ '๐ต',+ '๐',+ '๐',+ '๐',+ '๐',+ '๐ ',+ '๐ ',+ '๐',+ '๐',+ '๐',+ '๐',+ '๐',+ '๐',+ '๐',+ '๐',+ '๐คฆ',+ '๐คฆ',+ '๐คท',+ '๐คท',+ '๐จโโ๏ธ',+ '๐ฉโโ๏ธ',+ '๐จโ๐',+ '๐ฉโ๐',+ '๐จโ๐ซ',+ '๐ฉโ๐ซ',+ '๐จโโ๏ธ',+ '๐ฉโโ๏ธ',+ '๐จโ๐พ',+ '๐ฉโ๐พ',+ '๐จโ๐ณ',+ '๐ฉโ๐ณ',+ '๐จโ๐ง',+ '๐ฉโ๐ง',+ '๐จโ๐ญ',+ '๐ฉโ๐ญ',+ '๐จโ๐ผ',+ '๐ฉโ๐ผ',+ '๐จโ๐ฌ',+ '๐ฉโ๐ฌ',+ '๐จโ๐ป',+ '๐ฉโ๐ป',+ '๐จโ๐ค',+ '๐ฉโ๐ค',+ '๐จโ๐จ',+ '๐ฉโ๐จ',+ '๐จโโ๏ธ',+ '๐ฉโโ๏ธ',+ '๐จโ๐',+ '๐ฉโ๐',+ '๐จโ๐',+ '๐ฉโ๐',+ '๐ฎ',+ '๐ฎ',+ '๐ต๏ธ',+ '๐ต๏ธ',+ '๐',+ '๐',+ '๐ท',+ '๐ท',+ '๐คด',+ '๐ธ',+ '๐ณ',+ '๐ณ',+ '๐ฒ',+ '๐ง',+ '๐คต',+ '๐ฐ',+ '๐คฐ',+ '๐คฑ',+ '๐ผ',+ '๐ ',+ '๐คถ',+ '๐ฆธ',+ '๐ฆธ',+ '๐ฆน',+ '๐ฆน',+ '๐ง',+ '๐ง',+ '๐ง',+ '๐ง',+ '๐ง',+ '๐ง',+ '๐ง',+ '๐ง',+ '๐ง',+ '๐ง',+ '๐ง',+ '๐ง',+ '๐ง',+ '๐ง',+ '๐',+ '๐',+ '๐',+ '๐',+ '๐ถ',+ '๐ถ',+ '๐',+ '๐',+ '๐',+ '๐บ',+ '๐ด',+ '๐ฏ',+ '๐ฏ',+ '๐ง',+ '๐ง',+ '๐ง',+ '๐ญ',+ '๐ซ',+ '๐ฌ',+ '๐',+ '๐จโโค๏ธโ๐โ๐จ',+ '๐ฉโโค๏ธโ๐โ๐ฉ',+ '๐',+ '๐จโโค๏ธโ๐จ',+ '๐ฉโโค๏ธโ๐ฉ',+ '๐ช',+ '๐จโ๐ฉโ๐ฆ',+ '๐จโ๐ฉโ๐ง',+ '๐จโ๐ฉโ๐งโ๐ฆ',+ '๐จโ๐ฉโ๐ฆโ๐ฆ',+ '๐จโ๐ฉโ๐งโ๐ง',+ '๐จโ๐จโ๐ฆ',+ '๐จโ๐จโ๐ง',+ '๐จโ๐จโ๐งโ๐ฆ',+ '๐จโ๐จโ๐ฆโ๐ฆ',+ '๐จโ๐จโ๐งโ๐ง',+ '๐ฉโ๐ฉโ๐ฆ',+ '๐ฉโ๐ฉโ๐ง',+ '๐ฉโ๐ฉโ๐งโ๐ฆ',+ '๐ฉโ๐ฉโ๐ฆโ๐ฆ',+ '๐ฉโ๐ฉโ๐งโ๐ง',+ '๐จโ๐ฆ',+ '๐จโ๐ฆโ๐ฆ',+ '๐จโ๐ง',+ '๐จโ๐งโ๐ฆ',+ '๐จโ๐งโ๐ง',+ '๐ฉโ๐ฆ',+ '๐ฉโ๐ฆโ๐ฆ',+ '๐ฉโ๐ง',+ '๐ฉโ๐งโ๐ฆ',+ '๐ฉโ๐งโ๐ง',+ '๐ฃ',+ '๐ค',+ '๐ฅ',+ '๐ฃ',+ '๐งณ',+ '๐',+ 'โ',+ '๐งต',+ '๐งถ',+ '๐',+ '๐ถ',+ '๐ฅฝ',+ '๐ฅผ',+ '๐',+ '๐',+ '๐',+ '๐งฃ',+ '๐งค',+ '๐งฅ',+ '๐งฆ',+ '๐',+ '๐',+ '๐',+ '๐',+ '๐',+ '๐',+ '๐',+ '๐',+ '๐',+ '๐',+ '๐ฅพ',+ '๐ฅฟ',+ '๐ ',+ '๐ก',+ '๐ข',+ '๐',+ '๐',+ '๐ฉ',+ '๐',+ '๐งข',+ 'โ',+ '๐',+ '๐',+ '๐ผ'+]);++/// Map of all possible emojis along with their names in [Category.ANIMALS]+final Map<String, String> animals = Map.fromIterables([+ 'Dog Face',+ 'Cat Face',+ 'Mouse Face',+ 'Hamster Face',+ 'Rabbit Face',+ 'Fox Face',+ 'Bear Face',+ 'Panda Face',+ 'Koala Face',+ 'Tiger Face',+ 'Lion Face',+ 'Cow Face',+ 'Pig Face',+ 'Pig Nose',+ 'Frog Face',+ 'Monkey Face',+ 'See-No-Evil Monkey',+ 'Hear-No-Evil Monkey',+ 'Speak-No-Evil Monkey',+ 'Monkey',+ 'Collision',+ 'Dizzy',+ 'Sweat Droplets',+ 'Dashing Away',+ 'Gorilla',+ 'Dog',+ 'Poodle',+ 'Wolf Face',+ 'Raccoon',+ 'Cat',+ 'Tiger',+ 'Leopard',+ 'Horse Face',+ 'Horse',+ 'Unicorn Face',+ 'Zebra',+ 'Ox',+ 'Water Buffalo',+ 'Cow',+ 'Pig',+ 'Boar',+ 'Ram',+ 'Ewe',+ 'Goat',+ 'Camel',+ 'Two-Hump Camel',+ 'Llama',+ 'Giraffe',+ 'Elephant',+ 'Rhinoceros',+ 'Hippopotamus',+ 'Mouse',+ 'Rat',+ 'Rabbit',+ 'Chipmunk',+ 'Hedgehog',+ 'Bat',+ 'Kangaroo',+ 'Badger',+ 'Paw Prints',+ 'Turkey',+ 'Chicken',+ 'Rooster',+ 'Hatching Chick',+ 'Baby Chick',+ 'Front-Facing Baby Chick',+ 'Bird',+ 'Penguin',+ 'Dove',+ 'Eagle',+ 'Duck',+ 'Swan',+ 'Owl',+ 'Peacock',+ 'Parrot',+ 'Crocodile',+ 'Turtle',+ 'Lizard',+ 'Snake',+ 'Dragon Face',+ 'Dragon',+ 'Sauropod',+ 'T-Rex',+ 'Spouting Whale',+ 'Whale',+ 'Dolphin',+ 'Fish',+ 'Tropical Fish',+ 'Blowfish',+ 'Shark',+ 'Octopus',+ 'Spiral Shell',+ 'Snail',+ 'Butterfly',+ 'Bug',+ 'Ant',+ 'Honeybee',+ 'Lady Beetle',+ 'Cricket',+ 'Spider',+ 'Spider Web',+ 'Scorpion',+ 'Mosquito',+ 'Microbe',+ 'Bouquet',+ 'Cherry Blossom',+ 'White Flower',+ 'Rosette',+ 'Rose',+ 'Wilted Flower',+ 'Hibiscus',+ 'Sunflower',+ 'Blossom',+ 'Tulip',+ 'Seedling',+ 'Evergreen Tree',+ 'Deciduous Tree',+ 'Palm Tree',+ 'Cactus',+ 'Sheaf of Rice',+ 'Herb',+ 'Shamrock',+ 'Four Leaf Clover',+ 'Maple Leaf',+ 'Fallen Leaf',+ 'Leaf Fluttering in Wind',+ 'Mushroom',+ 'Chestnut',+ 'Crab',+ 'Lobster',+ 'Shrimp',+ 'Squid',+ 'Globe Showing Europe-Africa',+ 'Globe Showing Americas',+ 'Globe Showing Asia-Australia',+ 'Globe With Meridians',+ 'New Moon',+ 'Waxing Crescent Moon',+ 'First Quarter Moon',+ 'Waxing Gibbous Moon',+ 'Full Moon',+ 'Waning Gibbous Moon',+ 'Last Quarter Moon',+ 'Waning Crescent Moon',+ 'Crescent Moon',+ 'New Moon Face',+ 'First Quarter Moon Face',+ 'Last Quarter Moon Face',+ 'Sun',+ 'Full Moon Face',+ 'Sun With Face',+ 'Star',+ 'Glowing Star',+ 'Shooting Star',+ 'Cloud',+ 'Sun Behind Cloud',+ 'Cloud With Lightning and Rain',+ 'Sun Behind Small Cloud',+ 'Sun Behind Large Cloud',+ 'Sun Behind Rain Cloud',+ 'Cloud With Rain',+ 'Cloud With Snow',+ 'Cloud With Lightning',+ 'Tornado',+ 'Fog',+ 'Wind Face',+ 'Rainbow',+ 'Umbrella',+ 'Umbrella With Rain Drops',+ 'High Voltage',+ 'Snowflake',+ 'Snowman Without Snow',+ 'Snowman',+ 'Comet',+ 'Fire',+ 'Droplet',+ 'Water Wave',+ 'Christmas Tree',+ 'Sparkles',+ 'Tanabata Tree',+ 'Pine Decoration'+], [+ '๐ถ',+ '๐ฑ',+ '๐ญ',+ '๐น',+ '๐ฐ',+ '๐ฆ',+ '๐ป',+ '๐ผ',+ '๐จ',+ '๐ฏ',+ '๐ฆ',+ '๐ฎ',+ '๐ท',+ '๐ฝ',+ '๐ธ',+ '๐ต',+ '๐',+ '๐',+ '๐',+ '๐',+ '๐ฅ',+ '๐ซ',+ '๐ฆ',+ '๐จ',+ '๐ฆ',+ '๐',+ '๐ฉ',+ '๐บ',+ '๐ฆ',+ '๐',+ '๐ ',+ '๐',+ '๐ด',+ '๐',+ '๐ฆ',+ '๐ฆ',+ '๐',+ '๐',+ '๐',+ '๐',+ '๐',+ '๐',+ '๐',+ '๐',+ '๐ช',+ '๐ซ',+ '๐ฆ',+ '๐ฆ',+ '๐',+ '๐ฆ',+ '๐ฆ',+ '๐',+ '๐',+ '๐',+ '๐ฟ',+ '๐ฆ',+ '๐ฆ',+ '๐ฆ',+ '๐ฆก',+ '๐พ',+ '๐ฆ',+ '๐',+ '๐',+ '๐ฃ',+ '๐ค',+ '๐ฅ',+ '๐ฆ',+ '๐ง',+ '๐',+ '๐ฆ ',+ '๐ฆ',+ '๐ฆข',+ '๐ฆ',+ '๐ฆ',+ '๐ฆ',+ '๐',+ '๐ข',+ '๐ฆ',+ '๐',+ '๐ฒ',+ '๐',+ '๐ฆ',+ '๐ฆ',+ '๐ณ',+ '๐',+ '๐ฌ',+ '๐',+ '๐ ',+ '๐ก',+ '๐ฆ',+ '๐',+ '๐',+ '๐',+ '๐ฆ',+ '๐',+ '๐',+ '๐',+ '๐',+ '๐ฆ',+ '๐ท',+ '๐ธ',+ '๐ฆ',+ '๐ฆ',+ '๐ฆ ',+ '๐',+ '๐ธ',+ '๐ฎ',+ '๐ต',+ '๐น',+ '๐ฅ',+ '๐บ',+ '๐ป',+ '๐ผ',+ '๐ท',+ '๐ฑ',+ '๐ฒ',+ '๐ณ',+ '๐ด',+ '๐ต',+ '๐พ',+ '๐ฟ',+ 'โ',+ '๐',+ '๐',+ '๐',+ '๐',+ '๐',+ '๐ฐ',+ '๐ฆ',+ '๐ฆ',+ '๐ฆ',+ '๐ฆ',+ '๐',+ '๐',+ '๐',+ '๐',+ '๐',+ '๐',+ '๐',+ '๐',+ '๐',+ '๐',+ '๐',+ '๐',+ '๐',+ '๐',+ '๐',+ '๐',+ 'โ',+ '๐',+ '๐',+ 'โญ',+ '๐',+ '๐ ',+ 'โ',+ 'โ ',+ 'โ',+ '๐ค',+ '๐ฅ',+ '๐ฆ',+ '๐ง',+ '๐จ',+ '๐ฉ',+ '๐ช',+ '๐ซ',+ '๐ฌ',+ '๐',+ 'โ',+ 'โ',+ 'โก',+ 'โ',+ 'โ',+ 'โ',+ 'โ',+ '๐ฅ',+ '๐ง',+ '๐',+ '๐',+ 'โจ',+ '๐',+ '๐'+]);++/// Map of all possible emojis along with their names in [Category.FOODS]+final Map<String, String> foods = Map.fromIterables([+ 'Grapes',+ 'Melon',+ 'Watermelon',+ 'Tangerine',+ 'Lemon',+ 'Banana',+ 'Pineapple',+ 'Mango',+ 'Red Apple',+ 'Green Apple',+ 'Pear',+ 'Peach',+ 'Cherries',+ 'Strawberry',+ 'Kiwi Fruit',+ 'Tomato',+ 'Coconut',+ 'Avocado',+ 'Eggplant',+ 'Potato',+ 'Carrot',+ 'Ear of Corn',+ 'Hot Pepper',+ 'Cucumber',+ 'Leafy Green',+ 'Broccoli',+ 'Mushroom',+ 'Peanuts',+ 'Chestnut',+ 'Bread',+ 'Croissant',+ 'Baguette Bread',+ 'Pretzel',+ 'Bagel',+ 'Pancakes',+ 'Cheese Wedge',+ 'Meat on Bone',+ 'Poultry Leg',+ 'Cut of Meat',+ 'Bacon',+ 'Hamburger',+ 'French Fries',+ 'Pizza',+ 'Hot Dog',+ 'Sandwich',+ 'Taco',+ 'Burrito',+ 'Stuffed Flatbread',+ 'Cooking',+ 'Shallow Pan of Food',+ 'Pot of Food',+ 'Bowl With Spoon',+ 'Green Salad',+ 'Popcorn',+ 'Salt',+ 'Canned Food',+ 'Bento Box',+ 'Rice Cracker',+ 'Rice Ball',+ 'Cooked Rice',+ 'Curry Rice',+ 'Steaming Bowl',+ 'Spaghetti',+ 'Roasted Sweet Potato',+ 'Oden',+ 'Sushi',+ 'Fried Shrimp',+ 'Fish Cake With Swirl',+ 'Moon Cake',+ 'Dango',+ 'Dumpling',+ 'Fortune Cookie',+ 'Takeout Box',+ 'Soft Ice Cream',+ 'Shaved Ice',+ 'Ice Cream',+ 'Doughnut',+ 'Cookie',+ 'Birthday Cake',+ 'Shortcake',+ 'Cupcake',+ 'Pie',+ 'Chocolate Bar',+ 'Candy',+ 'Lollipop',+ 'Custard',+ 'Honey Pot',+ 'Baby Bottle',+ 'Glass of Milk',+ 'Hot Beverage',+ 'Teacup Without Handle',+ 'Sake',+ 'Bottle With Popping Cork',+ 'Wine Glass',+ 'Cocktail Glass',+ 'Tropical Drink',+ 'Beer Mug',+ 'Clinking Beer Mugs',+ 'Clinking Glasses',+ 'Tumbler Glass',+ 'Cup With Straw',+ 'Chopsticks',+ 'Fork and Knife With Plate',+ 'Fork and Knife',+ 'Spoon'+], [+ '๐',+ '๐',+ '๐',+ '๐',+ '๐',+ '๐',+ '๐',+ '๐ฅญ',+ '๐',+ '๐',+ '๐',+ '๐',+ '๐',+ '๐',+ '๐ฅ',+ '๐ ',+ '๐ฅฅ',+ '๐ฅ',+ '๐',+ '๐ฅ',+ '๐ฅ',+ '๐ฝ',+ '๐ถ',+ '๐ฅ',+ '๐ฅฌ',+ '๐ฅฆ',+ '๐',+ '๐ฅ',+ '๐ฐ',+ '๐',+ '๐ฅ',+ '๐ฅ',+ '๐ฅจ',+ '๐ฅฏ',+ '๐ฅ',+ '๐ง',+ '๐',+ '๐',+ '๐ฅฉ',+ '๐ฅ',+ '๐',+ '๐',+ '๐',+ '๐ญ',+ '๐ฅช',+ '๐ฎ',+ '๐ฏ',+ '๐ฅ',+ '๐ณ',+ '๐ฅ',+ '๐ฒ',+ '๐ฅฃ',+ '๐ฅ',+ '๐ฟ',+ '๐ง',+ '๐ฅซ',+ '๐ฑ',+ '๐',+ '๐',+ '๐',+ '๐',+ '๐',+ '๐',+ '๐ ',+ '๐ข',+ '๐ฃ',+ '๐ค',+ '๐ฅ',+ '๐ฅฎ',+ '๐ก',+ '๐ฅ',+ '๐ฅ ',+ '๐ฅก',+ '๐ฆ',+ '๐ง',+ '๐จ',+ '๐ฉ',+ '๐ช',+ '๐',+ '๐ฐ',+ '๐ง',+ '๐ฅง',+ '๐ซ',+ '๐ฌ',+ '๐ญ',+ '๐ฎ',+ '๐ฏ',+ '๐ผ',+ '๐ฅ',+ 'โ',+ '๐ต',+ '๐ถ',+ '๐พ',+ '๐ท',+ '๐ธ',+ '๐น',+ '๐บ',+ '๐ป',+ '๐ฅ',+ '๐ฅ',+ '๐ฅค',+ '๐ฅข',+ '๐ฝ',+ '๐ด',+ '๐ฅ'+]);++/// Map of all possible emojis along with their names in [Category.TRAVEL]+final Map<String, String> travel = Map.fromIterables([+ 'Person Rowing Boat',+ 'Map of Japan',+ 'Snow-Capped Mountain',+ 'Mountain',+ 'Volcano',+ 'Mount Fuji',+ 'Camping',+ 'Beach With Umbrella',+ 'Desert',+ 'Desert Island',+ 'National Park',+ 'Stadium',+ 'Classical Building',+ 'Building Construction',+ 'Houses',+ 'Derelict House',+ 'House',+ 'House With Garden',+ 'Office Building',+ 'Japanese Post Office',+ 'Post Office',+ 'Hospital',+ 'Bank',+ 'Hotel',+ 'Love Hotel',+ 'Convenience Store',+ 'School',+ 'Department Store',+ 'Factory',+ 'Japanese Castle',+ 'Castle',+ 'Wedding',+ 'Tokyo Tower',+ 'Statue of Liberty',+ 'Church',+ 'Mosque',+ 'Synagogue',+ 'Shinto Shrine',+ 'Kaaba',+ 'Fountain',+ 'Tent',+ 'Foggy',+ 'Night With Stars',+ 'Cityscape',+ 'Sunrise Over Mountains',+ 'Sunrise',+ 'Cityscape at Dusk',+ 'Sunset',+ 'Bridge at Night',+ 'Carousel Horse',+ 'Ferris Wheel',+ 'Roller Coaster',+ 'Locomotive',+ 'Railway Car',+ 'High-Speed Train',+ 'Bullet Train',+ 'Train',+ 'Metro',+ 'Light Rail',+ 'Station',+ 'Tram',+ 'Monorail',+ 'Mountain Railway',+ 'Tram Car',+ 'Bus',+ 'Oncoming Bus',+ 'Trolleybus',+ 'Minibus',+ 'Ambulance',+ 'Fire Engine',+ 'Police Car',+ 'Oncoming Police Car',+ 'Taxi',+ 'Oncoming Taxi',+ 'Automobile',+ 'Oncoming Automobile',+ 'Delivery Truck',+ 'Articulated Lorry',+ 'Tractor',+ 'Racing Car',+ 'Motorcycle',+ 'Motor Scooter',+ 'Bicycle',+ 'Kick Scooter',+ 'Bus Stop',+ 'Railway Track',+ 'Fuel Pump',+ 'Police Car Light',+ 'Horizontal Traffic Light',+ 'Vertical Traffic Light',+ 'Construction',+ 'Anchor',+ 'Sailboat',+ 'Speedboat',+ 'Passenger Ship',+ 'Ferry',+ 'Motor Boat',+ 'Ship',+ 'Airplane',+ 'Small Airplane',+ 'Airplane Departure',+ 'Airplane Arrival',+ 'Seat',+ 'Helicopter',+ 'Suspension Railway',+ 'Mountain Cableway',+ 'Aerial Tramway',+ 'Satellite',+ 'Rocket',+ 'Flying Saucer',+ 'Shooting Star',+ 'Milky Way',+ 'Umbrella on Ground',+ 'Fireworks',+ 'Sparkler',+ 'Moon Viewing Ceremony',+ 'Yen Banknote',+ 'Dollar Banknote',+ 'Euro Banknote',+ 'Pound Banknote',+ 'Moai',+ 'Passport Control',+ 'Customs',+ 'Baggage Claim',+ 'Left Luggage'+], [+ '๐ฃ',+ '๐พ',+ '๐',+ 'โฐ',+ '๐',+ '๐ป',+ '๐',+ '๐',+ '๐',+ '๐',+ '๐',+ '๐',+ '๐',+ '๐',+ '๐',+ '๐',+ '๐ ',+ '๐ก',+ '๐ข',+ '๐ฃ',+ '๐ค',+ '๐ฅ',+ '๐ฆ',+ '๐จ',+ '๐ฉ',+ '๐ช',+ '๐ซ',+ '๐ฌ',+ '๐ญ',+ '๐ฏ',+ '๐ฐ',+ '๐',+ '๐ผ',+ '๐ฝ',+ 'โช',+ '๐',+ '๐',+ 'โฉ',+ '๐',+ 'โฒ',+ 'โบ',+ '๐',+ '๐',+ '๐',+ '๐',+ '๐ ',+ '๐',+ '๐',+ '๐',+ '๐ ',+ '๐ก',+ '๐ข',+ '๐',+ '๐',+ '๐',+ '๐ ',+ '๐',+ '๐',+ '๐',+ '๐',+ '๐',+ '๐',+ '๐',+ '๐',+ '๐',+ '๐',+ '๐',+ '๐',+ '๐',+ '๐',+ '๐',+ '๐',+ '๐',+ '๐',+ '๐',+ '๐',+ '๐',+ '๐',+ '๐',+ '๐',+ '๐',+ '๐ต',+ '๐ฒ',+ '๐ด',+ '๐',+ '๐ค',+ 'โฝ',+ '๐จ',+ '๐ฅ',+ '๐ฆ',+ '๐ง',+ 'โ',+ 'โต',+ '๐ค',+ '๐ณ',+ 'โด',+ '๐ฅ',+ '๐ข',+ 'โ',+ '๐ฉ',+ '๐ซ',+ '๐ฌ',+ '๐บ',+ '๐',+ '๐',+ '๐ ',+ '๐ก',+ '๐ฐ',+ '๐',+ '๐ธ',+ '๐ ',+ '๐',+ 'โฑ',+ '๐',+ '๐',+ '๐',+ '๐ด',+ '๐ต',+ '๐ถ',+ '๐ท',+ '๐ฟ',+ '๐',+ '๐',+ '๐',+ '๐ '+]);++/// Map of all possible emojis along with their names in [Category.ACTIVITIES]+final Map<String, String> activities = Map.fromIterables([+ 'Man in Suit Levitating',+ 'Man Climbing',+ 'Woman Climbing',+ 'Horse Racing',+ 'Skier',+ 'Snowboarder',+ 'Man Golfing',+ 'Woman Golfing',+ 'Man Surfing',+ 'Woman Surfing',+ 'Man Rowing Boat',+ 'Woman Rowing Boat',+ 'Man Swimming',+ 'Woman Swimming',+ 'Man Bouncing Ball',+ 'Woman Bouncing Ball',+ 'Man Lifting Weights',+ 'Woman Lifting Weights',+ 'Man Biking',+ 'Woman Biking',+ 'Man Mountain Biking',+ 'Woman Mountain Biking',+ 'Man Cartwheeling',+ 'Woman Cartwheeling',+ 'Men Wrestling',+ 'Women Wrestling',+ 'Man Playing Water Polo',+ 'Woman Playing Water Polo',+ 'Man Playing Handball',+ 'Woman Playing Handball',+ 'Man Juggling',+ 'Woman Juggling',+ 'Man in Lotus Position',+ 'Woman in Lotus Position',+ 'Circus Tent',+ 'Skateboard',+ 'Reminder Ribbon',+ 'Admission Tickets',+ 'Ticket',+ 'Military Medal',+ 'Trophy',+ 'Sports Medal',+ '1st Place Medal',+ '2nd Place Medal',+ '3rd Place Medal',+ 'Soccer Ball',+ 'Baseball',+ 'Softball',+ 'Basketball',+ 'Volleyball',+ 'American Football',+ 'Rugby Football',+ 'Tennis',+ 'Flying Disc',+ 'Bowling',+ 'Cricket Game',+ 'FieldPB Hockey',+ 'Ice Hockey',+ 'Lacrosse',+ 'Ping Pong',+ 'Badminton',+ 'Boxing Glove',+ 'Martial Arts Uniform',+ 'Flag in Hole',+ 'Ice Skate',+ 'Fishing Pole',+ 'Running Shirt',+ 'Skis',+ 'Sled',+ 'Curling Stone',+ 'Direct Hit',+ 'Pool 8 Ball',+ 'Video Game',+ 'Slot Machine',+ 'Game Die',+ 'Jigsaw',+ 'Chess Pawn',+ 'Performing Arts',+ 'Artist Palette',+ 'Thread',+ 'Yarn',+ 'Musical Score',+ 'Microphone',+ 'Headphone',+ 'Saxophone',+ 'Guitar',+ 'Musical Keyboard',+ 'Trumpet',+ 'Violin',+ 'Drum',+ 'Clapper Board',+ 'Bow and Arrow'+], [+ '๐ด',+ '๐ง',+ '๐ง',+ '๐',+ 'โท',+ '๐',+ '๐๏ธ',+ '๐๏ธ',+ '๐',+ '๐',+ '๐ฃ',+ '๐ฃ',+ '๐',+ '๐',+ 'โน๏ธ',+ 'โน๏ธ',+ '๐๏ธ',+ '๐๏ธ',+ '๐ด',+ '๐ด',+ '๐ต',+ '๐ต',+ '๐คธ',+ '๐คธ',+ '๐คผ',+ '๐คผ',+ '๐คฝ',+ '๐คฝ',+ '๐คพ',+ '๐คพ',+ '๐คน',+ '๐คน',+ '๐ง๐ปโโ๏ธ',+ '๐ง๐ปโโ๏ธ',+ '๐ช',+ '๐น',+ '๐',+ '๐',+ '๐ซ',+ '๐',+ '๐',+ '๐ ',+ '๐ฅ',+ '๐ฅ',+ '๐ฅ',+ 'โฝ',+ 'โพ',+ '๐ฅ',+ '๐',+ '๐',+ '๐',+ '๐',+ '๐พ',+ '๐ฅ',+ '๐ณ',+ '๐',+ '๐',+ '๐',+ '๐ฅ',+ '๐',+ '๐ธ',+ '๐ฅ',+ '๐ฅ',+ 'โณ',+ 'โธ',+ '๐ฃ',+ '๐ฝ',+ '๐ฟ',+ '๐ท',+ '๐ฅ',+ '๐ฏ',+ '๐ฑ',+ '๐ฎ',+ '๐ฐ',+ '๐ฒ',+ '๐งฉ',+ 'โ',+ '๐ญ',+ '๐จ',+ '๐งต',+ '๐งถ',+ '๐ผ',+ '๐ค',+ '๐ง',+ '๐ท',+ '๐ธ',+ '๐น',+ '๐บ',+ '๐ป',+ '๐ฅ',+ '๐ฌ',+ '๐น'+]);++/// Map of all possible emojis along with their names in [Category.OBJECTS]+final Map<String, String> objects = Map.fromIterables([+ 'Love Letter',+ 'Hole',+ 'Bomb',+ 'Person Taking Bath',+ 'Person in Bed',+ 'Kitchen Knife',+ 'Amphora',+ 'World Map',+ 'Compass',+ 'Brick',+ 'Barber Pole',+ 'Oil Drum',+ 'Bellhop Bell',+ 'Luggage',+ 'Hourglass Done',+ 'Hourglass Not Done',+ 'Watch',+ 'Alarm Clock',+ 'Stopwatch',+ 'Timer Clock',+ 'Mantelpiece Clock',+ 'Thermometer',+ 'Umbrella on Ground',+ 'Firecracker',+ 'Balloon',+ 'Party Popper',+ 'Confetti Ball',+ 'Japanese Dolls',+ 'Carp Streamer',+ 'Wind Chime',+ 'Red Envelope',+ 'Ribbon',+ 'Wrapped Gift',+ 'Crystal Ball',+ 'Nazar Amulet',+ 'Joystick',+ 'Teddy Bear',+ 'Framed Picture',+ 'Thread',+ 'Yarn',+ 'Shopping Bags',+ 'Prayer Beads',+ 'Gem Stone',+ 'Postal Horn',+ 'Studio Microphone',+ 'Level Slider',+ 'Control Knobs',+ 'Radio',+ 'Mobile Phone',+ 'Mobile Phone With Arrow',+ 'Telephone',+ 'Telephone Receiver',+ 'Pager',+ 'Fax Machine',+ 'Battery',+ 'Electric Plug',+ 'Laptop Computer',+ 'Desktop Computer',+ 'Printer',+ 'Keyboard',+ 'Computer Mouse',+ 'Trackball',+ 'Computer Disk',+ 'Floppy Disk',+ 'Optical Disk',+ 'DVD',+ 'Abacus',+ 'Movie Camera',+ 'Film Frames',+ 'Film Projector',+ 'Television',+ 'Camera',+ 'Camera With Flash',+ 'Video Camera',+ 'Videocassette',+ 'Magnifying Glass Tilted Left',+ 'Magnifying Glass Tilted Right',+ 'Candle',+ 'Light Bulb',+ 'Flashlight',+ 'Red Paper Lantern',+ 'Notebook With Decorative Cover',+ 'Closed Book',+ 'Open Book',+ 'Green Book',+ 'Blue Book',+ 'Orange Book',+ 'Books',+ 'Notebook',+ 'Page With Curl',+ 'Scroll',+ 'Page Facing Up',+ 'Newspaper',+ 'Rolled-Up Newspaper',+ 'Bookmark Tabs',+ 'Bookmark',+ 'Label',+ 'Money Bag',+ 'Yen Banknote',+ 'Dollar Banknote',+ 'Euro Banknote',+ 'Pound Banknote',+ 'Money With Wings',+ 'Credit Card',+ 'Receipt',+ 'Envelope',+ 'E-Mail',+ 'Incoming Envelope',+ 'Envelope With Arrow',+ 'Outbox Tray',+ 'Inbox Tray',+ 'Package',+ 'Closed Mailbox With Raised Flag',+ 'Closed Mailbox With Lowered Flag',+ 'Open Mailbox With Raised Flag',+ 'Open Mailbox With Lowered Flag',+ 'Postbox',+ 'Ballot Box With Ballot',+ 'Pencil',+ 'Black Nib',+ 'Fountain Pen',+ 'Pen',+ 'Paintbrush',+ 'Crayon',+ 'Memo',+ 'File Folder',+ 'Open File Folder',+ 'Card Index Dividers',+ 'Calendar',+ 'Tear-Off Calendar',+ 'Spiral Notepad',+ 'Spiral Calendar',+ 'Card Index',+ 'Chart Increasing',+ 'Chart Decreasing',+ 'Bar Chart',+ 'Clipboard',+ 'Pushpin',+ 'Round Pushpin',+ 'Paperclip',+ 'Linked Paperclips',+ 'Straight Ruler',+ 'Triangular Ruler',+ 'Scissors',+ 'Card File Box',+ 'File Cabinet',+ 'Wastebasket',+ 'Locked',+ 'Unlocked',+ 'Locked With Pen',+ 'Locked With Key',+ 'Key',+ 'Old Key',+ 'Hammer',+ 'Pick',+ 'Hammer and Pick',+ 'Hammer and Wrench',+ 'Dagger',+ 'Crossed Swords',+ 'Pistol',+ 'Shield',+ 'Wrench',+ 'Nut and Bolt',+ 'Gear',+ 'Clamp',+ 'Balance Scale',+ 'Link',+ 'Chains',+ 'Toolbox',+ 'Magnet',+ 'Alembic',+ 'Test Tube',+ 'Petri Dish',+ 'DNA',+ 'Microscope',+ 'Telescope',+ 'Satellite Antenna',+ 'Syringe',+ 'Pill',+ 'Door',+ 'Bed',+ 'Couch and Lamp',+ 'Toilet',+ 'Shower',+ 'Bathtub',+ 'Lotion Bottle',+ 'Safety Pin',+ 'Broom',+ 'Basket',+ 'Roll of Paper',+ 'Soap',+ 'Sponge',+ 'Fire Extinguisher',+ 'Cigarette',+ 'Coffin',+ 'Funeral Urn',+ 'Moai',+ 'Potable Water'+], [+ '๐',+ '๐ณ',+ '๐ฃ',+ '๐',+ '๐',+ '๐ช',+ '๐บ',+ '๐บ',+ '๐งญ',+ '๐งฑ',+ '๐',+ '๐ข',+ '๐',+ '๐งณ',+ 'โ',+ 'โณ',+ 'โ',+ 'โฐ',+ 'โฑ',+ 'โฒ',+ '๐ฐ',+ '๐ก',+ 'โฑ',+ '๐งจ',+ '๐',+ '๐',+ '๐',+ '๐',+ '๐',+ '๐',+ '๐งง',+ '๐',+ '๐',+ '๐ฎ',+ '๐งฟ',+ '๐น',+ '๐งธ',+ '๐ผ',+ '๐งต',+ '๐งถ',+ '๐',+ '๐ฟ',+ '๐',+ '๐ฏ',+ '๐',+ '๐',+ '๐',+ '๐ป',+ '๐ฑ',+ '๐ฒ',+ 'โ',+ '๐',+ '๐',+ '๐ ',+ '๐',+ '๐',+ '๐ป',+ '๐ฅ',+ '๐จ',+ 'โจ',+ '๐ฑ',+ '๐ฒ',+ '๐ฝ',+ '๐พ',+ '๐ฟ',+ '๐',+ '๐งฎ',+ '๐ฅ',+ '๐',+ '๐ฝ',+ '๐บ',+ '๐ท',+ '๐ธ',+ '๐น',+ '๐ผ',+ '๐',+ '๐',+ '๐ฏ',+ '๐ก',+ '๐ฆ',+ '๐ฎ',+ '๐',+ '๐',+ '๐',+ '๐',+ '๐',+ '๐',+ '๐',+ '๐',+ '๐',+ '๐',+ '๐',+ '๐ฐ',+ '๐',+ '๐',+ '๐',+ '๐ท',+ '๐ฐ',+ '๐ด',+ '๐ต',+ '๐ถ',+ '๐ท',+ '๐ธ',+ '๐ณ',+ '๐งพ',+ 'โ',+ '๐ง',+ '๐จ',+ '๐ฉ',+ '๐ค',+ '๐ฅ',+ '๐ฆ',+ '๐ซ',+ '๐ช',+ '๐ฌ',+ '๐ญ',+ '๐ฎ',+ '๐ณ',+ 'โ',+ 'โ',+ '๐',+ '๐',+ '๐',+ '๐',+ '๐',+ '๐',+ '๐',+ '๐',+ '๐ ',+ '๐',+ '๐',+ '๐',+ '๐',+ '๐',+ '๐',+ '๐',+ '๐',+ '๐',+ '๐',+ '๐',+ '๐',+ '๐',+ '๐',+ 'โ',+ '๐',+ '๐',+ '๐',+ '๐',+ '๐',+ '๐',+ '๐',+ '๐',+ '๐',+ '๐จ',+ 'โ',+ 'โ',+ '๐ ',+ '๐ก',+ 'โ',+ '๐ซ',+ '๐ก',+ '๐ง',+ '๐ฉ',+ 'โ',+ '๐',+ 'โ',+ '๐',+ 'โ',+ '๐งฐ',+ '๐งฒ',+ 'โ',+ '๐งช',+ '๐งซ',+ '๐งฌ',+ '๐ฌ',+ '๐ญ',+ '๐ก',+ '๐',+ '๐',+ '๐ช',+ '๐',+ '๐',+ '๐ฝ',+ '๐ฟ',+ '๐',+ '๐งด',+ '๐งท',+ '๐งน',+ '๐งบ',+ '๐งป',+ '๐งผ',+ '๐งฝ',+ '๐งฏ',+ '๐ฌ',+ 'โฐ',+ 'โฑ',+ '๐ฟ',+ '๐ฐ'+]);++/// Map of all possible emojis along with their names in [Category.SYMBOLS]+final Map<String, String> symbols = Map.fromIterables([+ 'Heart With Arrow',+ 'Heart With Ribbon',+ 'Sparkling Heart',+ 'Growing Heart',+ 'Beating Heart',+ 'Revolving Hearts',+ 'Two Hearts',+ 'Heart Decoration',+ 'Heavy Heart Exclamation',+ 'Broken Heart',+ 'Red Heart',+ 'Orange Heart',+ 'Yellow Heart',+ 'Green Heart',+ 'Blue Heart',+ 'Purple Heart',+ 'Black Heart',+ 'Hundred Points',+ 'Anger Symbol',+ 'Speech Balloon',+ 'Eye in Speech Bubble',+ 'Right Anger Bubble',+ 'Thought Balloon',+ 'Zzz',+ 'White Flower',+ 'Hot Springs',+ 'Barber Pole',+ 'Stop Sign',+ 'Twelve OโClock',+ 'Twelve-Thirty',+ 'One OโClock',+ 'One-Thirty',+ 'Two OโClock',+ 'Two-Thirty',+ 'Three OโClock',+ 'Three-Thirty',+ 'Four OโClock',+ 'Four-Thirty',+ 'Five OโClock',+ 'Five-Thirty',+ 'Six OโClock',+ 'Six-Thirty',+ 'Seven OโClock',+ 'Seven-Thirty',+ 'Eight OโClock',+ 'Eight-Thirty',+ 'Nine OโClock',+ 'Nine-Thirty',+ 'Ten OโClock',+ 'Ten-Thirty',+ 'Eleven OโClock',+ 'Eleven-Thirty',+ 'Cyclone',+ 'Spade Suit',+ 'Heart Suit',+ 'Diamond Suit',+ 'Club Suit',+ 'Joker',+ 'Mahjong Red Dragon',+ 'Flower Playing Cards',+ 'Muted Speaker',+ 'Speaker Low Volume',+ 'Speaker Medium Volume',+ 'Speaker High Volume',+ 'Loudspeaker',+ 'Megaphone',+ 'Postal Horn',+ 'Bell',+ 'Bell With Slash',+ 'Musical Note',+ 'Musical Notes',+ 'ATM Sign',+ 'Litter in Bin Sign',+ 'Potable Water',+ 'Wheelchair Symbol',+ 'Menโs Room',+ 'Womenโs Room',+ 'Restroom',+ 'Baby Symbol',+ 'Water Closet',+ 'Warning',+ 'Children Crossing',+ 'No Entry',+ 'Prohibited',+ 'No Bicycles',+ 'No Smoking',+ 'No Littering',+ 'Non-Potable Water',+ 'No Pedestrians',+ 'No One Under Eighteen',+ 'Radioactive',+ 'Biohazard',+ 'Up Arrow',+ 'Up-Right Arrow',+ 'Right Arrow',+ 'Down-Right Arrow',+ 'Down Arrow',+ 'Down-Left Arrow',+ 'Left Arrow',+ 'Up-Left Arrow',+ 'Up-Down Arrow',+ 'Left-Right Arrow',+ 'Right Arrow Curving Left',+ 'Left Arrow Curving Right',+ 'Right Arrow Curving Up',+ 'Right Arrow Curving Down',+ 'Clockwise Vertical Arrows',+ 'Counterclockwise Arrows Button',+ 'Back Arrow',+ 'End Arrow',+ 'On! Arrow',+ 'Soon Arrow',+ 'Top Arrow',+ 'Place of Worship',+ 'Atom Symbol',+ 'Om',+ 'Star of David',+ 'Wheel of Dharma',+ 'Yin Yang',+ 'Latin Cross',+ 'Orthodox Cross',+ 'Star and Crescent',+ 'Peace Symbol',+ 'Menorah',+ 'Dotted Six-Pointed Star',+ 'Aries',+ 'Taurus',+ 'Gemini',+ 'Cancer',+ 'Leo',+ 'Virgo',+ 'Libra',+ 'Scorpio',+ 'Sagittarius',+ 'Capricorn',+ 'Aquarius',+ 'Pisces',+ 'Ophiuchus',+ 'Shuffle Tracks Button',+ 'Repeat Button',+ 'Repeat Single Button',+ 'Play Button',+ 'Fast-Forward Button',+ 'Reverse Button',+ 'Fast Reverse Button',+ 'Upwards Button',+ 'Fast Up Button',+ 'Downwards Button',+ 'Fast Down Button',+ 'Stop Button',+ 'Eject Button',+ 'Cinema',+ 'Dim Button',+ 'Bright Button',+ 'Antenna Bars',+ 'Vibration Mode',+ 'Mobile Phone Off',+ 'Infinity',+ 'Recycling Symbol',+ 'Trident Emblem',+ 'Name Badge',+ 'Japanese Symbol for Beginner',+ 'Heavy Large Circle',+ 'White Heavy Check Mark',+ 'Ballot Box With Check',+ 'Heavy Check Mark',+ 'Heavy Multiplication X',+ 'Cross Mark',+ 'Cross Mark Button',+ 'Heavy Plus Sign',+ 'Heavy Minus Sign',+ 'Heavy Division Sign',+ 'Curly Loop',+ 'Double Curly Loop',+ 'Part Alternation Mark',+ 'Eight-Spoked Asterisk',+ 'Eight-Pointed Star',+ 'Sparkle',+ 'Double Exclamation Mark',+ 'Exclamation Question Mark',+ 'Question Mark',+ 'White Question Mark',+ 'White Exclamation Mark',+ 'Exclamation Mark',+ 'Copyright',+ 'Registered',+ 'Trade Mark',+ 'Keycap Number Sign',+ 'Keycap Digit Zero',+ 'Keycap Digit One',+ 'Keycap Digit Two',+ 'Keycap Digit Three',+ 'Keycap Digit Four',+ 'Keycap Digit Five',+ 'Keycap Digit Six',+ 'Keycap Digit Seven',+ 'Keycap Digit Eight',+ 'Keycap Digit Nine',+ 'Keycap: 10',+ 'Input Latin Uppercase',+ 'Input Latin Lowercase',+ 'Input Numbers',+ 'Input Symbols',+ 'Input Latin Letters',+ 'A Button (Blood Type)',+ 'AB Button (Blood Type)',+ 'B Button (Blood Type)',+ 'CL Button',+ 'Cool Button',+ 'Free Button',+ 'Information',+ 'ID Button',+ 'Circled M',+ 'New Button',+ 'NG Button',+ 'O Button (Blood Type)',+ 'OK Button',+ 'P Button',+ 'SOS Button',+ 'Up! Button',+ 'Vs Button',+ 'Japanese โHereโ Button',+ 'Japanese โService Chargeโ Button',+ 'Japanese โMonthly Amountโ Button',+ 'Japanese โNot Free of Chargeโ Button',+ 'Japanese โReservedโ Button',+ 'Japanese โBargainโ Button',+ 'Japanese โDiscountโ Button',+ 'Japanese โFree of Chargeโ Button',+ 'Japanese โProhibitedโ Button',+ 'Japanese โAcceptableโ Button',+ 'Japanese โApplicationโ Button',+ 'Japanese โPassing Gradeโ Button',+ 'Japanese โVacancyโ Button',+ 'Japanese โCongratulationsโ Button',+ 'Japanese โSecretโ Button',+ 'Japanese โOpen for Businessโ Button',+ 'Japanese โNo Vacancyโ Button',+ 'Red Circle',+ 'Blue Circle',+ 'Black Circle',+ 'White Circle',+ 'Black Large Square',+ 'White Large Square',+ 'Black Medium Square',+ 'White Medium Square',+ 'Black Medium-Small Square',+ 'White Medium-Small Square',+ 'Black Small Square',+ 'White Small Square',+ 'Large Orange Diamond',+ 'Large Blue Diamond',+ 'Small Orange Diamond',+ 'Small Blue Diamond',+ 'Red Triangle Pointed Up',+ 'Red Triangle Pointed Down',+ 'Diamond With a Dot',+ 'White Square Button',+ 'Black Square Button'+], [+ '๐',+ '๐',+ '๐',+ '๐',+ '๐',+ '๐',+ '๐',+ '๐',+ 'โฃ',+ '๐',+ 'โค',+ '๐งก',+ '๐',+ '๐',+ '๐',+ '๐',+ '๐ค',+ '๐ฏ',+ '๐ข',+ '๐ฌ',+ '๐๏ธโ๐จ๏ธ',+ '๐ฏ',+ '๐ญ',+ '๐ค',+ '๐ฎ',+ 'โจ',+ '๐',+ '๐',+ '๐',+ '๐ง',+ '๐',+ '๐',+ '๐',+ '๐',+ '๐',+ '๐',+ '๐',+ '๐',+ '๐',+ '๐ ',+ '๐',+ '๐ก',+ '๐',+ '๐ข',+ '๐',+ '๐ฃ',+ '๐',+ '๐ค',+ '๐',+ '๐ฅ',+ '๐',+ '๐ฆ',+ '๐',+ 'โ ',+ 'โฅ',+ 'โฆ',+ 'โฃ',+ '๐',+ '๐',+ '๐ด',+ '๐',+ '๐',+ '๐',+ '๐',+ '๐ข',+ '๐ฃ',+ '๐ฏ',+ '๐',+ '๐',+ '๐ต',+ '๐ถ',+ '๐ง',+ '๐ฎ',+ '๐ฐ',+ 'โฟ',+ '๐น',+ '๐บ',+ '๐ป',+ '๐ผ',+ '๐พ',+ 'โ ',+ '๐ธ',+ 'โ',+ '๐ซ',+ '๐ณ',+ '๐ญ',+ '๐ฏ',+ '๐ฑ',+ '๐ท',+ '๐',+ 'โข',+ 'โฃ',+ 'โฌ',+ 'โ',+ 'โก',+ 'โ',+ 'โฌ',+ 'โ',+ 'โฌ ',+ 'โ',+ 'โ',+ 'โ',+ 'โฉ',+ 'โช',+ 'โคด',+ 'โคต',+ '๐',+ '๐',+ '๐',+ '๐',+ '๐',+ '๐',+ '๐',+ '๐',+ 'โ',+ '๐',+ 'โก',+ 'โธ',+ 'โฏ',+ 'โ',+ 'โฆ',+ 'โช',+ 'โฎ',+ '๐',+ '๐ฏ',+ 'โ',+ 'โ',+ 'โ',+ 'โ',+ 'โ',+ 'โ',+ 'โ',+ 'โ',+ 'โ',+ 'โ',+ 'โ',+ 'โ',+ 'โ',+ '๐',+ '๐',+ '๐',+ 'โถ',+ 'โฉ',+ 'โ',+ 'โช',+ '๐ผ',+ 'โซ',+ '๐ฝ',+ 'โฌ',+ 'โน',+ 'โ',+ '๐ฆ',+ '๐ ',+ '๐',+ '๐ถ',+ '๐ณ',+ '๐ด',+ 'โพ',+ 'โป',+ '๐ฑ',+ '๐',+ '๐ฐ',+ 'โญ',+ 'โ ',+ 'โ',+ 'โ',+ 'โ',+ 'โ',+ 'โ',+ 'โ',+ 'โ',+ 'โ',+ 'โฐ',+ 'โฟ',+ 'ใฝ',+ 'โณ',+ 'โด',+ 'โ',+ 'โผ',+ 'โ',+ 'โ',+ 'โ',+ 'โ',+ 'โ',+ 'ยฉ',+ 'ยฎ',+ 'โข',+ '#๏ธโฃ',+ '0๏ธโฃ',+ '1๏ธโฃ',+ '2๏ธโฃ',+ '3๏ธโฃ',+ '4๏ธโฃ',+ '5๏ธโฃ',+ '6๏ธโฃ',+ '7๏ธโฃ',+ '8๏ธโฃ',+ '9๏ธโฃ',+ '๐',+ '๐ ',+ '๐ก',+ '๐ข',+ '๐ฃ',+ '๐ค',+ '๐ ฐ',+ '๐',+ '๐ ฑ',+ '๐',+ '๐',+ '๐',+ 'โน',+ '๐',+ 'โ',+ '๐',+ '๐',+ '๐ พ',+ '๐',+ '๐ ฟ',+ '๐',+ '๐',+ '๐',+ '๐',+ '๐',+ '๐ท',+ '๐ถ',+ '๐ฏ',+ '๐',+ '๐น',+ '๐',+ '๐ฒ',+ '๐',+ '๐ธ',+ '๐ด',+ '๐ณ',+ 'ใ',+ 'ใ',+ '๐บ',+ '๐ต',+ '๐ด',+ '๐ต',+ 'โซ',+ 'โช',+ 'โฌ',+ 'โฌ',+ 'โผ',+ 'โป',+ 'โพ',+ 'โฝ',+ 'โช',+ 'โซ',+ '๐ถ',+ '๐ท',+ '๐ธ',+ '๐น',+ '๐บ',+ '๐ป',+ '๐ ',+ '๐ณ',+ '๐ฒ'+]);++/// Map of all possible emojis along with their names in [Category.FLAGS]+final Map<String, String> flags = Map.fromIterables([+ 'Chequered Flag',+ 'Triangular Flag',+ 'Crossed Flags',+ 'Black Flag',+ 'White Flag',+ 'Rainbow Flag',+ 'Pirate Flag',+ 'Flag: Ascension Island',+ 'Flag: Andorra',+ 'Flag: United Arab Emirates',+ 'Flag: Afghanistan',+ 'Flag: Antigua & Barbuda',+ 'Flag: Anguilla',+ 'Flag: Albania',+ 'Flag: Armenia',+ 'Flag: Angola',+ 'Flag: Antarctica',+ 'Flag: Argentina',+ 'Flag: American Samoa',+ 'Flag: Austria',+ 'Flag: Australia',+ 'Flag: Aruba',+ 'Flag: ร land Islands',+ 'Flag: Azerbaijan',+ 'Flag: Bosnia & Herzegovina',+ 'Flag: Barbados',+ 'Flag: Bangladesh',+ 'Flag: Belgium',+ 'Flag: Burkina Faso',+ 'Flag: Bulgaria',+ 'Flag: Bahrain',+ 'Flag: Burundi',+ 'Flag: Benin',+ 'Flag: St. Barthรฉlemy',+ 'Flag: Bermuda',+ 'Flag: Brunei',+ 'Flag: Bolivia',+ 'Flag: Caribbean Netherlands',+ 'Flag: Brazil',+ 'Flag: Bahamas',+ 'Flag: Bhutan',+ 'Flag: Bouvet Island',+ 'Flag: Botswana',+ 'Flag: Belarus',+ 'Flag: Belize',+ 'Flag: Canada',+ 'Flag: Cocos (Keeling) Islands',+ 'Flag: Congo - Kinshasa',+ 'Flag: Central African Republic',+ 'Flag: Congo - Brazzaville',+ 'Flag: Switzerland',+ 'Flag: Cรดte dโIvoire',+ 'Flag: Cook Islands',+ 'Flag: Chile',+ 'Flag: Cameroon',+ 'Flag: China',+ 'Flag: Colombia',+ 'Flag: Clipperton Island',+ 'Flag: Costa Rica',+ 'Flag: Cuba',+ 'Flag: Cape Verde',+ 'Flag: Curaรงao',+ 'Flag: Christmas Island',+ 'Flag: Cyprus',+ 'Flag: Czechia',+ 'Flag: Germany',+ 'Flag: Diego Garcia',+ 'Flag: Djibouti',+ 'Flag: Denmark',+ 'Flag: Dominica',+ 'Flag: Dominican Republic',+ 'Flag: Algeria',+ 'Flag: Ceuta & Melilla',+ 'Flag: Ecuador',+ 'Flag: Estonia',+ 'Flag: Egypt',+ 'Flag: Western Sahara',+ 'Flag: Eritrea',+ 'Flag: Spain',+ 'Flag: Ethiopia',+ 'Flag: European Union',+ 'Flag: Finland',+ 'Flag: Fiji',+ 'Flag: Falkland Islands',+ 'Flag: Micronesia',+ 'Flag: Faroe Islands',+ 'Flag: France',+ 'Flag: Gabon',+ 'Flag: United Kingdom',+ 'Flag: Grenada',+ 'Flag: Georgia',+ 'Flag: French Guiana',+ 'Flag: Guernsey',+ 'Flag: Ghana',+ 'Flag: Gibraltar',+ 'Flag: Greenland',+ 'Flag: Gambia',+ 'Flag: Guinea',+ 'Flag: Guadeloupe',+ 'Flag: Equatorial Guinea',+ 'Flag: Greece',+ 'Flag: South Georgia & South Sandwich Islands',+ 'Flag: Guatemala',+ 'Flag: Guam',+ 'Flag: Guinea-Bissau',+ 'Flag: Guyana',+ 'Flag: Hong Kong SAR China',+ 'Flag: Heard & McDonald Islands',+ 'Flag: Honduras',+ 'Flag: Croatia',+ 'Flag: Haiti',+ 'Flag: Hungary',+ 'Flag: Canary Islands',+ 'Flag: Indonesia',+ 'Flag: Ireland',+ 'Flag: Israel',+ 'Flag: Isle of Man',+ 'Flag: India',+ 'Flag: British Indian Ocean Territory',+ 'Flag: Iraq',+ 'Flag: Iran',+ 'Flag: Iceland',+ 'Flag: Italy',+ 'Flag: Jersey',+ 'Flag: Jamaica',+ 'Flag: Jordan',+ 'Flag: Japan',+ 'Flag: Kenya',+ 'Flag: Kyrgyzstan',+ 'Flag: Cambodia',+ 'Flag: Kiribati',+ 'Flag: Comoros',+ 'Flag: St. Kitts & Nevis',+ 'Flag: North Korea',+ 'Flag: South Korea',+ 'Flag: Kuwait',+ 'Flag: Cayman Islands',+ 'Flag: Kazakhstan',+ 'Flag: Laos',+ 'Flag: Lebanon',+ 'Flag: St. Lucia',+ 'Flag: Liechtenstein',+ 'Flag: Sri Lanka',+ 'Flag: Liberia',+ 'Flag: Lesotho',+ 'Flag: Lithuania',+ 'Flag: Luxembourg',+ 'Flag: Latvia',+ 'Flag: Libya',+ 'Flag: Morocco',+ 'Flag: Monaco',+ 'Flag: Moldova',+ 'Flag: Montenegro',+ 'Flag: St. Martin',+ 'Flag: Madagascar',+ 'Flag: Marshall Islands',+ 'Flag: North Macedonia',+ 'Flag: Mali',+ 'Flag: Myanmar (Burma)',+ 'Flag: Mongolia',+ 'Flag: Macau Sar China',+ 'Flag: Northern Mariana Islands',+ 'Flag: Martinique',+ 'Flag: Mauritania',+ 'Flag: Montserrat',+ 'Flag: Malta',+ 'Flag: Mauritius',+ 'Flag: Maldives',+ 'Flag: Malawi',+ 'Flag: Mexico',+ 'Flag: Malaysia',+ 'Flag: Mozambique',+ 'Flag: Namibia',+ 'Flag: New Caledonia',+ 'Flag: Niger',+ 'Flag: Norfolk Island',+ 'Flag: Nigeria',+ 'Flag: Nicaragua',+ 'Flag: Netherlands',+ 'Flag: Norway',+ 'Flag: Nepal',+ 'Flag: Nauru',+ 'Flag: Niue',+ 'Flag: New Zealand',+ 'Flag: Oman',+ 'Flag: Panama',+ 'Flag: Peru',+ 'Flag: French Polynesia',+ 'Flag: Papua New Guinea',+ 'Flag: Philippines',+ 'Flag: Pakistan',+ 'Flag: Poland',+ 'Flag: St. Pierre & Miquelon',+ 'Flag: Pitcairn Islands',+ 'Flag: Puerto Rico',+ 'Flag: Palestinian Territories',+ 'Flag: Portugal',+ 'Flag: Palau',+ 'Flag: Paraguay',+ 'Flag: Qatar',+ 'Flag: Rรฉunion',+ 'Flag: Romania',+ 'Flag: Serbia',+ 'Flag: Russia',+ 'Flag: Rwanda',+ 'Flag: Saudi Arabia',+ 'Flag: Solomon Islands',+ 'Flag: Seychelles',+ 'Flag: Sudan',+ 'Flag: Sweden',+ 'Flag: Singapore',+ 'Flag: St. Helena',+ 'Flag: Slovenia',+ 'Flag: Svalbard & Jan Mayen',+ 'Flag: Slovakia',+ 'Flag: Sierra Leone',+ 'Flag: San Marino',+ 'Flag: Senegal',+ 'Flag: Somalia',+ 'Flag: Suriname',+ 'Flag: South Sudan',+ 'Flag: Sรฃo Tomรฉ & Prรญncipe',+ 'Flag: El Salvador',+ 'Flag: Sint Maarten',+ 'Flag: Syria',+ 'Flag: Swaziland',+ 'Flag: Tristan Da Cunha',+ 'Flag: Turks & Caicos Islands',+ 'Flag: Chad',+ 'Flag: French Southern Territories',+ 'Flag: Togo',+ 'Flag: Thailand',+ 'Flag: Tajikistan',+ 'Flag: Tokelau',+ 'Flag: Timor-Leste',+ 'Flag: Turkmenistan',+ 'Flag: Tunisia',+ 'Flag: Tonga',+ 'Flag: Turkey',+ 'Flag: Trinidad & Tobago',+ 'Flag: Tuvalu',+ 'Flag: Taiwan',+ 'Flag: Tanzania',+ 'Flag: Ukraine',+ 'Flag: Uganda',+ 'Flag: U.S. Outlying Islands',+ 'Flag: United Nations',+ 'Flag: United States',+ 'Flag: Uruguay',+ 'Flag: Uzbekistan',+ 'Flag: Vatican City',+ 'Flag: St. Vincent & Grenadines',+ 'Flag: Venezuela',+ 'Flag: British Virgin Islands',+ 'Flag: U.S. Virgin Islands',+ 'Flag: Vietnam',+ 'Flag: Vanuatu',+ 'Flag: Wallis & Futuna',+ 'Flag: Samoa',+ 'Flag: Kosovo',+ 'Flag: Yemen',+ 'Flag: Mayotte',+ 'Flag: South Africa',+ 'Flag: Zambia',+ 'Flag: Zimbabwe'+], [+ '๐',+ '๐ฉ',+ '๐',+ '๐ด',+ '๐ณ',+ '๐ณ๏ธโ๐',+ '๐ดโโ ๏ธ',+ '๐ฆ๐จ',+ '๐ฆ๐ฉ',+ '๐ฆ๐ช',+ '๐ฆ๐ซ',+ '๐ฆ๐ฌ',+ '๐ฆ๐ฎ',+ '๐ฆ๐ฑ',+ '๐ฆ๐ฒ',+ '๐ฆ๐ด',+ '๐ฆ๐ถ',+ '๐ฆ๐ท',+ '๐ฆ๐ธ',+ '๐ฆ๐น',+ '๐ฆ๐บ',+ '๐ฆ๐ผ',+ '๐ฆ๐ฝ',+ '๐ฆ๐ฟ',+ '๐ง๐ฆ',+ '๐ง๐ง',+ '๐ง๐ฉ',+ '๐ง๐ช',+ '๐ง๐ซ',+ '๐ง๐ฌ',+ '๐ง๐ญ',+ '๐ง๐ฎ',+ '๐ง๐ฏ',+ '๐ง๐ฑ',+ '๐ง๐ฒ',+ '๐ง๐ณ',+ '๐ง๐ด',+ '๐ง๐ถ',+ '๐ง๐ท',+ '๐ง๐ธ',+ '๐ง๐น',+ '๐ง๐ป',+ '๐ง๐ผ',+ '๐ง๐พ',+ '๐ง๐ฟ',+ '๐จ๐ฆ',+ '๐จ๐จ',+ '๐จ๐ฉ',+ '๐จ๐ซ',+ '๐จ๐ฌ',+ '๐จ๐ญ',+ '๐จ๐ฎ',+ '๐จ๐ฐ',+ '๐จ๐ฑ',+ '๐จ๐ฒ',+ '๐จ๐ณ',+ '๐จ๐ด',+ '๐จ๐ต',+ '๐จ๐ท',+ '๐จ๐บ',+ '๐จ๐ป',+ '๐จ๐ผ',+ '๐จ๐ฝ',+ '๐จ๐พ',+ '๐จ๐ฟ',+ '๐ฉ๐ช',+ '๐ฉ๐ฌ',+ '๐ฉ๐ฏ',+ '๐ฉ๐ฐ',+ '๐ฉ๐ฒ',+ '๐ฉ๐ด',+ '๐ฉ๐ฟ',+ '๐ช๐ฆ',+ '๐ช๐จ',+ '๐ช๐ช',+ '๐ช๐ฌ',+ '๐ช๐ญ',+ '๐ช๐ท',+ '๐ช๐ธ',+ '๐ช๐น',+ '๐ช๐บ',+ '๐ซ๐ฎ',+ '๐ซ๐ฏ',+ '๐ซ๐ฐ',+ '๐ซ๐ฒ',+ '๐ซ๐ด',+ '๐ซ๐ท',+ '๐ฌ๐ฆ',+ '๐ฌ๐ง',+ '๐ฌ๐ฉ',+ '๐ฌ๐ช',+ '๐ฌ๐ซ',+ '๐ฌ๐ฌ',+ '๐ฌ๐ญ',+ '๐ฌ๐ฎ',+ '๐ฌ๐ฑ',+ '๐ฌ๐ฒ',+ '๐ฌ๐ณ',+ '๐ฌ๐ต',+ '๐ฌ๐ถ',+ '๐ฌ๐ท',+ '๐ฌ๐ธ',+ '๐ฌ๐น',+ '๐ฌ๐บ',+ '๐ฌ๐ผ',+ '๐ฌ๐พ',+ '๐ญ๐ฐ',+ '๐ญ๐ฒ',+ '๐ญ๐ณ',+ '๐ญ๐ท',+ '๐ญ๐น',+ '๐ญ๐บ',+ '๐ฎ๐จ',+ '๐ฎ๐ฉ',+ '๐ฎ๐ช',+ '๐ฎ๐ฑ',+ '๐ฎ๐ฒ',+ '๐ฎ๐ณ',+ '๐ฎ๐ด',+ '๐ฎ๐ถ',+ '๐ฎ๐ท',+ '๐ฎ๐ธ',+ '๐ฎ๐น',+ '๐ฏ๐ช',+ '๐ฏ๐ฒ',+ '๐ฏ๐ด',+ '๐ฏ๐ต',+ '๐ฐ๐ช',+ '๐ฐ๐ฌ',+ '๐ฐ๐ญ',+ '๐ฐ๐ฎ',+ '๐ฐ๐ฒ',+ '๐ฐ๐ณ',+ '๐ฐ๐ต',+ '๐ฐ๐ท',+ '๐ฐ๐ผ',+ '๐ฐ๐พ',+ '๐ฐ๐ฟ',+ '๐ฑ๐ฆ',+ '๐ฑ๐ง',+ '๐ฑ๐จ',+ '๐ฑ๐ฎ',+ '๐ฑ๐ฐ',+ '๐ฑ๐ท',+ '๐ฑ๐ธ',+ '๐ฑ๐น',+ '๐ฑ๐บ',+ '๐ฑ๐ป',+ '๐ฑ๐พ',+ '๐ฒ๐ฆ',+ '๐ฒ๐จ',+ '๐ฒ๐ฉ',+ '๐ฒ๐ช',+ '๐ฒ๐ซ',+ '๐ฒ๐ฌ',+ '๐ฒ๐ญ',+ '๐ฒ๐ฐ',+ '๐ฒ๐ฑ',+ '๐ฒ๐ฒ',+ '๐ฒ๐ณ',+ '๐ฒ๐ด',+ '๐ฒ๐ต',+ '๐ฒ๐ถ',+ '๐ฒ๐ท',+ '๐ฒ๐ธ',+ '๐ฒ๐น',+ '๐ฒ๐บ',+ '๐ฒ๐ป',+ '๐ฒ๐ผ',+ '๐ฒ๐ฝ',+ '๐ฒ๐พ',+ '๐ฒ๐ฟ',+ '๐ณ๐ฆ',+ '๐ณ๐จ',+ '๐ณ๐ช',+ '๐ณ๐ซ',+ '๐ณ๐ฌ',+ '๐ณ๐ฎ',+ '๐ณ๐ฑ',+ '๐ณ๐ด',+ '๐ณ๐ต',+ '๐ณ๐ท',+ '๐ณ๐บ',+ '๐ณ๐ฟ',+ '๐ด๐ฒ',+ '๐ต๐ฆ',+ '๐ต๐ช',+ '๐ต๐ซ',+ '๐ต๐ฌ',+ '๐ต๐ญ',+ '๐ต๐ฐ',+ '๐ต๐ฑ',+ '๐ต๐ฒ',+ '๐ต๐ณ',+ '๐ต๐ท',+ '๐ต๐ธ',+ '๐ต๐น',+ '๐ต๐ผ',+ '๐ต๐พ',+ '๐ถ๐ฆ',+ '๐ท๐ช',+ '๐ท๐ด',+ '๐ท๐ธ',+ '๐ท๐บ',+ '๐ท๐ผ',+ '๐ธ๐ฆ',+ '๐ธ๐ง',+ '๐ธ๐จ',+ '๐ธ๐ฉ',+ '๐ธ๐ช',+ '๐ธ๐ฌ',+ '๐ธ๐ญ',+ '๐ธ๐ฎ',+ '๐ธ๐ฏ',+ '๐ธ๐ฐ',+ '๐ธ๐ฑ',+ '๐ธ๐ฒ',+ '๐ธ๐ณ',+ '๐ธ๐ด',+ '๐ธ๐ท',+ '๐ธ๐ธ',+ '๐ธ๐น',+ '๐ธ๐ป',+ '๐ธ๐ฝ',+ '๐ธ๐พ',+ '๐ธ๐ฟ',+ '๐น๐ฆ',+ '๐น๐จ',+ '๐น๐ฉ',+ '๐น๐ซ',+ '๐น๐ฌ',+ '๐น๐ญ',+ '๐น๐ฏ',+ '๐น๐ฐ',+ '๐น๐ฑ',+ '๐น๐ฒ',+ '๐น๐ณ',+ '๐น๐ด',+ '๐น๐ท',+ '๐น๐น',+ '๐น๐ป',+ '๐น๐ผ',+ '๐น๐ฟ',+ '๐บ๐ฆ',+ '๐บ๐ฌ',+ '๐บ๐ฒ',+ '๐บ๐ณ',+ '๐บ๐ธ',+ '๐บ๐พ',+ '๐บ๐ฟ',+ '๐ป๐ฆ',+ '๐ป๐จ',+ '๐ป๐ช',+ '๐ป๐ฌ',+ '๐ป๐ฎ',+ '๐ป๐ณ',+ '๐ป๐บ',+ '๐ผ๐ซ',+ '๐ผ๐ธ',+ '๐ฝ๐ฐ',+ '๐พ๐ช',+ '๐พ๐น',+ '๐ฟ๐ฆ',+ '๐ฟ๐ฒ',+ '๐ฟ๐ผ'+]);diff --git a/frontend/app_flowy/packages/appflowy_editor_plugins/lib/src/emoji_picker/src/emoji_picker.dart b/frontend/app_flowy/packages/appflowy_editor_plugins/lib/src/emoji_picker/src/emoji_picker.dartnew file mode 100644index 0000000000..8852b12799--- /dev/null+++ b/frontend/app_flowy/packages/appflowy_editor_plugins/lib/src/emoji_picker/src/emoji_picker.dart@@ -0,0 +1,312 @@+// ignore_for_file: constant_identifier_names++import 'dart:convert';+import 'dart:io';+import 'dart:math';++import 'package:flutter/material.dart';+import 'package:flutter/services.dart';+import 'package:shared_preferences/shared_preferences.dart';+import 'models/category_models.dart';+import 'config.dart';+import 'default_emoji_picker_view.dart';+import 'models/emoji_model.dart';+import 'emoji_lists.dart' as emoji_list;+import 'emoji_view_state.dart';+import 'models/recent_emoji_model.dart';++/// All the possible categories that [Emoji] can be put into+///+/// All [Category] are shown in the category bar+enum Category {+ /// Searched emojis+ SEARCH,++ /// Recent emojis+ RECENT,++ /// Smiley emojis+ SMILEYS,++ /// Animal emojis+ ANIMALS,++ /// Food emojis+ FOODS,++ /// Activity emojis+ ACTIVITIES,++ /// Travel emojis+ TRAVEL,++ /// Objects emojis+ OBJECTS,++ /// Sumbol emojis+ SYMBOLS,++ /// Flag emojis+ FLAGS,+}++/// Enum to alter the keyboard button style+enum ButtonMode {+ /// Android button style - gives the button a splash color with ripple effect+ MATERIAL,++ /// iOS button style - gives the button a fade out effect when pressed+ CUPERTINO+}++/// Callback function for when emoji is selected+///+/// The function returns the selected [Emoji] as well+/// as the [Category] from which it originated+typedef OnEmojiSelected = void Function(Category category, Emoji emoji);++/// Callback function for backspace button+typedef OnBackspacePressed = void Function();++/// Callback function for custom view+typedef EmojiViewBuilder = Widget Function(Config config, EmojiViewState state);++/// The Emoji Keyboard widget+///+/// This widget displays a grid of [Emoji] sorted by [Category]+/// which the user can horizontally scroll through.+///+/// There is also a bottombar which displays all the possible [Category]+/// and allow the user to quickly switch to that [Category]+class EmojiPicker extends StatefulWidget {+ /// EmojiPicker for flutter+ const EmojiPicker({+ Key? key,+ required this.onEmojiSelected,+ this.onBackspacePressed,+ this.config = const Config(),+ this.customWidget,+ }) : super(key: key);++ /// Custom widget+ final EmojiViewBuilder? customWidget;++ /// The function called when the emoji is selected+ final OnEmojiSelected onEmojiSelected;++ /// The function called when backspace button is pressed+ final OnBackspacePressed? onBackspacePressed;++ /// Config for customizations+ final Config config;++ @override+ EmojiPickerState createState() => EmojiPickerState();+}++class EmojiPickerState extends State<EmojiPicker> {+ static const platform = MethodChannel('emoji_picker_flutter');++ List<CategoryEmoji> categoryEmoji = List.empty(growable: true);+ List<RecentEmoji> recentEmoji = List.empty(growable: true);+ late Future<void> updateEmojiFuture;++ // Prevent emojis to be reloaded with every build+ bool loaded = false;++ @override+ void initState() {+ super.initState();+ updateEmojiFuture = _updateEmojis();+ }++ @override+ void didUpdateWidget(covariant EmojiPicker oldWidget) {+ if (oldWidget.config != widget.config) {+ // Config changed - rebuild EmojiPickerView completely+ loaded = false;+ updateEmojiFuture = _updateEmojis();+ }+ super.didUpdateWidget(oldWidget);+ }++ @override+ Widget build(BuildContext context) {+ if (!loaded) {+ // Load emojis+ updateEmojiFuture.then(+ (value) => WidgetsBinding.instance.addPostFrameCallback((_) {+ if (!mounted) return;+ setState(() {+ loaded = true;+ });+ }),+ );++ // Show loading indicator+ return const Center(child: CircularProgressIndicator());+ }+ if (widget.config.showRecentsTab) {+ categoryEmoji[0].emoji =+ recentEmoji.map((e) => e.emoji).toList().cast<Emoji>();+ }++ var state = EmojiViewState(+ categoryEmoji,+ _getOnEmojiListener(),+ widget.onBackspacePressed,+ );++ // Build+ return widget.customWidget == null+ ? DefaultEmojiPickerView(widget.config, state)+ : widget.customWidget!(widget.config, state);+ }++ // Add recent emoji handling to tap listener+ OnEmojiSelected _getOnEmojiListener() {+ return (category, emoji) {+ if (widget.config.showRecentsTab) {+ _addEmojiToRecentlyUsed(emoji).then((value) {+ if (category != Category.RECENT && mounted) {+ setState(() {+ // rebuild to update recent emoji tab+ // when it is not current tab+ });+ }+ });+ }+ widget.onEmojiSelected(category, emoji);+ };+ }++ // Initialize emoji data+ Future<void> _updateEmojis() async {+ categoryEmoji.clear();+ if (widget.config.showRecentsTab) {+ recentEmoji = await _getRecentEmojis();+ final List<Emoji> recentEmojiMap =+ recentEmoji.map((e) => e.emoji).toList().cast<Emoji>();+ categoryEmoji.add(CategoryEmoji(Category.RECENT, recentEmojiMap));+ }+ categoryEmoji.addAll([+ CategoryEmoji(Category.SMILEYS,+ await _getAvailableEmojis(emoji_list.smileys, title: 'smileys')),+ CategoryEmoji(Category.ANIMALS,+ await _getAvailableEmojis(emoji_list.animals, title: 'animals')),+ CategoryEmoji(Category.FOODS,+ await _getAvailableEmojis(emoji_list.foods, title: 'foods')),+ CategoryEmoji(+ Category.ACTIVITIES,+ await _getAvailableEmojis(emoji_list.activities,+ title: 'activities')),+ CategoryEmoji(Category.TRAVEL,+ await _getAvailableEmojis(emoji_list.travel, title: 'travel')),+ CategoryEmoji(Category.OBJECTS,+ await _getAvailableEmojis(emoji_list.objects, title: 'objects')),+ CategoryEmoji(Category.SYMBOLS,+ await _getAvailableEmojis(emoji_list.symbols, title: 'symbols')),+ CategoryEmoji(Category.FLAGS,+ await _getAvailableEmojis(emoji_list.flags, title: 'flags'))+ ]);+ }++ // Get available emoji for given category title+ Future<List<Emoji>> _getAvailableEmojis(Map<String, String> map,+ {required String title}) async {+ Map<String, String>? newMap;++ // Get Emojis cached locally if available+ newMap = await _restoreFilteredEmojis(title);++ if (newMap == null) {+ // Check if emoji is available on this platform+ newMap = await _getPlatformAvailableEmoji(map);+ // Save available Emojis to local storage for faster loading next time+ if (newMap != null) {+ await _cacheFilteredEmojis(title, newMap);+ }+ }++ // Map to Emoji Object+ return newMap!.entries+ .map<Emoji>((entry) => Emoji(entry.key, entry.value))+ .toList();+ }++ // Check if emoji is available on current platform+ Future<Map<String, String>?> _getPlatformAvailableEmoji(+ Map<String, String> emoji) async {+ if (Platform.isAndroid) {+ Map<String, String>? filtered = {};+ var delimiter = '|';+ try {+ var entries = emoji.values.join(delimiter);+ var keys = emoji.keys.join(delimiter);+ var result = (await platform.invokeMethod<String>('checkAvailability',+ {'emojiKeys': keys, 'emojiEntries': entries})) as String;+ var resultKeys = result.split(delimiter);+ for (var i = 0; i < resultKeys.length; i++) {+ filtered[resultKeys[i]] = emoji[resultKeys[i]]!;+ }+ } on PlatformException catch (_) {+ filtered = null;+ }+ return filtered;+ } else {+ return emoji;+ }+ }++ // Restore locally cached emoji+ Future<Map<String, String>?> _restoreFilteredEmojis(String title) async {+ final prefs = await SharedPreferences.getInstance();+ var emojiJson = prefs.getString(title);+ if (emojiJson == null) {+ return null;+ }+ var emojis =+ Map<String, String>.from(jsonDecode(emojiJson) as Map<String, dynamic>);+ return emojis;+ }++ // Stores filtered emoji locally for faster access next time+ Future<void> _cacheFilteredEmojis(+ String title, Map<String, String> emojis) async {+ final prefs = await SharedPreferences.getInstance();+ var emojiJson = jsonEncode(emojis);+ prefs.setString(title, emojiJson);+ }++ // Returns list of recently used emoji from cache+ Future<List<RecentEmoji>> _getRecentEmojis() async {+ final prefs = await SharedPreferences.getInstance();+ var emojiJson = prefs.getString('recent');+ if (emojiJson == null) {+ return [];+ }+ var json = jsonDecode(emojiJson) as List<dynamic>;+ return json.map<RecentEmoji>(RecentEmoji.fromJson).toList();+ }++ // Add an emoji to recently used list or increase its counter+ Future<void> _addEmojiToRecentlyUsed(Emoji emoji) async {+ final prefs = await SharedPreferences.getInstance();+ var recentEmojiIndex =+ recentEmoji.indexWhere((element) => element.emoji.emoji == emoji.emoji);+ if (recentEmojiIndex != -1) {+ // Already exist in recent list+ // Just update counter+ recentEmoji[recentEmojiIndex].counter++;+ } else {+ recentEmoji.add(RecentEmoji(emoji, 1));+ }+ // Sort by counter desc+ recentEmoji.sort((a, b) => b.counter - a.counter);+ // Limit entries to recentsLimit+ recentEmoji = recentEmoji.sublist(+ 0, min(widget.config.recentsLimit, recentEmoji.length));+ // save locally+ prefs.setString('recent', jsonEncode(recentEmoji));+ }+}diff --git a/frontend/app_flowy/packages/appflowy_editor_plugins/lib/src/emoji_picker/src/emoji_picker_builder.dart b/frontend/app_flowy/packages/appflowy_editor_plugins/lib/src/emoji_picker/src/emoji_picker_builder.dartnew file mode 100644index 0000000000..ee00569852--- /dev/null+++ b/frontend/app_flowy/packages/appflowy_editor_plugins/lib/src/emoji_picker/src/emoji_picker_builder.dart@@ -0,0 +1,17 @@+import 'package:flutter/material.dart';++import 'config.dart';+import 'emoji_view_state.dart';++/// Template class for custom implementation+/// Inherit this class to create your own EmojiPicker+abstract class EmojiPickerBuilder extends StatefulWidget {+ /// Constructor+ const EmojiPickerBuilder(this.config, this.state, {Key? key}) : super(key: key);++ /// Config for customizations+ final Config config;++ /// State that holds current emoji data+ final EmojiViewState state;+}diff --git a/frontend/app_flowy/packages/appflowy_editor_plugins/lib/src/emoji_picker/src/emoji_view_state.dart b/frontend/app_flowy/packages/appflowy_editor_plugins/lib/src/emoji_picker/src/emoji_view_state.dartnew file mode 100644index 0000000000..202f913715--- /dev/null+++ b/frontend/app_flowy/packages/appflowy_editor_plugins/lib/src/emoji_picker/src/emoji_view_state.dart@@ -0,0 +1,21 @@+import 'models/category_models.dart';+import 'emoji_picker.dart';++/// State that holds current emoji data+class EmojiViewState {+ /// Constructor+ EmojiViewState(+ this.categoryEmoji,+ this.onEmojiSelected,+ this.onBackspacePressed,+ );++ /// List of all category including their emoji+ final List<CategoryEmoji> categoryEmoji;++ /// Callback when pressed on emoji+ final OnEmojiSelected onEmojiSelected;++ /// Callback when pressed on backspace+ final OnBackspacePressed? onBackspacePressed;+}diff --git a/frontend/app_flowy/packages/appflowy_editor_plugins/lib/src/emoji_picker/src/models/category_models.dart b/frontend/app_flowy/packages/appflowy_editor_plugins/lib/src/emoji_picker/src/models/category_models.dartnew file mode 100644index 0000000000..8d59fa87e7--- /dev/null+++ b/frontend/app_flowy/packages/appflowy_editor_plugins/lib/src/emoji_picker/src/models/category_models.dart@@ -0,0 +1,91 @@+import 'package:flutter/material.dart';++import 'emoji_model.dart';+import '../emoji_picker.dart';++/// Container for Category and their emoji+class CategoryEmoji {+ /// Constructor+ CategoryEmoji(this.category, this.emoji);++ /// Category instance+ final Category category;++ /// List of emoji of this category+ List<Emoji> emoji;++ @override+ String toString() {+ return 'Name: $category, Emoji: $emoji';+ }+}++/// Class that defines the icon representing a [Category]+class CategoryIcon {+ /// Icon of Category+ const CategoryIcon({+ required this.icon,+ this.color = const Color.fromRGBO(211, 211, 211, 1),+ this.selectedColor = const Color.fromRGBO(178, 178, 178, 1),+ });++ /// The icon to represent the category+ final IconData icon;++ /// The default color of the icon+ final Color color;++ /// The color of the icon once the category is selected+ final Color selectedColor;+}++/// Class used to define all the [CategoryIcon] shown for each [Category]+///+/// This allows the keyboard to be personalized by changing icons shown.+/// If a [CategoryIcon] is set as null or not defined during initialization,+/// the default icons will be used instead+class CategoryIcons {+ /// Constructor+ const CategoryIcons({+ this.recentIcon = Icons.access_time,+ this.smileyIcon = Icons.tag_faces,+ this.animalIcon = Icons.pets,+ this.foodIcon = Icons.fastfood,+ this.activityIcon = Icons.directions_run,+ this.travelIcon = Icons.location_city,+ this.objectIcon = Icons.lightbulb_outline,+ this.symbolIcon = Icons.emoji_symbols,+ this.flagIcon = Icons.flag,+ this.searchIcon = Icons.search,+ });++ /// Icon for [Category.RECENT]+ final IconData recentIcon;++ /// Icon for [Category.SMILEYS]+ final IconData smileyIcon;++ /// Icon for [Category.ANIMALS]+ final IconData animalIcon;++ /// Icon for [Category.FOODS]+ final IconData foodIcon;++ /// Icon for [Category.ACTIVITIES]+ final IconData activityIcon;++ /// Icon for [Category.TRAVEL]+ final IconData travelIcon;++ /// Icon for [Category.OBJECTS]+ final IconData objectIcon;++ /// Icon for [Category.SYMBOLS]+ final IconData symbolIcon;++ /// Icon for [Category.FLAGS]+ final IconData flagIcon;++ /// Icon for [Category.SEARCH]+ final IconData searchIcon;+}diff --git a/frontend/app_flowy/packages/appflowy_editor_plugins/lib/src/emoji_picker/src/models/emoji_model.dart b/frontend/app_flowy/packages/appflowy_editor_plugins/lib/src/emoji_picker/src/models/emoji_model.dartnew file mode 100644index 0000000000..a1808a9419--- /dev/null+++ b/frontend/app_flowy/packages/appflowy_editor_plugins/lib/src/emoji_picker/src/models/emoji_model.dart@@ -0,0 +1,32 @@+/// A class to store data for each individual emoji+class Emoji {+ /// Emoji constructor+ const Emoji(this.name, this.emoji);++ /// The name or description for this emoji+ final String name;++ /// The unicode string for this emoji+ ///+ /// This is the string that should be displayed to view the emoji+ final String emoji;++ @override+ String toString() {+ // return 'Name: $name, Emoji: $emoji';+ return name;+ }++ /// Parse Emoji from json+ static Emoji fromJson(Map<String, dynamic> json) {+ return Emoji(json['name'] as String, json['emoji'] as String);+ }++ /// Encode Emoji to json+ Map<String, dynamic> toJson() {+ return {+ 'name': name,+ 'emoji': emoji,+ };+ }+}diff --git a/frontend/app_flowy/packages/appflowy_editor_plugins/lib/src/emoji_picker/src/models/recent_emoji_model.dart b/frontend/app_flowy/packages/appflowy_editor_plugins/lib/src/emoji_picker/src/models/recent_emoji_model.dartnew file mode 100644index 0000000000..1571bc9a92--- /dev/null+++ b/frontend/app_flowy/packages/appflowy_editor_plugins/lib/src/emoji_picker/src/models/recent_emoji_model.dart@@ -0,0 +1,30 @@+import 'emoji_model.dart';++/// Class that holds an recent emoji+/// Recent Emoji has an instance of the emoji+/// And a counter, which counts how often this emoji+/// has been used before+class RecentEmoji {+ /// Constructor+ RecentEmoji(this.emoji, this.counter);++ /// Emoji instance+ final Emoji emoji;++ /// Counter how often emoji has been used before+ int counter = 0;++ /// Parse RecentEmoji from json+ static RecentEmoji fromJson(dynamic json) {+ return RecentEmoji(+ Emoji.fromJson(json['emoji'] as Map<String, dynamic>),+ json['counter'] as int,+ );+ }++ /// Encode RecentEmoji to json+ Map<String, dynamic> toJson() => {+ 'emoji': emoji,+ 'counter': counter,+ };+}diff --git a/frontend/app_flowy/packages/appflowy_editor_plugins/pubspec.yaml b/frontend/app_flowy/packages/appflowy_editor_plugins/pubspec.yamlindex 9d62309c22..58105b3cc3 100644--- a/frontend/app_flowy/packages/appflowy_editor_plugins/pubspec.yaml+++ b/frontend/app_flowy/packages/appflowy_editor_plugins/pubspec.yaml@@ -14,8 +14,11 @@ dependencies:sdk: flutterappflowy_editor:path: ../appflowy_editor+ flowy_infra_ui:+ path: ../flowy_infra_uiflutter_math_fork: ^0.6.3+1highlight: ^0.7.0+ shared_preferences: ^2.0.15dev_dependencies:flutter_test: