From 8d69617fd4b599430870cae427bb7254492e9761 Mon Sep 17 00:00:00 2001 From: julian Date: Tue, 20 Sep 2022 18:59:31 -0600 Subject: [PATCH] WIP light+dark icons --- .../dark/{bell-new_dark.svg => bell-new.svg} | 0 ...coins-icon_dark.svg => buy-coins-icon.svg} | 0 .../{exchange-2_dark.svg => exchange-2.svg} | 0 .../{stack-icon1_dark.svg => stack-icon1.svg} | 0 ...d_dark.svg => tx-exchange-icon-failed.svg} | 0 ..._dark.svg => tx-exchange-icon-pending.svg} | 0 ...exchange_dark.svg => tx-exchange-icon.svg} | 0 ...ed_dark.svg => tx-icon-receive-failed.svg} | 0 ...g_dark.svg => tx-icon-receive-pending.svg} | 0 ...n-receive_dark.svg => tx-icon-receive.svg} | 0 ...ailed_dark.svg => tx-icon-send-failed.svg} | 0 ...ding_dark.svg => tx-icon-send-pending.svg} | 0 ...tx-icon-send_dark.svg => tx-icon-send.svg} | 0 lib/utilities/assets.dart | 40 +++++++++++++------ pubspec.yaml | 33 ++++++++++----- 15 files changed, 49 insertions(+), 24 deletions(-) rename assets/svg/dark/{bell-new_dark.svg => bell-new.svg} (100%) rename assets/svg/dark/{buy-coins-icon_dark.svg => buy-coins-icon.svg} (100%) rename assets/svg/dark/{exchange-2_dark.svg => exchange-2.svg} (100%) rename assets/svg/dark/{stack-icon1_dark.svg => stack-icon1.svg} (100%) rename assets/svg/dark/{tx-exchange-icon-failed_dark.svg => tx-exchange-icon-failed.svg} (100%) rename assets/svg/dark/{tx-exchange-icon-pending_dark.svg => tx-exchange-icon-pending.svg} (100%) rename assets/svg/dark/{tx-icon-exchange_dark.svg => tx-exchange-icon.svg} (100%) rename assets/svg/dark/{tx-icon-receive-failed_dark.svg => tx-icon-receive-failed.svg} (100%) rename assets/svg/dark/{tx-icon-receive-pending_dark.svg => tx-icon-receive-pending.svg} (100%) rename assets/svg/dark/{tx-icon-receive_dark.svg => tx-icon-receive.svg} (100%) rename assets/svg/dark/{tx-icon-send-failed_dark.svg => tx-icon-send-failed.svg} (100%) rename assets/svg/dark/{tx-icon-send-pending_dark.svg => tx-icon-send-pending.svg} (100%) rename assets/svg/dark/{tx-icon-send_dark.svg => tx-icon-send.svg} (100%) diff --git a/assets/svg/dark/bell-new_dark.svg b/assets/svg/dark/bell-new.svg similarity index 100% rename from assets/svg/dark/bell-new_dark.svg rename to assets/svg/dark/bell-new.svg diff --git a/assets/svg/dark/buy-coins-icon_dark.svg b/assets/svg/dark/buy-coins-icon.svg similarity index 100% rename from assets/svg/dark/buy-coins-icon_dark.svg rename to assets/svg/dark/buy-coins-icon.svg diff --git a/assets/svg/dark/exchange-2_dark.svg b/assets/svg/dark/exchange-2.svg similarity index 100% rename from assets/svg/dark/exchange-2_dark.svg rename to assets/svg/dark/exchange-2.svg diff --git a/assets/svg/dark/stack-icon1_dark.svg b/assets/svg/dark/stack-icon1.svg similarity index 100% rename from assets/svg/dark/stack-icon1_dark.svg rename to assets/svg/dark/stack-icon1.svg diff --git a/assets/svg/dark/tx-exchange-icon-failed_dark.svg b/assets/svg/dark/tx-exchange-icon-failed.svg similarity index 100% rename from assets/svg/dark/tx-exchange-icon-failed_dark.svg rename to assets/svg/dark/tx-exchange-icon-failed.svg diff --git a/assets/svg/dark/tx-exchange-icon-pending_dark.svg b/assets/svg/dark/tx-exchange-icon-pending.svg similarity index 100% rename from assets/svg/dark/tx-exchange-icon-pending_dark.svg rename to assets/svg/dark/tx-exchange-icon-pending.svg diff --git a/assets/svg/dark/tx-icon-exchange_dark.svg b/assets/svg/dark/tx-exchange-icon.svg similarity index 100% rename from assets/svg/dark/tx-icon-exchange_dark.svg rename to assets/svg/dark/tx-exchange-icon.svg diff --git a/assets/svg/dark/tx-icon-receive-failed_dark.svg b/assets/svg/dark/tx-icon-receive-failed.svg similarity index 100% rename from assets/svg/dark/tx-icon-receive-failed_dark.svg rename to assets/svg/dark/tx-icon-receive-failed.svg diff --git a/assets/svg/dark/tx-icon-receive-pending_dark.svg b/assets/svg/dark/tx-icon-receive-pending.svg similarity index 100% rename from assets/svg/dark/tx-icon-receive-pending_dark.svg rename to assets/svg/dark/tx-icon-receive-pending.svg diff --git a/assets/svg/dark/tx-icon-receive_dark.svg b/assets/svg/dark/tx-icon-receive.svg similarity index 100% rename from assets/svg/dark/tx-icon-receive_dark.svg rename to assets/svg/dark/tx-icon-receive.svg diff --git a/assets/svg/dark/tx-icon-send-failed_dark.svg b/assets/svg/dark/tx-icon-send-failed.svg similarity index 100% rename from assets/svg/dark/tx-icon-send-failed_dark.svg rename to assets/svg/dark/tx-icon-send-failed.svg diff --git a/assets/svg/dark/tx-icon-send-pending_dark.svg b/assets/svg/dark/tx-icon-send-pending.svg similarity index 100% rename from assets/svg/dark/tx-icon-send-pending_dark.svg rename to assets/svg/dark/tx-icon-send-pending.svg diff --git a/assets/svg/dark/tx-icon-send_dark.svg b/assets/svg/dark/tx-icon-send.svg similarity index 100% rename from assets/svg/dark/tx-icon-send_dark.svg rename to assets/svg/dark/tx-icon-send.svg diff --git a/lib/utilities/assets.dart b/lib/utilities/assets.dart index 7c75daa3b..45b7f1134 100644 --- a/lib/utilities/assets.dart +++ b/lib/utilities/assets.dart @@ -1,4 +1,5 @@ import 'package:stackwallet/utilities/enums/coin_enum.dart'; +import 'package:stackwallet/utilities/theme/stack_theme.dart'; abstract class Assets { static const svg = _SVG(); @@ -22,8 +23,10 @@ class _SVG { String get plus => "assets/svg/plus.svg"; String get gear => "assets/svg/gear.svg"; String get bell => "assets/svg/bell.svg"; - String get bellNew => "assets/svg/bell-new.svg"; - String get stackIcon => "assets/svg/stack-icon1.svg"; + String get bellNew => + "assets/svg/${StackTheme.instance.theme.name}/bell-new.svg"; + String get stackIcon => + "assets/svg/${StackTheme.instance.theme.name}/stack-icon1.svg"; String get arrowLeft => "assets/svg/arrow-left-fa.svg"; String get star => "assets/svg/star.svg"; String get copy => "assets/svg/copy-fa.svg"; @@ -35,8 +38,10 @@ class _SVG { String get bars => "assets/svg/bars.svg"; String get filter => "assets/svg/filter.svg"; String get pending => "assets/svg/pending.svg"; - String get exchange => "assets/svg/exchange-2.svg"; - String get buy => "assets/svg/buy-coins-icon.svg"; + String get exchange => + "assets/svg/${StackTheme.instance.theme.name}/exchange-2.svg"; + String get buy => + "assets/svg/${StackTheme.instance.theme.name}/buy-coins-icon.svg"; String get radio => "assets/svg/signal-stream.svg"; String get arrowRotate => "assets/svg/arrow-rotate.svg"; String get arrowRotate2 => "assets/svg/arrow-rotate2.svg"; @@ -90,20 +95,29 @@ class _SVG { String get anonymizePending => "assets/svg/tx-icon-anonymize-pending.svg"; String get anonymizeFailed => "assets/svg/tx-icon-anonymize-failed.svg"; - String get receive => "assets/svg/tx-icon-receive.svg"; - String get receivePending => "assets/svg/tx-icon-receive-pending.svg"; - String get receiveCancelled => "assets/svg/tx-icon-receive-failed.svg"; + String get receive => + "assets/svg/${StackTheme.instance.theme.name}/tx-icon-receive.svg"; + String get receivePending => + "assets/svg/${StackTheme.instance.theme.name}/tx-icon-receive-pending.svg"; + String get receiveCancelled => + "assets/svg/${StackTheme.instance.theme.name}/tx-icon-receive-failed.svg"; - String get send => "assets/svg/tx-icon-send.svg"; - String get sendPending => "assets/svg/tx-icon-send-pending.svg"; - String get sendCancelled => "assets/svg/tx-icon-send-failed.svg"; + String get send => + "assets/svg/${StackTheme.instance.theme.name}/tx-icon-send.svg"; + String get sendPending => + "assets/svg/${StackTheme.instance.theme.name}/tx-icon-send-pending.svg"; + String get sendCancelled => + "assets/svg/${StackTheme.instance.theme.name}/tx-icon-send-failed.svg"; String get ellipse1 => "assets/svg/Ellipse-43.svg"; String get ellipse2 => "assets/svg/Ellipse-42.svg"; - String get txExchange => "assets/svg/tx-exchange-icon.svg"; - String get txExchangePending => "assets/svg/tx-exchange-icon-pending.svg"; - String get txExchangeFailed => "assets/svg/tx-exchange-icon-failed.svg"; + String get txExchange => + "assets/svg/${StackTheme.instance.theme.name}/tx-exchange-icon.svg"; + String get txExchangePending => + "assets/svg/${StackTheme.instance.theme.name}/tx-exchange-icon-pending.svg"; + String get txExchangeFailed => + "assets/svg/${StackTheme.instance.theme.name}/tx-exchange-icon-failed.svg"; String get bitcoin => "assets/svg/coin_icons/Bitcoin.svg"; String get dogecoin => "assets/svg/coin_icons/Dogecoin.svg"; diff --git a/pubspec.yaml b/pubspec.yaml index e6cc0c249..18012b2fa 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -190,7 +190,8 @@ flutter: - assets/svg/plus.svg - assets/svg/gear.svg - assets/svg/bell.svg - - assets/svg/bell-new.svg + - assets/svg/light/bell-new.svg + - assets/svg/dark/bell-new.svg - assets/svg/stack-icon1.svg - assets/svg/arrow-left-fa.svg - assets/svg/copy-fa.svg @@ -204,7 +205,8 @@ flutter: - assets/svg/bars.svg - assets/svg/filter.svg - assets/svg/pending.svg - - assets/svg/exchange-2.svg + - assets/svg/dark/exchange-2.svg + - assets/svg/light/exchange-2.svg - assets/svg/signal-stream.svg - assets/svg/buy-coins-icon.svg - assets/svg/Ellipse-43.svg @@ -246,16 +248,25 @@ flutter: - assets/svg/ellipsis-vertical1.svg - assets/svg/dice-alt.svg - assets/svg/circle-arrow-up-right2.svg - - assets/svg/tx-exchange-icon.svg - - assets/svg/tx-exchange-icon-pending.svg - - assets/svg/tx-exchange-icon-failed.svg + - assets/svg/dark/tx-exchange-icon.svg + - assets/svg/light/tx-exchange-icon.svg + - assets/svg/dark/tx-exchange-icon-pending.svg + - assets/svg/light/tx-exchange-icon-pending.svg + - assets/svg/dark/tx-exchange-icon-failed.svg + - assets/svg/light/tx-exchange-icon-failed.svg - assets/svg/loader.svg - - assets/svg/tx-icon-send.svg - - assets/svg/tx-icon-send-pending.svg - - assets/svg/tx-icon-send-failed.svg - - assets/svg/tx-icon-receive.svg - - assets/svg/tx-icon-receive-pending.svg - - assets/svg/tx-icon-receive-failed.svg + - assets/svg/dark/tx-icon-send.svg + - assets/svg/light/tx-icon-send.svg + - assets/svg/dark/tx-icon-send-pending.svg + - assets/svg/light/tx-icon-send-pending.svg + - assets/svg/dark/tx-icon-send-failed.svg + - assets/svg/light/tx-icon-send-failed.svg + - assets/svg/dark/tx-icon-receive.svg + - assets/svg/light/tx-icon-receive.svg + - assets/svg/dark/tx-icon-receive-pending.svg + - assets/svg/light/tx-icon-receive-pending.svg + - assets/svg/dark/tx-icon-receive-failed.svg + - assets/svg/light/tx-icon-receive-failed.svg - assets/svg/add-backup.svg - assets/svg/auto-backup.svg - assets/svg/restore-backup.svg