forked from firka/student-legacy
update design
This commit is contained in:
parent
0274c2f070
commit
8c2227df73
@ -434,45 +434,63 @@ class _SettingsScreenState extends State<SettingsScreen>
|
||||
activeColor: Theme.of(context).colorScheme.secondary,
|
||||
),
|
||||
),
|
||||
PanelButton(
|
||||
padding: const EdgeInsets.only(left: 14.0),
|
||||
title: Row(children: [
|
||||
Text(
|
||||
"notifications".i18n,
|
||||
style: TextStyle(
|
||||
color: AppColors.of(context).text.withOpacity(
|
||||
settings.notificationsEnabled ? 1.0 : .5)),
|
||||
),
|
||||
SizedBox(
|
||||
width: 5,
|
||||
),
|
||||
SizedBox(
|
||||
height: 30,
|
||||
child: AnimatedContainer(
|
||||
duration: Duration(milliseconds: 200),
|
||||
child: Padding(
|
||||
padding:
|
||||
const EdgeInsets.only(left: 10, right: 10),
|
||||
child: Center(
|
||||
child: Text("BETA",
|
||||
style: TextStyle(fontSize: 9.1, color: AppColors.of(context).text.withOpacity(settings.notificationsEnabled ? 1.0 : .5), overflow: TextOverflow.ellipsis))),
|
||||
),
|
||||
decoration: BoxDecoration(
|
||||
color: AppColors.of(context).filc.withOpacity(settings.notificationsEnabled ? 1.0 : .5),
|
||||
borderRadius: BorderRadius.circular(40)),
|
||||
),
|
||||
)
|
||||
]),
|
||||
leading: settings.notificationsEnabled
|
||||
? const Icon(FeatherIcons.messageSquare)
|
||||
: Icon(FeatherIcons.messageSquare,
|
||||
color:
|
||||
AppColors.of(context).text.withOpacity(.25)),
|
||||
trailing: Switch(
|
||||
onChanged: (v) =>
|
||||
settings.update(notificationsEnabled: v),
|
||||
Material(
|
||||
type: MaterialType.transparency,
|
||||
child: SwitchListTile(
|
||||
value: settings.notificationsEnabled,
|
||||
activeColor: Theme.of(context).colorScheme.secondary,
|
||||
contentPadding: const EdgeInsets.only(left: 12.0),
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.circular(12.0)),
|
||||
title: Row(children: [
|
||||
Icon(FeatherIcons.messageSquare,
|
||||
color: Theme.of(context)
|
||||
.colorScheme
|
||||
.secondary
|
||||
.withOpacity(
|
||||
settings.notificationsEnabled ? 1 : .25)),
|
||||
const SizedBox(width: 14.0),
|
||||
Text(
|
||||
"notifications".i18n,
|
||||
style: TextStyle(
|
||||
color: AppColors.of(context).text.withOpacity(
|
||||
settings.notificationsEnabled ? 1.0 : .5),
|
||||
fontWeight: FontWeight.w600,
|
||||
fontSize: 16.0,
|
||||
),
|
||||
),
|
||||
SizedBox(
|
||||
width: 5,
|
||||
),
|
||||
SizedBox(
|
||||
height: 30,
|
||||
child: AnimatedContainer(
|
||||
duration: Duration(milliseconds: 200),
|
||||
child: Padding(
|
||||
padding:
|
||||
const EdgeInsets.only(left: 10, right: 10),
|
||||
child: Center(
|
||||
child: Text("BETA",
|
||||
style: TextStyle(
|
||||
fontSize: 9.1,
|
||||
color: AppColors.of(context)
|
||||
.text
|
||||
.withOpacity(
|
||||
settings.notificationsEnabled
|
||||
? 1.0
|
||||
: .5),
|
||||
fontWeight: FontWeight.w600,
|
||||
overflow: TextOverflow.ellipsis))),
|
||||
),
|
||||
decoration: BoxDecoration(
|
||||
color: AppColors.of(context).filc.withOpacity(
|
||||
settings.notificationsEnabled ? 1.0 : .5),
|
||||
borderRadius: BorderRadius.circular(40)),
|
||||
),
|
||||
)
|
||||
]),
|
||||
onChanged: (value) =>
|
||||
settings.update(notificationsEnabled: value),
|
||||
),
|
||||
),
|
||||
],
|
||||
|
Loading…
x
Reference in New Issue
Block a user