From 0852a75d9ff82485b92da58ba6040206e27e21bc Mon Sep 17 00:00:00 2001 From: "Alexander \"PapaTutuWawa" Date: Sat, 3 Dec 2022 13:11:48 +0100 Subject: [PATCH] fix(ui): The timer was opaque during hit testing when not recording --- lib/ui/pages/conversation/bottom.dart | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/lib/ui/pages/conversation/bottom.dart b/lib/ui/pages/conversation/bottom.dart index 8bf5b5dc..5bea8d7b 100644 --- a/lib/ui/pages/conversation/bottom.dart +++ b/lib/ui/pages/conversation/bottom.dart @@ -359,17 +359,19 @@ class ConversationBottomRowState extends State { return AnimatedOpacity( opacity: state.isRecording ? 1 : 0, duration: const Duration(milliseconds: 300), - child: SizedBox( - height: 38, - child: DecoratedBox( - decoration: BoxDecoration( - borderRadius: BorderRadius.circular(textfieldRadiusConversation), - color: Theme.of(context).scaffoldBackgroundColor, - ), - // NOTE: We use a comprehension here so that the widget gets - // created and destroyed to prevent the timer from running - // until the user closes the page. - child: state.isRecording ? + child: IgnorePointer( + ignoring: !state.isRecording, + child: SizedBox( + height: 38, + child: DecoratedBox( + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(textfieldRadiusConversation), + color: Theme.of(context).scaffoldBackgroundColor, + ), + // NOTE: We use a comprehension here so that the widget gets + // created and destroyed to prevent the timer from running + // until the user closes the page. + child: state.isRecording ? const Align( alignment: Alignment.centerLeft, child: Padding( @@ -378,6 +380,7 @@ class ConversationBottomRowState extends State { ), ) : null, + ), ), ), );