|
|
|
|
@ -46,51 +46,49 @@ class _SettingsPageState extends State<SettingsPage> {
|
|
|
|
|
});
|
|
|
|
|
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),
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|