setting page improvement

main_design2.0
Sikander Saleem 2 years ago
parent 72a8df3e4f
commit ddc62e33ea

@ -46,51 +46,49 @@ class _SettingsPageState extends State<SettingsPage> {
}); });
return Scaffold( return Scaffold(
appBar: DefaultAppBar(title: context.translation.settings), appBar: DefaultAppBar(title: context.translation.settings),
body: Card( body: Column(
child: Column( mainAxisSize: MainAxisSize.min,
mainAxisSize: MainAxisSize.min, children: [
children: [ Row(
Row( mainAxisAlignment: MainAxisAlignment.spaceBetween,
mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [
children: [ context.translation.arabic.heading5(context),
context.translation.arabic.heading5(context), AdvancedSwitch(
AdvancedSwitch( controller: langController,
controller: langController, activeColor: AppColor.green50.withOpacity(0.5),
activeColor: AppColor.green50.withOpacity(0.5), inactiveColor: AppColor.neutral10,
inactiveColor: AppColor.neutral10, thumb: CircleAvatar(backgroundColor: _settingProvider.language == "ar" ? AppColor.green50 : AppColor.neutral20),
thumb: CircleAvatar(backgroundColor: _settingProvider.language == "ar" ? AppColor.green50 : AppColor.neutral20), borderRadius: const BorderRadius.all(Radius.circular(30)),
borderRadius: const BorderRadius.all(Radius.circular(30)), width: 42.toScreenWidth,
width: 42.toScreenWidth, height: 24.toScreenHeight,
height: 24.toScreenHeight,
/// TODO : remove the below attribute to enable the switch /// TODO : remove the below attribute to enable the switch
//enabled: false, //enabled: false,
disabledOpacity: 1, disabledOpacity: 1,
), ),
], ],
), ),
16.height, 16.height,
const Divider().defaultStyle(context), const Divider().defaultStyle(context),
16.height, 16.height,
Row( Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [ children: [
context.translation.lightTheme.heading5(context), context.translation.lightTheme.heading5(context),
AdvancedSwitch( AdvancedSwitch(
controller: themeController, controller: themeController,
activeColor: AppColor.green50.withOpacity(0.5), activeColor: AppColor.green50.withOpacity(0.5),
inactiveColor: AppColor.neutral10, inactiveColor: AppColor.neutral10,
thumb: CircleAvatar(backgroundColor: _settingProvider.theme == "light" ? AppColor.green50 : AppColor.neutral20), thumb: CircleAvatar(backgroundColor: _settingProvider.theme == "light" ? AppColor.green50 : AppColor.neutral20),
borderRadius: const BorderRadius.all(Radius.circular(30)), borderRadius: const BorderRadius.all(Radius.circular(30)),
width: 42.toScreenWidth, width: 42.toScreenWidth,
height: 24.toScreenHeight, height: 24.toScreenHeight,
disabledOpacity: 1, disabledOpacity: 1,
), ),
], ],
), ),
], ],
).paddingAll(16), ).toShadowContainer(context).paddingAll(16),
).paddingAll(16),
); );
} }
} }

Loading…
Cancel
Save