WIP: replace coin icons

This commit is contained in:
ryleedavis 2023-05-03 09:36:24 -06:00
parent d1d6eae78b
commit f4509dc70d
2 changed files with 10 additions and 11 deletions

View file

@ -6,17 +6,17 @@ import 'package:stackwallet/models/contact_address_entry.dart';
import 'package:stackwallet/notifications/show_flush_bar.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/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/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/assets.dart';
import 'package:stackwallet/utilities/clipboard_interface.dart'; import 'package:stackwallet/utilities/clipboard_interface.dart';
import 'package:stackwallet/utilities/enums/coin_enum.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/text_styles.dart';
import 'package:stackwallet/utilities/theme/stack_colors.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/app_bar_icon_button.dart';
import 'package:stackwallet/widgets/custom_buttons/blue_text_button.dart'; import 'package:stackwallet/widgets/custom_buttons/blue_text_button.dart';
import 'package:stackwallet/widgets/desktop/desktop_dialog.dart'; import 'package:stackwallet/widgets/desktop/desktop_dialog.dart';
class DesktopAddressCard extends StatelessWidget { class DesktopAddressCard extends ConsumerWidget {
const DesktopAddressCard({ const DesktopAddressCard({
Key? key, Key? key,
required this.entry, required this.entry,
@ -29,14 +29,12 @@ class DesktopAddressCard extends StatelessWidget {
final ClipboardInterface clipboard; final ClipboardInterface clipboard;
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context, WidgetRef ref) {
return Row( return Row(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
SvgPicture.asset( SvgPicture.asset(
Assets.svg.iconFor( ref.watch(coinIconProvider(entry.coin)),
coin: entry.coin,
),
height: 32, height: 32,
width: 32, width: 32,
), ),

View file

@ -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/pages/settings_views/global_settings_view/manage_nodes_views/coin_nodes_view.dart';
import 'package:stackwallet/providers/providers.dart'; import 'package:stackwallet/providers/providers.dart';
import 'package:stackwallet/route_generator.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/assets.dart';
import 'package:stackwallet/utilities/constants.dart'; import 'package:stackwallet/utilities/constants.dart';
import 'package:stackwallet/utilities/enums/coin_enum.dart'; import 'package:stackwallet/utilities/enums/coin_enum.dart';
@ -54,10 +55,10 @@ class _NodesSettings extends ConsumerState<NodesSettings> {
void initState() { void initState() {
_coins = _coins.toList(); _coins = _coins.toList();
_coins.remove(Coin.firoTestNet); _coins.remove(Coin.firoTestNet);
if (Platform.isWindows) { if (Platform.isWindows) {
_coins.remove(Coin.monero); _coins.remove(Coin.monero);
_coins.remove(Coin.wownero); _coins.remove(Coin.wownero);
} }
searchNodeController = TextEditingController(); searchNodeController = TextEditingController();
searchNodeFocusNode = FocusNode(); searchNodeFocusNode = FocusNode();
@ -250,7 +251,7 @@ class _NodesSettings extends ConsumerState<NodesSettings> {
Row( Row(
children: [ children: [
SvgPicture.asset( SvgPicture.asset(
Assets.svg.iconFor(coin: coin), ref.watch(coinIconProvider(coin)),
width: 24, width: 24,
height: 24, height: 24,
), ),