From 93f0ace3cf900b91458d0a17b35260686539d3be Mon Sep 17 00:00:00 2001 From: Krille Date: Tue, 26 Mar 2024 08:25:31 +0100 Subject: [PATCH] chore: Follow up inputbar design --- lib/pages/chat/chat_input_row.dart | 32 +++++++++++++++--------------- lib/pages/chat/chat_view.dart | 30 ++++++++++++++-------------- 2 files changed, 31 insertions(+), 31 deletions(-) diff --git a/lib/pages/chat/chat_input_row.dart b/lib/pages/chat/chat_input_row.dart index c99216073..7bc939150 100644 --- a/lib/pages/chat/chat_input_row.dart +++ b/lib/pages/chat/chat_input_row.dart @@ -254,28 +254,28 @@ class ChatInputRow extends StatelessWidget { ), ), ), - if (PlatformInfos.platformCanRecord && - controller.sendController.text.isEmpty) - Container( - height: 56, - alignment: Alignment.center, - child: IconButton( + Container( + height: 56, + alignment: Alignment.center, + child: AnimatedCrossFade( + crossFadeState: PlatformInfos.platformCanRecord && + controller.sendController.text.isEmpty + ? CrossFadeState.showFirst + : CrossFadeState.showSecond, + duration: FluffyThemes.animationDuration, + sizeCurve: FluffyThemes.animationCurve, + firstChild: IconButton( tooltip: L10n.of(context)!.voiceMessage, - icon: const Icon(Icons.mic_none_outlined), onPressed: controller.voiceMessageAction, + icon: const Icon(Icons.mic_none_outlined), ), - ), - if (!PlatformInfos.isMobile || - controller.sendController.text.isNotEmpty) - Container( - height: 56, - alignment: Alignment.center, - child: IconButton( - icon: const Icon(Icons.send_outlined), + secondChild: IconButton( + tooltip: L10n.of(context)!.voiceMessage, onPressed: controller.send, - tooltip: L10n.of(context)!.send, + icon: const Icon(Icons.send_outlined), ), ), + ), ], ); } diff --git a/lib/pages/chat/chat_view.dart b/lib/pages/chat/chat_view.dart index 44040598f..56ff0e732 100644 --- a/lib/pages/chat/chat_view.dart +++ b/lib/pages/chat/chat_view.dart @@ -283,24 +283,24 @@ class ChatView extends StatelessWidget { ), alignment: Alignment.center, child: Material( - borderRadius: const BorderRadius.only( - bottomLeft: Radius.circular( - AppConfig.borderRadius, - ), - bottomRight: Radius.circular( - AppConfig.borderRadius, - ), - ), clipBehavior: Clip.hardEdge, color: Theme.of(context).brightness == Brightness.light - ? Colors.white - : Colors.black, - elevation: 4.0, - shadowColor: Theme.of(context) - .colorScheme - .onBackground - .withOpacity(0.33), + ? Colors.white.withOpacity(0.95) + : Colors.black.withOpacity(0.87), + shape: RoundedRectangleBorder( + borderRadius: const BorderRadius.only( + bottomLeft: Radius.circular( + AppConfig.borderRadius, + ), + bottomRight: Radius.circular( + AppConfig.borderRadius, + ), + ), + side: BorderSide( + color: Theme.of(context).dividerColor, + ), + ), child: controller.room.isAbandonedDMRoom == true ? Row( mainAxisAlignment: