From 67c5c86c9a53657fe16e71326348c5beadbab178 Mon Sep 17 00:00:00 2001 From: Sagar Raj <78961406+sagarrajgit@users.noreply.github.com> Date: Sat, 13 Jan 2024 22:10:38 +0530 Subject: [PATCH] fix: overflow on selecting other languages (#325) Co-authored-by: Sagar Raj --- .../settings/views/enable_24Hour_format.dart | 8 +++++--- .../settings/views/enable_haptic_feedback.dart | 8 +++++--- .../settings/views/enable_sorted_alarm_list.dart | 16 +++++++++------- .../modules/settings/views/theme_value_tile.dart | 8 +++++--- lib/app/modules/settings/views/weather_api.dart | 8 +++++--- 5 files changed, 29 insertions(+), 19 deletions(-) diff --git a/lib/app/modules/settings/views/enable_24Hour_format.dart b/lib/app/modules/settings/views/enable_24Hour_format.dart index c1b064d4..e3601f2e 100644 --- a/lib/app/modules/settings/views/enable_24Hour_format.dart +++ b/lib/app/modules/settings/views/enable_24Hour_format.dart @@ -38,9 +38,11 @@ class _Enable24HourFormatState extends State { child: Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ - Text( - 'Enable 24 Hour Format'.tr, - style: Theme.of(context).textTheme.bodyLarge, + Expanded( + child: Text( + 'Enable 24 Hour Format'.tr, + style: Theme.of(context).textTheme.bodyLarge, + ), ), Obx( () => Switch.adaptive( diff --git a/lib/app/modules/settings/views/enable_haptic_feedback.dart b/lib/app/modules/settings/views/enable_haptic_feedback.dart index 2eec23df..918fa0be 100644 --- a/lib/app/modules/settings/views/enable_haptic_feedback.dart +++ b/lib/app/modules/settings/views/enable_haptic_feedback.dart @@ -38,9 +38,11 @@ class _EnableHapticFeedbackState extends State { child: Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ - Text( - 'Enable Haptic Feedback'.tr, - style: Theme.of(context).textTheme.bodyLarge, + Expanded( + child: Text( + 'Enable Haptic Feedback'.tr, + style: Theme.of(context).textTheme.bodyLarge, + ), ), Obx( () => Switch.adaptive( diff --git a/lib/app/modules/settings/views/enable_sorted_alarm_list.dart b/lib/app/modules/settings/views/enable_sorted_alarm_list.dart index 511c91df..8ddff420 100644 --- a/lib/app/modules/settings/views/enable_sorted_alarm_list.dart +++ b/lib/app/modules/settings/views/enable_sorted_alarm_list.dart @@ -43,13 +43,15 @@ class _EnableSortedAlarmListState extends State { child: Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ - Text( - 'Enable Sorted Alarm List'.tr, - style: Theme.of(context).textTheme.bodyLarge!.copyWith( - color: widget.themeController.isLightMode.value - ? kLightPrimaryTextColor - : kprimaryTextColor, - ), + Expanded( + child: Text( + 'Enable Sorted Alarm List'.tr, + style: Theme.of(context).textTheme.bodyLarge!.copyWith( + color: widget.themeController.isLightMode.value + ? kLightPrimaryTextColor + : kprimaryTextColor, + ), + ), ), Obx( () => Switch.adaptive( diff --git a/lib/app/modules/settings/views/theme_value_tile.dart b/lib/app/modules/settings/views/theme_value_tile.dart index 383992cd..7ec93661 100644 --- a/lib/app/modules/settings/views/theme_value_tile.dart +++ b/lib/app/modules/settings/views/theme_value_tile.dart @@ -39,9 +39,11 @@ class _ThemeValueTileState extends State { child: Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ - Text( - 'Enable Light Mode'.tr, - style: Theme.of(context).textTheme.bodyLarge, + Expanded( + child: Text( + 'Enable Light Mode'.tr, + style: Theme.of(context).textTheme.bodyLarge, + ), ), Obx( () => Switch.adaptive( diff --git a/lib/app/modules/settings/views/weather_api.dart b/lib/app/modules/settings/views/weather_api.dart index 5905e810..9bcc392a 100644 --- a/lib/app/modules/settings/views/weather_api.dart +++ b/lib/app/modules/settings/views/weather_api.dart @@ -305,9 +305,11 @@ class WeatherApi extends StatelessWidget { child: Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ - Text( - 'Open Weather Map API', - style: Theme.of(context).textTheme.bodyLarge, + Expanded( + child: Text( + 'Open Weather Map API', + style: Theme.of(context).textTheme.bodyLarge, + ), ), Icon( Icons.arrow_forward_ios_sharp,