From a0faa997306aba4043cfca0a03ab27d4cf3edcea Mon Sep 17 00:00:00 2001 From: ggurdin Date: Thu, 31 Oct 2024 15:01:56 -0400 Subject: [PATCH] restrict width of missing voice button --- .../widgets/chat/missing_voice_button.dart | 36 ++++++++++--------- 1 file changed, 20 insertions(+), 16 deletions(-) diff --git a/lib/pangea/widgets/chat/missing_voice_button.dart b/lib/pangea/widgets/chat/missing_voice_button.dart index b1f12c626..1765a9d20 100644 --- a/lib/pangea/widgets/chat/missing_voice_button.dart +++ b/lib/pangea/widgets/chat/missing_voice_button.dart @@ -40,23 +40,27 @@ class MissingVoiceButton extends StatelessWidget { ), padding: const EdgeInsets.all(8), margin: const EdgeInsets.only(top: 8), - child: Column( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Text( - L10n.of(context)!.voiceNotAvailable, - textAlign: TextAlign.center, - ), - TextButton( - onPressed: () => launchTTSSettings, - // commenting out as suspecting this is causing an issue - // #freeze-activity - style: const ButtonStyle( - tapTargetSize: MaterialTapTargetSize.shrinkWrap, + child: SizedBox( + width: AppConfig.toolbarMinWidth, + child: Column( + mainAxisSize: MainAxisSize.min, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Text( + L10n.of(context)!.voiceNotAvailable, + textAlign: TextAlign.center, ), - child: Text(L10n.of(context)!.openVoiceSettings), - ), - ], + TextButton( + onPressed: () => launchTTSSettings, + // commenting out as suspecting this is causing an issue + // #freeze-activity + style: const ButtonStyle( + tapTargetSize: MaterialTapTargetSize.shrinkWrap, + ), + child: Text(L10n.of(context)!.openVoiceSettings), + ), + ], + ), ), ); }