From 21ffd3734deca3909bab86fd9d984af16722378b Mon Sep 17 00:00:00 2001 From: Apurva Kanthraviya Date: Mon, 20 May 2024 14:55:29 +0530 Subject: [PATCH] =?UTF-8?q?=E2=AC=86=EF=B8=8F=20update=20dependencies?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/src/utils/emoji_parser.dart | 6 ----- lib/src/values/typedefs.dart | 5 ++++- lib/src/widgets/chat_view.dart | 3 ++- lib/src/widgets/emoji_picker_widget.dart | 28 ++++++++++++++++++------ pubspec.yaml | 19 +++++----------- 5 files changed, 33 insertions(+), 28 deletions(-) diff --git a/lib/src/utils/emoji_parser.dart b/lib/src/utils/emoji_parser.dart index 8b1b0aab..220ef3a2 100644 --- a/lib/src/utils/emoji_parser.dart +++ b/lib/src/utils/emoji_parser.dart @@ -1,7 +1,6 @@ import 'dart:convert'; import 'package:flutter/widgets.dart'; -import 'package:http/http.dart' as http; /// This is code is take from the https://github.com/petehouston/flutter-emoji/blob/master/lib/flutter_emoji.dart /// All Credit of below class goes to @petehouston flutter_emoji @@ -137,11 +136,6 @@ class EmojiParser { _init(jsonEmoji); } - Future initServerData() async { - final response = await http.get(Uri.parse(emojiSource)); - _init(response.body); - } - void _init(String dataset) { Map mapEmojis = jsonDecode(dataset); mapEmojis.forEach((k, v) { diff --git a/lib/src/values/typedefs.dart b/lib/src/values/typedefs.dart index 515e4f88..33f91ba1 100644 --- a/lib/src/values/typedefs.dart +++ b/lib/src/values/typedefs.dart @@ -35,4 +35,7 @@ typedef VoidCallBackWithFuture = Future Function(); typedef StringsCallBack = void Function(String emoji, String messageId); typedef StringWithReturnWidget = Widget Function(String separator); typedef DragUpdateDetailsCallback = void Function(DragUpdateDetails); -typedef MoreTapCallBack = void Function(Message message, bool sendByCurrentUser); +typedef MoreTapCallBack = void Function( + Message message, + bool sendByCurrentUser, +); diff --git a/lib/src/widgets/chat_view.dart b/lib/src/widgets/chat_view.dart index 073c1ff1..e033a059 100644 --- a/lib/src/widgets/chat_view.dart +++ b/lib/src/widgets/chat_view.dart @@ -254,7 +254,8 @@ class _ChatViewState extends State assignReplyMessage: (message) => _sendMessageKey .currentState ?.assignReplyMessage(message), - chatTextFieldTopPadding: widget.chatTextFieldTopPadding, + chatTextFieldTopPadding: + widget.chatTextFieldTopPadding, ); }, ), diff --git a/lib/src/widgets/emoji_picker_widget.dart b/lib/src/widgets/emoji_picker_widget.dart index fd1d5547..d2075e39 100644 --- a/lib/src/widgets/emoji_picker_widget.dart +++ b/lib/src/widgets/emoji_picker_widget.dart @@ -37,13 +37,15 @@ class EmojiPickerWidget extends StatelessWidget { @override Widget build(BuildContext context) { + final size = MediaQuery.sizeOf(context); return Container( padding: const EdgeInsets.only(top: 10, left: 15, right: 15), decoration: const BoxDecoration( color: Colors.white, borderRadius: BorderRadius.vertical(top: Radius.circular(16)), ), - height: MediaQuery.of(context).size.height / 2, + height: size.height * 0.6, + width: size.width, child: Column( children: [ Container( @@ -60,12 +62,24 @@ class EmojiPickerWidget extends StatelessWidget { onEmojiSelected: (Category? category, Emoji emoji) => onSelected(emoji.emoji), config: Config( - columns: 7, - emojiSizeMax: 32 * ((!kIsWeb && Platform.isIOS) ? 1.30 : 1.0), - initCategory: Category.RECENT, - bgColor: Colors.white, - recentTabBehavior: RecentTabBehavior.NONE, - recentsLimit: 28, + emojiViewConfig: EmojiViewConfig( + columns: 7, + emojiSizeMax: 32 * ((!kIsWeb && Platform.isIOS) ? 1.30 : 1.0), + recentsLimit: 28, + backgroundColor: Colors.white, + ), + searchViewConfig: const SearchViewConfig( + buttonIconColor: Colors.black, + ), + categoryViewConfig: const CategoryViewConfig( + initCategory: Category.RECENT, + recentTabBehavior: RecentTabBehavior.NONE, + ), + bottomActionBarConfig: const BottomActionBarConfig( + backgroundColor: Colors.white, + buttonIconColor: Colors.black, + buttonColor: Colors.white, + ), ), ), ), diff --git a/pubspec.yaml b/pubspec.yaml index ff39116d..0c6948c0 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -7,30 +7,23 @@ repository: https://github.com/SimformSolutionsPvtLtd/flutter_chatview platforms: android: ios: - linux: - macos: - web: - windows: environment: sdk: '>=3.0.3 <4.0.0' + flutter: '>=3.10.3' dependencies: flutter: sdk: flutter grouped_list: ^5.1.2 intl: ^0.19.0 - flutter_linkify: ^6.0.0 - url_launcher: ^6.1.7 - emoji_picker_flutter: ^1.6.0 - http: ^1.1.0 - html: ^0.15.1 - any_link_preview: ^3.0.0 - progress_indicators: ^1.0.0 + url_launcher: ^6.1.14 + emoji_picker_flutter: ^2.1.1 + any_link_preview: ^3.0.1 image_picker: '>=0.8.9 <2.0.0' - audio_waveforms: ^1.0.1 + audio_waveforms: ^1.0.5 # For formatting time locale in message receipts - timeago: ^3.4.0 + timeago: ^3.6.1 dev_dependencies: flutter_test: