update design

This commit is contained in:
hihihaha 2023-06-10 21:03:01 +02:00
parent 0274c2f070
commit 8c2227df73

View File

@ -434,14 +434,30 @@ class _SettingsScreenState extends State<SettingsScreen>
activeColor: Theme.of(context).colorScheme.secondary, activeColor: Theme.of(context).colorScheme.secondary,
), ),
), ),
PanelButton( Material(
padding: const EdgeInsets.only(left: 14.0), 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: [ title: Row(children: [
Icon(FeatherIcons.messageSquare,
color: Theme.of(context)
.colorScheme
.secondary
.withOpacity(
settings.notificationsEnabled ? 1 : .25)),
const SizedBox(width: 14.0),
Text( Text(
"notifications".i18n, "notifications".i18n,
style: TextStyle( style: TextStyle(
color: AppColors.of(context).text.withOpacity( color: AppColors.of(context).text.withOpacity(
settings.notificationsEnabled ? 1.0 : .5)), settings.notificationsEnabled ? 1.0 : .5),
fontWeight: FontWeight.w600,
fontSize: 16.0,
),
), ),
SizedBox( SizedBox(
width: 5, width: 5,
@ -455,24 +471,26 @@ class _SettingsScreenState extends State<SettingsScreen>
const EdgeInsets.only(left: 10, right: 10), const EdgeInsets.only(left: 10, right: 10),
child: Center( child: Center(
child: Text("BETA", child: Text("BETA",
style: TextStyle(fontSize: 9.1, color: AppColors.of(context).text.withOpacity(settings.notificationsEnabled ? 1.0 : .5), overflow: TextOverflow.ellipsis))), style: TextStyle(
fontSize: 9.1,
color: AppColors.of(context)
.text
.withOpacity(
settings.notificationsEnabled
? 1.0
: .5),
fontWeight: FontWeight.w600,
overflow: TextOverflow.ellipsis))),
), ),
decoration: BoxDecoration( decoration: BoxDecoration(
color: AppColors.of(context).filc.withOpacity(settings.notificationsEnabled ? 1.0 : .5), color: AppColors.of(context).filc.withOpacity(
settings.notificationsEnabled ? 1.0 : .5),
borderRadius: BorderRadius.circular(40)), borderRadius: BorderRadius.circular(40)),
), ),
) )
]), ]),
leading: settings.notificationsEnabled onChanged: (value) =>
? const Icon(FeatherIcons.messageSquare) settings.update(notificationsEnabled: value),
: Icon(FeatherIcons.messageSquare,
color:
AppColors.of(context).text.withOpacity(.25)),
trailing: Switch(
onChanged: (v) =>
settings.update(notificationsEnabled: v),
value: settings.notificationsEnabled,
activeColor: Theme.of(context).colorScheme.secondary,
), ),
), ),
], ],