chore: Adjust chat input row design

This commit is contained in:
Christian Kußowski 2026-02-14 22:01:44 +01:00
commit c5b683f842
No known key found for this signature in database
GPG key ID: E067ECD60F1A0652
2 changed files with 72 additions and 57 deletions

View file

@ -364,6 +364,13 @@ class ChatInputRow extends StatelessWidget {
onPressed: () => onPressed: () =>
ScaffoldMessenger.of(context).showSnackBar( ScaffoldMessenger.of(context).showSnackBar(
SnackBar( SnackBar(
margin: EdgeInsets.only(
bottom: height + 16,
left: 16,
right: 16,
top: 16,
),
showCloseIcon: true,
content: Text( content: Text(
L10n.of( L10n.of(
context, context,

View file

@ -22,31 +22,41 @@ class RecordingInputRow extends StatelessWidget {
'${state.duration.inMinutes.toString().padLeft(2, '0')}:${(state.duration.inSeconds % 60).toString().padLeft(2, '0')}'; '${state.duration.inMinutes.toString().padLeft(2, '0')}:${(state.duration.inSeconds % 60).toString().padLeft(2, '0')}';
return SizedBox( return SizedBox(
height: ChatInputRow.height, height: ChatInputRow.height,
child: Padding(
padding: const EdgeInsets.symmetric(horizontal: 8.0),
child: Row( child: Row(
crossAxisAlignment: .center, crossAxisAlignment: .center,
mainAxisAlignment: .spaceBetween, mainAxisAlignment: .spaceBetween,
spacing: 8,
children: [ children: [
IconButton( const SizedBox(width: 4),
Container(
alignment: .center,
width: 48,
child: IconButton(
tooltip: L10n.of(context).cancel, tooltip: L10n.of(context).cancel,
icon: const Icon(Icons.delete_outlined), icon: const Icon(Icons.delete_outlined),
color: theme.colorScheme.error, color: theme.colorScheme.error,
onPressed: state.cancel, onPressed: state.cancel,
), ),
),
if (state.isPaused) if (state.isPaused)
IconButton( Container(
alignment: .center,
width: 48,
child: IconButton(
tooltip: L10n.of(context).resume, tooltip: L10n.of(context).resume,
icon: const Icon(Icons.play_circle_outline_outlined), icon: const Icon(Icons.play_circle_outline_outlined),
onPressed: state.resume, onPressed: state.resume,
),
) )
else else
IconButton( Container(
alignment: .center,
width: 48,
child: IconButton(
tooltip: L10n.of(context).pause, tooltip: L10n.of(context).pause,
icon: const Icon(Icons.pause_circle_outline_outlined), icon: const Icon(Icons.pause_circle_outline_outlined),
onPressed: state.pause, onPressed: state.pause,
), ),
),
Text(time), Text(time),
Expanded( Expanded(
child: LayoutBuilder( child: LayoutBuilder(
@ -88,13 +98,11 @@ class RecordingInputRow extends StatelessWidget {
child: CircularProgressIndicator.adaptive(), child: CircularProgressIndicator.adaptive(),
) )
: const Icon(Icons.send_outlined), : const Icon(Icons.send_outlined),
onPressed: state.isSending onPressed: state.isSending ? null : () => state.stopAndSend(onSend),
? null
: () => state.stopAndSend(onSend),
), ),
const SizedBox(width: 4),
], ],
), ),
),
); );
} }
} }