From 19268d2ed102cf2cf9c51a9838da9f07630dbfe6 Mon Sep 17 00:00:00 2001 From: Sikander Saleem Date: Sun, 26 Oct 2025 17:33:45 +0300 Subject: [PATCH] improvements --- lib/views/pages/temporary_chat_ui.dart | 42 ++++++++++++++++---------- 1 file changed, 26 insertions(+), 16 deletions(-) diff --git a/lib/views/pages/temporary_chat_ui.dart b/lib/views/pages/temporary_chat_ui.dart index 3584fe6c..c50a8938 100644 --- a/lib/views/pages/temporary_chat_ui.dart +++ b/lib/views/pages/temporary_chat_ui.dart @@ -91,23 +91,33 @@ class _TemporaryChatUIState extends State { width: 50, alignment: Alignment.center, decoration: const BoxDecoration(shape: BoxShape.circle, color: AppColor.neutral30), - child: const Icon(Icons.send_rounded).onPress(() { - if (textEditingController.text.isNotEmpty) { - final comment = GasRefillComment( - id: 0, - gasRefillId: 0, - comment: textEditingController.text, - createdOn: DateTime.now().toIso8601String(), - createdBy: CreatedBy(userId: isSender ? "0" : "1", userName: isSender ? "Me" : "User"), - ); - isSender = !isSender; - chatList.add(comment); - textEditingController.clear(); + child: IconButton( + splashColor: Colors.transparent, + hoverColor: Colors.transparent, + highlightColor: Colors.transparent, + onPressed: () { + if (textEditingController.text.isNotEmpty) { + final comment = GasRefillComment( + id: 0, + gasRefillId: 0, + comment: textEditingController.text, + createdOn: DateTime.now().toIso8601String(), + createdBy: CreatedBy(userId: isSender ? "0" : "1", userName: isSender ? "Me" : "User"), + ); + isSender = !isSender; + chatList.add(comment); + textEditingController.clear(); - chatList.sort((a, b) => DateTime.parse(b.createdOn!).compareTo(DateTime.parse(a.createdOn!))); - setState(() {}); - } - })), + chatList.sort((a, b) => DateTime.parse(b.createdOn!).compareTo(DateTime.parse(a.createdOn!))); + setState(() {}); + } + }, + icon: const Icon(Icons.send_rounded)) + + // const Icon(Icons.send_rounded).onPress(() { + // + // }) + ), ], ), ),