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,
),
),
PanelButton(
padding: const EdgeInsets.only(left: 14.0),
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)),
settings.notificationsEnabled ? 1.0 : .5),
fontWeight: FontWeight.w600,
fontSize: 16.0,
),
),
SizedBox(
width: 5,
@ -455,24 +471,26 @@ class _SettingsScreenState extends State<SettingsScreen>
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))),
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),
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),
value: settings.notificationsEnabled,
activeColor: Theme.of(context).colorScheme.secondary,
onChanged: (value) =>
settings.update(notificationsEnabled: value),
),
),
],