diff --git a/lib/ui/components/action_button/action_button.dart b/lib/ui/components/action_button/action_button.dart index 3a518496..6572794b 100644 --- a/lib/ui/components/action_button/action_button.dart +++ b/lib/ui/components/action_button/action_button.dart @@ -1,5 +1,4 @@ import 'package:flutter/material.dart'; -import 'package:selfprivacy/config/brand_colors.dart'; class ActionButton extends StatelessWidget { const ActionButton({ @@ -20,7 +19,9 @@ class ActionButton extends StatelessWidget { return TextButton( child: Text( text!, - style: isRed ? const TextStyle(color: BrandColors.red1) : null, + style: isRed + ? TextStyle(color: Theme.of(context).colorScheme.error) + : null, ), onPressed: () { navigator.pop(); diff --git a/lib/ui/components/brand_cards/brand_cards.dart b/lib/ui/components/brand_cards/brand_cards.dart index 91737885..c9196000 100644 --- a/lib/ui/components/brand_cards/brand_cards.dart +++ b/lib/ui/components/brand_cards/brand_cards.dart @@ -25,11 +25,15 @@ class BrandCards { static Widget filled({ required final Widget child, final bool tertiary = false, + final bool secondary = false, final bool error = false, + final bool clipped = true, }) => _FilledCard( tertiary: tertiary, + secondary: secondary, error: error, + clipped: clipped, child: child, ); } @@ -82,25 +86,31 @@ class _OutlinedCard extends StatelessWidget { class _FilledCard extends StatelessWidget { const _FilledCard({ required this.child, + required this.secondary, required this.tertiary, required this.error, + required this.clipped, }); final Widget child; final bool tertiary; final bool error; + final bool clipped; + final bool secondary; @override Widget build(final BuildContext context) => Card( elevation: 0.0, shape: const RoundedRectangleBorder( borderRadius: BorderRadius.all(Radius.circular(12)), ), - clipBehavior: Clip.antiAlias, + clipBehavior: clipped ? Clip.antiAlias : Clip.none, color: error ? Theme.of(context).colorScheme.errorContainer - : tertiary - ? Theme.of(context).colorScheme.tertiaryContainer - : Theme.of(context).colorScheme.surfaceVariant, + : secondary + ? Theme.of(context).colorScheme.secondaryContainer + : tertiary + ? Theme.of(context).colorScheme.tertiaryContainer + : Theme.of(context).colorScheme.surfaceVariant, child: child, ); } diff --git a/lib/ui/pages/backup_details/backup_details.dart b/lib/ui/pages/backup_details/backup_details.dart index 55a8dd12..c4a62284 100644 --- a/lib/ui/pages/backup_details/backup_details.dart +++ b/lib/ui/pages/backup_details/backup_details.dart @@ -1,6 +1,5 @@ import 'package:easy_localization/easy_localization.dart'; import 'package:flutter/material.dart'; -import 'package:selfprivacy/config/brand_colors.dart'; import 'package:selfprivacy/config/get_it_config.dart'; import 'package:selfprivacy/logic/cubit/server_installation/server_installation_cubit.dart'; import 'package:selfprivacy/logic/cubit/backups/backups_cubit.dart'; @@ -110,9 +109,9 @@ class _BackupDetailsState extends State ), if (backupStatus == BackupStatusEnum.error) ListTile( - leading: const Icon( + leading: Icon( Icons.error_outline, - color: BrandColors.red1, + color: Theme.of(context).colorScheme.error, ), title: Text( 'providers.backup.error_pending'.tr(),