diff --git a/lib/pages/address_book_views/subviews/add_address_book_entry_view.dart b/lib/pages/address_book_views/subviews/add_address_book_entry_view.dart index 808a3bb48..c196e7b5b 100644 --- a/lib/pages/address_book_views/subviews/add_address_book_entry_view.dart +++ b/lib/pages/address_book_views/subviews/add_address_book_entry_view.dart @@ -127,8 +127,8 @@ class _AddAddressBookEntryViewState icon: SvgPicture.asset( Assets.svg.star, color: _isFavorite - ? StackTheme.instance.color.accentColorRed - : StackTheme.instance.color.buttonBackSecondary, + ? StackTheme.instance.color.favoriteStarActive + : StackTheme.instance.color.favoriteStarInactive, width: 20, height: 20, ), diff --git a/lib/pages/address_book_views/subviews/contact_details_view.dart b/lib/pages/address_book_views/subviews/contact_details_view.dart index b74d9d693..9b22e7f49 100644 --- a/lib/pages/address_book_views/subviews/contact_details_view.dart +++ b/lib/pages/address_book_views/subviews/contact_details_view.dart @@ -133,8 +133,8 @@ class _ContactDetailsViewState extends ConsumerState { icon: SvgPicture.asset( Assets.svg.star, color: _contact.isFavorite - ? StackTheme.instance.color.infoItemIcons - : StackTheme.instance.color.buttonBackSecondary, + ? StackTheme.instance.color.favoriteStarActive + : StackTheme.instance.color.favoriteStarInactive, width: 20, height: 20, ), diff --git a/lib/pages/settings_views/wallet_settings_view/wallet_backup_views/wallet_backup_view.dart b/lib/pages/settings_views/wallet_settings_view/wallet_backup_views/wallet_backup_view.dart index 1ac496507..4ba7554e5 100644 --- a/lib/pages/settings_views/wallet_settings_view/wallet_backup_views/wallet_backup_view.dart +++ b/lib/pages/settings_views/wallet_settings_view/wallet_backup_views/wallet_backup_view.dart @@ -1,3 +1,5 @@ +import 'dart:async'; + import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; import 'package:flutter_riverpod/flutter_riverpod.dart'; @@ -57,16 +59,17 @@ class WalletBackupView extends ConsumerWidget { Assets.svg.copy, width: 20, height: 20, + color: StackTheme.instance.color.topNavIconPrimary, ), onPressed: () async { await clipboardInterface .setData(ClipboardData(text: mnemonic.join(" "))); - showFloatingFlushBar( + unawaited(showFloatingFlushBar( type: FlushBarType.info, message: "Copied to clipboard", iconAsset: Assets.svg.copy, context: context, - ); + )); }, ), ), diff --git a/lib/utilities/theme/color_theme.dart b/lib/utilities/theme/color_theme.dart index 1152ca38b..2425150ed 100644 --- a/lib/utilities/theme/color_theme.dart +++ b/lib/utilities/theme/color_theme.dart @@ -163,6 +163,9 @@ abstract class StackColorTheme { Color get stackWalletMid; Color get stackWalletBottom; Color get bottomNavShadow; + + Color get favoriteStarActive; + Color get favoriteStarInactive; } class CoinThemeColor { diff --git a/lib/utilities/theme/dark_colors.dart b/lib/utilities/theme/dark_colors.dart index 36e2d071c..65c6bcbe8 100644 --- a/lib/utilities/theme/dark_colors.dart +++ b/lib/utilities/theme/dark_colors.dart @@ -284,4 +284,9 @@ class DarkColors extends StackColorTheme { Color get stackWalletBottom => const Color(0xFFFFFFFF); @override Color get bottomNavShadow => const Color(0xFF282E33); + + @override + Color get favoriteStarActive => accentColorYellow; + @override + Color get favoriteStarInactive => textSubtitle2; } diff --git a/lib/utilities/theme/light_colors.dart b/lib/utilities/theme/light_colors.dart index 8b8499e76..6c7bb0941 100644 --- a/lib/utilities/theme/light_colors.dart +++ b/lib/utilities/theme/light_colors.dart @@ -284,4 +284,9 @@ class LightColors extends StackColorTheme { Color get stackWalletBottom => const Color(0xFF232323); @override Color get bottomNavShadow => const Color(0xFF282E33); + + @override + Color get favoriteStarActive => infoItemIcons; + @override + Color get favoriteStarInactive => textSubtitle3; } diff --git a/lib/widgets/custom_buttons/favorite_toggle.dart b/lib/widgets/custom_buttons/favorite_toggle.dart index cd2727f18..efa0c2756 100644 --- a/lib/widgets/custom_buttons/favorite_toggle.dart +++ b/lib/widgets/custom_buttons/favorite_toggle.dart @@ -35,8 +35,8 @@ class _FavoriteToggleState extends State { @override void initState() { - on = widget.on ?? StackTheme.instance.color.infoItemIcons; - off = widget.off ?? StackTheme.instance.color.buttonBackSecondary; + on = widget.on ?? StackTheme.instance.color.favoriteStarActive; + off = widget.off ?? StackTheme.instance.color.favoriteStarInactive; _isActive = widget.initialState; _color = _isActive ? on : off; _onChanged = widget.onChanged; diff --git a/lib/widgets/managed_favorite.dart b/lib/widgets/managed_favorite.dart index 1a87dcc31..c78712a60 100644 --- a/lib/widgets/managed_favorite.dart +++ b/lib/widgets/managed_favorite.dart @@ -33,20 +33,20 @@ class _ManagedFavoriteCardState extends ConsumerState { return RoundedWhiteContainer( padding: const EdgeInsets.all(4.0), child: RawMaterialButton( - onPressed: () async { + onPressed: () { final provider = ref .read(walletsChangeNotifierProvider) .getManagerProvider(manager.walletId); if (!manager.isFavorite) { ref.read(favoritesProvider).add(provider, true); ref.read(nonFavoritesProvider).remove(provider, true); - await ref + ref .read(walletsServiceChangeNotifierProvider) .addFavorite(manager.walletId); } else { ref.read(favoritesProvider).remove(provider, true); ref.read(nonFavoritesProvider).add(provider, true); - await ref + ref .read(walletsServiceChangeNotifierProvider) .removeFavorite(manager.walletId); }