From 8c2227df737546e5ad7ee33070adabaf922e7c18 Mon Sep 17 00:00:00 2001 From: hihihaha Date: Sat, 10 Jun 2023 21:03:01 +0200 Subject: [PATCH] update design --- .../lib/screens/settings/settings_screen.dart | 92 +++++++++++-------- 1 file changed, 55 insertions(+), 37 deletions(-) diff --git a/filcnaplo_mobile_ui/lib/screens/settings/settings_screen.dart b/filcnaplo_mobile_ui/lib/screens/settings/settings_screen.dart index 0d1bcdd..082c316 100755 --- a/filcnaplo_mobile_ui/lib/screens/settings/settings_screen.dart +++ b/filcnaplo_mobile_ui/lib/screens/settings/settings_screen.dart @@ -434,45 +434,63 @@ class _SettingsScreenState extends State 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), ), ), ],