From 8f5da9c4da6b68374677bcd49e094649fa722995 Mon Sep 17 00:00:00 2001 From: julian Date: Tue, 9 May 2023 10:30:06 -0600 Subject: [PATCH] fix: add missing buy image to theme and fix a couple other asset refs --- lib/models/isar/stack_theme.dart | 4 ++++ lib/pages/send_view/confirm_transaction_view.dart | 8 ++++++-- lib/pages_desktop_specific/desktop_menu_item.dart | 2 +- .../wallet_view/sub_widgets/desktop_wallet_features.dart | 3 ++- 4 files changed, 13 insertions(+), 4 deletions(-) diff --git a/lib/models/isar/stack_theme.dart b/lib/models/isar/stack_theme.dart index 978dd5edf..39ffdb52b 100644 --- a/lib/models/isar/stack_theme.dart +++ b/lib/models/isar/stack_theme.dart @@ -1983,6 +1983,7 @@ class StackTheme { @Embedded(inheritance: false) class ThemeAssets { final String bellNew; + final String buy; final String personaIncognito; final String personaEasy; final String stack; @@ -2035,6 +2036,7 @@ class ThemeAssets { ThemeAssets({ required this.bellNew, + required this.buy, required this.personaIncognito, required this.personaEasy, required this.stack, @@ -2092,6 +2094,8 @@ class ThemeAssets { return ThemeAssets( bellNew: "$applicationThemesDirectoryPath/$internalThemeUuid/${json["assets"]["bell_new"] as String}", + buy: + "$applicationThemesDirectoryPath/$internalThemeUuid/${json["assets"]["buy"] as String}", personaIncognito: "$applicationThemesDirectoryPath/$internalThemeUuid/${json["assets"]["persona_incognito"] as String}", personaEasy: diff --git a/lib/pages/send_view/confirm_transaction_view.dart b/lib/pages/send_view/confirm_transaction_view.dart index a6dd1bcc0..6b53bda77 100644 --- a/lib/pages/send_view/confirm_transaction_view.dart +++ b/lib/pages/send_view/confirm_transaction_view.dart @@ -18,8 +18,8 @@ import 'package:stackwallet/route_generator.dart'; import 'package:stackwallet/services/coins/epiccash/epiccash_wallet.dart'; import 'package:stackwallet/services/coins/firo/firo_wallet.dart'; import 'package:stackwallet/services/mixins/paynym_wallet_interface.dart'; +import 'package:stackwallet/themes/theme_providers.dart'; import 'package:stackwallet/utilities/amount/amount.dart'; -import 'package:stackwallet/utilities/assets.dart'; import 'package:stackwallet/utilities/constants.dart'; import 'package:stackwallet/utilities/enums/coin_enum.dart'; import 'package:stackwallet/utilities/text_styles.dart'; @@ -515,7 +515,11 @@ class _ConfirmTransactionViewState child: Row( children: [ SvgPicture.asset( - Assets.svg.send(context), + ref.watch( + themeProvider.select( + (value) => value.assets.send, + ), + ), width: 32, height: 32, ), diff --git a/lib/pages_desktop_specific/desktop_menu_item.dart b/lib/pages_desktop_specific/desktop_menu_item.dart index eedaea60c..b1fe00236 100644 --- a/lib/pages_desktop_specific/desktop_menu_item.dart +++ b/lib/pages_desktop_specific/desktop_menu_item.dart @@ -62,7 +62,7 @@ class DesktopBuyIcon extends ConsumerWidget { @override Widget build(BuildContext context, WidgetRef ref) { return SvgPicture.asset( - Assets.svg.buy(context), + ref.watch(themeProvider.select((value) => value.assets.buy)), width: 20, height: 20, color: DesktopMenuItemId.buy == diff --git a/lib/pages_desktop_specific/my_stack_view/wallet_view/sub_widgets/desktop_wallet_features.dart b/lib/pages_desktop_specific/my_stack_view/wallet_view/sub_widgets/desktop_wallet_features.dart index aef5b8f00..dd0915c34 100644 --- a/lib/pages_desktop_specific/my_stack_view/wallet_view/sub_widgets/desktop_wallet_features.dart +++ b/lib/pages_desktop_specific/my_stack_view/wallet_view/sub_widgets/desktop_wallet_features.dart @@ -17,6 +17,7 @@ import 'package:stackwallet/providers/providers.dart'; import 'package:stackwallet/providers/wallet/my_paynym_account_state_provider.dart'; import 'package:stackwallet/services/coins/firo/firo_wallet.dart'; import 'package:stackwallet/services/mixins/paynym_wallet_interface.dart'; +import 'package:stackwallet/themes/theme_providers.dart'; import 'package:stackwallet/utilities/amount/amount.dart'; import 'package:stackwallet/utilities/assets.dart'; import 'package:stackwallet/utilities/constants.dart'; @@ -347,7 +348,7 @@ class _DesktopWalletFeaturesState extends ConsumerState { width: buttonWidth, buttonHeight: ButtonHeight.l, icon: SvgPicture.asset( - Assets.svg.buy(context), + ref.watch(themeProvider.select((value) => value.assets.buy)), height: 20, width: 20, color: Theme.of(context)