From 49a9186978a5846413b5e1ab2ed81697e6d772b8 Mon Sep 17 00:00:00 2001 From: Pierre HUBERT Date: Thu, 10 Mar 2022 18:31:29 +0100 Subject: [PATCH] Update emoji package --- lib/ui/screens/conversation_screen.dart | 25 ++++++++------- pubspec.lock | 42 ++++++++++++++++++++----- pubspec.yaml | 4 +-- 3 files changed, 51 insertions(+), 20 deletions(-) diff --git a/lib/ui/screens/conversation_screen.dart b/lib/ui/screens/conversation_screen.dart index e55f655..299c049 100644 --- a/lib/ui/screens/conversation_screen.dart +++ b/lib/ui/screens/conversation_screen.dart @@ -28,7 +28,7 @@ import 'package:comunic/utils/log_utils.dart'; import 'package:comunic/utils/ui_utils.dart'; import 'package:comunic/utils/video_utils.dart'; import 'package:dio/dio.dart'; -import 'package:emoji_picker/emoji_picker.dart'; +import 'package:emoji_picker_flutter/emoji_picker_flutter.dart' as emoji; import 'package:flutter/material.dart'; import 'package:mime/mime.dart'; @@ -614,16 +614,19 @@ class _ConversationScreenState extends SafeState { ), ); - Widget _buildEmojiContainer() => EmojiPicker( - bgColor: _senderColor, - indicatorColor: _senderColor, - rows: 3, - columns: 7, - onEmojiSelected: (emoji, category) { - _textController.text = _textController.text + emoji.emoji; - }, - recommendKeywords: ["face", "happy", "party", "sad"], - numRecommended: 50, + Widget _buildEmojiContainer() => Container( + height: 200, + child: emoji.EmojiPicker( + config: emoji.Config( + bgColor: _senderColor, + indicatorColor: _senderColor, + columns: 8, + showRecentsTab: false, + ), + onEmojiSelected: (category, emoji) { + _textController.text = _textController.text + emoji.emoji; + }, + ), ); Widget _buildSendingWidget() => Container( diff --git a/pubspec.lock b/pubspec.lock index f1d0786..d6a6160 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -169,13 +169,13 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "4.0.4" - emoji_picker: + emoji_picker_flutter: dependency: "direct main" description: - name: emoji_picker + name: emoji_picker_flutter url: "https://pub.dartlang.org" source: hosted - version: "0.1.0" + version: "1.1.2" event_bus: dependency: "direct main" description: @@ -652,28 +652,56 @@ packages: name: shared_preferences url: "https://pub.dartlang.org" source: hosted - version: "0.5.7+3" + version: "2.0.13" + shared_preferences_android: + dependency: transitive + description: + name: shared_preferences_android + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.11" + shared_preferences_ios: + dependency: transitive + description: + name: shared_preferences_ios + url: "https://pub.dartlang.org" + source: hosted + version: "2.1.0" + shared_preferences_linux: + dependency: transitive + description: + name: shared_preferences_linux + url: "https://pub.dartlang.org" + source: hosted + version: "2.1.0" shared_preferences_macos: dependency: transitive description: name: shared_preferences_macos url: "https://pub.dartlang.org" source: hosted - version: "0.0.1+11" + version: "2.0.3" shared_preferences_platform_interface: dependency: transitive description: name: shared_preferences_platform_interface url: "https://pub.dartlang.org" source: hosted - version: "1.0.4" + version: "2.0.0" shared_preferences_web: dependency: transitive description: name: shared_preferences_web url: "https://pub.dartlang.org" source: hosted - version: "0.1.2+7" + version: "2.0.3" + shared_preferences_windows: + dependency: transitive + description: + name: shared_preferences_windows + url: "https://pub.dartlang.org" + source: hosted + version: "2.1.0" simple_gesture_detector: dependency: transitive description: diff --git a/pubspec.yaml b/pubspec.yaml index ead07f5..e0bafbd 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -25,7 +25,7 @@ dependencies: cupertino_icons: ^1.0.0 # Preferences are useful for a lot of things (ex: login tokens) - shared_preferences: ^0.5.6+3 + shared_preferences: ^2.0.13 # SQLite database is used for caching sqflite: ^2.0.0+2 @@ -121,7 +121,7 @@ dependencies: permission_handler: ^9.2.0 # Emojies picker - emoji_picker: ^0.1.0 + emoji_picker_flutter: ^1.1.2 # Color picker flutter_colorpicker: ^1.0.3