From ddc62e33ea64d74ab2bb6bc05242c2c526bf5a71 Mon Sep 17 00:00:00 2001 From: Sikander Saleem Date: Tue, 30 Jan 2024 12:00:25 +0300 Subject: [PATCH] setting page improvement --- lib/new_views/pages/settings_page.dart | 86 +++++++++++++------------- 1 file changed, 42 insertions(+), 44 deletions(-) diff --git a/lib/new_views/pages/settings_page.dart b/lib/new_views/pages/settings_page.dart index 82769b9e..8c69498d 100644 --- a/lib/new_views/pages/settings_page.dart +++ b/lib/new_views/pages/settings_page.dart @@ -46,51 +46,49 @@ class _SettingsPageState extends State { }); return Scaffold( appBar: DefaultAppBar(title: context.translation.settings), - body: Card( - child: Column( - mainAxisSize: MainAxisSize.min, - children: [ - Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - context.translation.arabic.heading5(context), - AdvancedSwitch( - controller: langController, - activeColor: AppColor.green50.withOpacity(0.5), - inactiveColor: AppColor.neutral10, - thumb: CircleAvatar(backgroundColor: _settingProvider.language == "ar" ? AppColor.green50 : AppColor.neutral20), - borderRadius: const BorderRadius.all(Radius.circular(30)), - width: 42.toScreenWidth, - height: 24.toScreenHeight, + body: Column( + mainAxisSize: MainAxisSize.min, + children: [ + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + context.translation.arabic.heading5(context), + AdvancedSwitch( + controller: langController, + activeColor: AppColor.green50.withOpacity(0.5), + inactiveColor: AppColor.neutral10, + thumb: CircleAvatar(backgroundColor: _settingProvider.language == "ar" ? AppColor.green50 : AppColor.neutral20), + borderRadius: const BorderRadius.all(Radius.circular(30)), + width: 42.toScreenWidth, + height: 24.toScreenHeight, - /// TODO : remove the below attribute to enable the switch - //enabled: false, - disabledOpacity: 1, - ), - ], - ), - 16.height, - const Divider().defaultStyle(context), - 16.height, - Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - context.translation.lightTheme.heading5(context), - AdvancedSwitch( - controller: themeController, - activeColor: AppColor.green50.withOpacity(0.5), - inactiveColor: AppColor.neutral10, - thumb: CircleAvatar(backgroundColor: _settingProvider.theme == "light" ? AppColor.green50 : AppColor.neutral20), - borderRadius: const BorderRadius.all(Radius.circular(30)), - width: 42.toScreenWidth, - height: 24.toScreenHeight, - disabledOpacity: 1, - ), - ], - ), - ], - ).paddingAll(16), - ).paddingAll(16), + /// TODO : remove the below attribute to enable the switch + //enabled: false, + disabledOpacity: 1, + ), + ], + ), + 16.height, + const Divider().defaultStyle(context), + 16.height, + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + context.translation.lightTheme.heading5(context), + AdvancedSwitch( + controller: themeController, + activeColor: AppColor.green50.withOpacity(0.5), + inactiveColor: AppColor.neutral10, + thumb: CircleAvatar(backgroundColor: _settingProvider.theme == "light" ? AppColor.green50 : AppColor.neutral20), + borderRadius: const BorderRadius.all(Radius.circular(30)), + width: 42.toScreenWidth, + height: 24.toScreenHeight, + disabledOpacity: 1, + ), + ], + ), + ], + ).toShadowContainer(context).paddingAll(16), ); } }