From f3141f955dd4d2beb9a7fc210bf1cb9faf4e0b75 Mon Sep 17 00:00:00 2001 From: Krille Date: Wed, 27 Mar 2024 09:21:46 +0100 Subject: [PATCH] chore: Follow up design --- lib/pages/chat/chat_input_row.dart | 61 +++++++++++------------- lib/pages/chat/events/state_message.dart | 1 - 2 files changed, 29 insertions(+), 33 deletions(-) diff --git a/lib/pages/chat/chat_input_row.dart b/lib/pages/chat/chat_input_row.dart index c3cb6ea09..b548c606b 100644 --- a/lib/pages/chat/chat_input_row.dart +++ b/lib/pages/chat/chat_input_row.dart @@ -268,38 +268,35 @@ class ChatInputRow extends StatelessWidget { height: height, width: height, alignment: Alignment.center, - child: AnimatedCrossFade( - crossFadeState: PlatformInfos.platformCanRecord && - controller.sendController.text.isEmpty - ? CrossFadeState.showFirst - : CrossFadeState.showSecond, - duration: FluffyThemes.animationDuration, - sizeCurve: FluffyThemes.animationCurve, - firstChild: FloatingActionButton.small( - tooltip: L10n.of(context)!.voiceMessage, - onPressed: controller.voiceMessageAction, - elevation: 0, - heroTag: null, - shape: RoundedRectangleBorder( - borderRadius: BorderRadius.circular(height), - ), - backgroundColor: Theme.of(context).colorScheme.primary, - foregroundColor: Theme.of(context).colorScheme.onPrimary, - child: const Icon(Icons.mic_none_outlined), - ), - secondChild: FloatingActionButton.small( - tooltip: L10n.of(context)!.voiceMessage, - onPressed: controller.send, - elevation: 0, - heroTag: null, - shape: RoundedRectangleBorder( - borderRadius: BorderRadius.circular(height), - ), - backgroundColor: Theme.of(context).colorScheme.secondary, - foregroundColor: Theme.of(context).colorScheme.onSecondary, - child: const Icon(Icons.send_outlined), - ), - ), + child: PlatformInfos.platformCanRecord && + controller.sendController.text.isEmpty + ? FloatingActionButton.small( + tooltip: L10n.of(context)!.voiceMessage, + onPressed: controller.voiceMessageAction, + elevation: 0, + heroTag: null, + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.circular(height), + ), + backgroundColor: Theme.of(context).colorScheme.primary, + foregroundColor: + Theme.of(context).colorScheme.onPrimary, + child: const Icon(Icons.mic_none_outlined), + ) + : FloatingActionButton.small( + tooltip: L10n.of(context)!.send, + onPressed: controller.send, + elevation: 0, + heroTag: null, + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.circular(height), + ), + backgroundColor: + Theme.of(context).colorScheme.onPrimaryContainer, + foregroundColor: + Theme.of(context).colorScheme.onPrimary, + child: const Icon(Icons.send_outlined), + ), ), ], ); diff --git a/lib/pages/chat/events/state_message.dart b/lib/pages/chat/events/state_message.dart index 1502e82f6..861247b95 100644 --- a/lib/pages/chat/events/state_message.dart +++ b/lib/pages/chat/events/state_message.dart @@ -32,7 +32,6 @@ class StateMessage extends StatelessWidget { textAlign: TextAlign.center, style: TextStyle( fontSize: 12 * AppConfig.fontSizeFactor, - color: Theme.of(context).colorScheme.secondary, decoration: event.redacted ? TextDecoration.lineThrough : null, ),