fix(ui): The timer was opaque during hit testing when not recording

This commit is contained in:
PapaTutuWawa 2022-12-03 13:11:48 +01:00
parent 9affa0e89a
commit 0852a75d9f

View File

@ -359,17 +359,19 @@ class ConversationBottomRowState extends State<ConversationBottomRow> {
return AnimatedOpacity( return AnimatedOpacity(
opacity: state.isRecording ? 1 : 0, opacity: state.isRecording ? 1 : 0,
duration: const Duration(milliseconds: 300), duration: const Duration(milliseconds: 300),
child: SizedBox( child: IgnorePointer(
height: 38, ignoring: !state.isRecording,
child: DecoratedBox( child: SizedBox(
decoration: BoxDecoration( height: 38,
borderRadius: BorderRadius.circular(textfieldRadiusConversation), child: DecoratedBox(
color: Theme.of(context).scaffoldBackgroundColor, decoration: BoxDecoration(
), borderRadius: BorderRadius.circular(textfieldRadiusConversation),
// NOTE: We use a comprehension here so that the widget gets color: Theme.of(context).scaffoldBackgroundColor,
// created and destroyed to prevent the timer from running ),
// until the user closes the page. // NOTE: We use a comprehension here so that the widget gets
child: state.isRecording ? // created and destroyed to prevent the timer from running
// until the user closes the page.
child: state.isRecording ?
const Align( const Align(
alignment: Alignment.centerLeft, alignment: Alignment.centerLeft,
child: Padding( child: Padding(
@ -378,6 +380,7 @@ class ConversationBottomRowState extends State<ConversationBottomRow> {
), ),
) : ) :
null, null,
),
), ),
), ),
); );