diff --git a/lib/pages_desktop_specific/address_book_view/subwidgets/desktop_address_card.dart b/lib/pages_desktop_specific/address_book_view/subwidgets/desktop_address_card.dart index 518e593b0..02c2e9991 100644 --- a/lib/pages_desktop_specific/address_book_view/subwidgets/desktop_address_card.dart +++ b/lib/pages_desktop_specific/address_book_view/subwidgets/desktop_address_card.dart @@ -6,17 +6,17 @@ import 'package:stackwallet/models/contact_address_entry.dart'; import 'package:stackwallet/notifications/show_flush_bar.dart'; import 'package:stackwallet/pages/address_book_views/subviews/edit_contact_address_view.dart'; import 'package:stackwallet/providers/ui/address_book_providers/address_entry_data_provider.dart'; +import 'package:stackwallet/themes/coin_icon_provider.dart'; import 'package:stackwallet/utilities/assets.dart'; import 'package:stackwallet/utilities/clipboard_interface.dart'; import 'package:stackwallet/utilities/enums/coin_enum.dart'; -import 'package:stackwallet/utilities/enums/flush_bar_type.dart'; import 'package:stackwallet/utilities/text_styles.dart'; import 'package:stackwallet/utilities/theme/stack_colors.dart'; import 'package:stackwallet/widgets/custom_buttons/app_bar_icon_button.dart'; import 'package:stackwallet/widgets/custom_buttons/blue_text_button.dart'; import 'package:stackwallet/widgets/desktop/desktop_dialog.dart'; -class DesktopAddressCard extends StatelessWidget { +class DesktopAddressCard extends ConsumerWidget { const DesktopAddressCard({ Key? key, required this.entry, @@ -29,14 +29,12 @@ class DesktopAddressCard extends StatelessWidget { final ClipboardInterface clipboard; @override - Widget build(BuildContext context) { + Widget build(BuildContext context, WidgetRef ref) { return Row( crossAxisAlignment: CrossAxisAlignment.start, children: [ SvgPicture.asset( - Assets.svg.iconFor( - coin: entry.coin, - ), + ref.watch(coinIconProvider(entry.coin)), height: 32, width: 32, ), diff --git a/lib/pages_desktop_specific/settings/settings_menu/nodes_settings.dart b/lib/pages_desktop_specific/settings/settings_menu/nodes_settings.dart index 4a9cecc65..2861187a8 100644 --- a/lib/pages_desktop_specific/settings/settings_menu/nodes_settings.dart +++ b/lib/pages_desktop_specific/settings/settings_menu/nodes_settings.dart @@ -6,6 +6,7 @@ import 'package:flutter_svg/svg.dart'; import 'package:stackwallet/pages/settings_views/global_settings_view/manage_nodes_views/coin_nodes_view.dart'; import 'package:stackwallet/providers/providers.dart'; import 'package:stackwallet/route_generator.dart'; +import 'package:stackwallet/themes/coin_icon_provider.dart'; import 'package:stackwallet/utilities/assets.dart'; import 'package:stackwallet/utilities/constants.dart'; import 'package:stackwallet/utilities/enums/coin_enum.dart'; @@ -54,10 +55,10 @@ class _NodesSettings extends ConsumerState { void initState() { _coins = _coins.toList(); _coins.remove(Coin.firoTestNet); - if (Platform.isWindows) { - _coins.remove(Coin.monero); - _coins.remove(Coin.wownero); - } + if (Platform.isWindows) { + _coins.remove(Coin.monero); + _coins.remove(Coin.wownero); + } searchNodeController = TextEditingController(); searchNodeFocusNode = FocusNode(); @@ -250,7 +251,7 @@ class _NodesSettings extends ConsumerState { Row( children: [ SvgPicture.asset( - Assets.svg.iconFor(coin: coin), + ref.watch(coinIconProvider(coin)), width: 24, height: 24, ),