diff --git a/assets/svg/orange-theme.svg b/assets/svg/orange-theme.svg new file mode 100644 index 000000000..876e933b4 --- /dev/null +++ b/assets/svg/orange-theme.svg @@ -0,0 +1,34 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/assets/svg/themed/orange/bell-new.svg b/assets/svg/themed/orange/bell-new.svg new file mode 100644 index 000000000..368444e14 --- /dev/null +++ b/assets/svg/themed/orange/bell-new.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/assets/svg/themed/orange/bitcoin.svg b/assets/svg/themed/orange/bitcoin.svg new file mode 100644 index 000000000..5f1b48394 --- /dev/null +++ b/assets/svg/themed/orange/bitcoin.svg @@ -0,0 +1,28 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/assets/svg/themed/orange/bitcoincash.svg b/assets/svg/themed/orange/bitcoincash.svg new file mode 100644 index 000000000..ee2ec8a5a --- /dev/null +++ b/assets/svg/themed/orange/bitcoincash.svg @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/assets/svg/themed/orange/buy-coins-icon.svg b/assets/svg/themed/orange/buy-coins-icon.svg new file mode 100644 index 000000000..6ac2d5d64 --- /dev/null +++ b/assets/svg/themed/orange/buy-coins-icon.svg @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + + + + + diff --git a/assets/svg/themed/orange/doge.svg b/assets/svg/themed/orange/doge.svg new file mode 100644 index 000000000..99f3f359c --- /dev/null +++ b/assets/svg/themed/orange/doge.svg @@ -0,0 +1,154 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/assets/svg/themed/orange/epic-cash.svg b/assets/svg/themed/orange/epic-cash.svg new file mode 100644 index 000000000..ec667c286 --- /dev/null +++ b/assets/svg/themed/orange/epic-cash.svg @@ -0,0 +1,36 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/assets/svg/themed/orange/ethereum.svg b/assets/svg/themed/orange/ethereum.svg new file mode 100644 index 000000000..26d492cc4 --- /dev/null +++ b/assets/svg/themed/orange/ethereum.svg @@ -0,0 +1,37 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/assets/svg/themed/orange/exchange-2.svg b/assets/svg/themed/orange/exchange-2.svg new file mode 100644 index 000000000..89ae87740 --- /dev/null +++ b/assets/svg/themed/orange/exchange-2.svg @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/assets/svg/themed/orange/firo.svg b/assets/svg/themed/orange/firo.svg new file mode 100644 index 000000000..4e9356e5a --- /dev/null +++ b/assets/svg/themed/orange/firo.svg @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/assets/svg/themed/orange/litecoin.svg b/assets/svg/themed/orange/litecoin.svg new file mode 100644 index 000000000..4673da2d8 --- /dev/null +++ b/assets/svg/themed/orange/litecoin.svg @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/assets/svg/themed/orange/monero.svg b/assets/svg/themed/orange/monero.svg new file mode 100644 index 000000000..a755a5bdb --- /dev/null +++ b/assets/svg/themed/orange/monero.svg @@ -0,0 +1,32 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/assets/svg/themed/orange/namecoin.svg b/assets/svg/themed/orange/namecoin.svg new file mode 100644 index 000000000..835d0c0e6 --- /dev/null +++ b/assets/svg/themed/orange/namecoin.svg @@ -0,0 +1,32 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/assets/svg/themed/orange/particl.svg b/assets/svg/themed/orange/particl.svg new file mode 100644 index 000000000..cb4a4e990 --- /dev/null +++ b/assets/svg/themed/orange/particl.svg @@ -0,0 +1,31 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/assets/svg/themed/orange/persona-easy-1.svg b/assets/svg/themed/orange/persona-easy-1.svg new file mode 100644 index 000000000..4b8087bf3 --- /dev/null +++ b/assets/svg/themed/orange/persona-easy-1.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/assets/svg/themed/orange/persona-incognito-1.svg b/assets/svg/themed/orange/persona-incognito-1.svg new file mode 100644 index 000000000..5b5185ec0 --- /dev/null +++ b/assets/svg/themed/orange/persona-incognito-1.svg @@ -0,0 +1,44 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/assets/svg/themed/orange/stack.svg b/assets/svg/themed/orange/stack.svg new file mode 100644 index 000000000..570b2d8fd --- /dev/null +++ b/assets/svg/themed/orange/stack.svg @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + + + + + diff --git a/assets/svg/themed/orange/tx-exchange-icon-failed.svg b/assets/svg/themed/orange/tx-exchange-icon-failed.svg new file mode 100644 index 000000000..a54836bba --- /dev/null +++ b/assets/svg/themed/orange/tx-exchange-icon-failed.svg @@ -0,0 +1,7 @@ + + + + + + + diff --git a/assets/svg/themed/orange/tx-exchange-icon-pending.svg b/assets/svg/themed/orange/tx-exchange-icon-pending.svg new file mode 100644 index 000000000..5f9aa4256 --- /dev/null +++ b/assets/svg/themed/orange/tx-exchange-icon-pending.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/assets/svg/themed/orange/tx-exchange-icon.svg b/assets/svg/themed/orange/tx-exchange-icon.svg new file mode 100644 index 000000000..fcd3ef9dc --- /dev/null +++ b/assets/svg/themed/orange/tx-exchange-icon.svg @@ -0,0 +1,4 @@ + + + + diff --git a/assets/svg/themed/orange/tx-icon-receive-failed.svg b/assets/svg/themed/orange/tx-icon-receive-failed.svg new file mode 100644 index 000000000..189bd15c9 --- /dev/null +++ b/assets/svg/themed/orange/tx-icon-receive-failed.svg @@ -0,0 +1,7 @@ + + + + + + + diff --git a/assets/svg/themed/orange/tx-icon-receive-pending.svg b/assets/svg/themed/orange/tx-icon-receive-pending.svg new file mode 100644 index 000000000..64ea8da3d --- /dev/null +++ b/assets/svg/themed/orange/tx-icon-receive-pending.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/assets/svg/themed/orange/tx-icon-receive.svg b/assets/svg/themed/orange/tx-icon-receive.svg new file mode 100644 index 000000000..1076d8d57 --- /dev/null +++ b/assets/svg/themed/orange/tx-icon-receive.svg @@ -0,0 +1,4 @@ + + + + diff --git a/assets/svg/themed/orange/tx-icon-send-failed.svg b/assets/svg/themed/orange/tx-icon-send-failed.svg new file mode 100644 index 000000000..9751b61e8 --- /dev/null +++ b/assets/svg/themed/orange/tx-icon-send-failed.svg @@ -0,0 +1,7 @@ + + + + + + + diff --git a/assets/svg/themed/orange/tx-icon-send-pending.svg b/assets/svg/themed/orange/tx-icon-send-pending.svg new file mode 100644 index 000000000..e4ec777e3 --- /dev/null +++ b/assets/svg/themed/orange/tx-icon-send-pending.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/assets/svg/themed/orange/tx-icon-send.svg b/assets/svg/themed/orange/tx-icon-send.svg new file mode 100644 index 000000000..ee32aa6b4 --- /dev/null +++ b/assets/svg/themed/orange/tx-icon-send.svg @@ -0,0 +1,4 @@ + + + + diff --git a/assets/svg/themed/orange/wownero.svg b/assets/svg/themed/orange/wownero.svg new file mode 100644 index 000000000..642939829 --- /dev/null +++ b/assets/svg/themed/orange/wownero.svg @@ -0,0 +1,32 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/lib/models/exchange/exchange_form_state.dart b/lib/models/exchange/exchange_form_state.dart index 58562e449..32578ebd9 100644 --- a/lib/models/exchange/exchange_form_state.dart +++ b/lib/models/exchange/exchange_form_state.dart @@ -2,7 +2,9 @@ import 'package:decimal/decimal.dart'; import 'package:flutter/foundation.dart'; import 'package:stackwallet/models/exchange/aggregate_currency.dart'; import 'package:stackwallet/models/exchange/response_objects/estimate.dart'; +import 'package:stackwallet/services/exchange/change_now/change_now_exchange.dart'; import 'package:stackwallet/services/exchange/exchange.dart'; +import 'package:stackwallet/services/exchange/majestic_bank/majestic_bank_exchange.dart'; import 'package:stackwallet/utilities/enums/exchange_rate_type_enum.dart'; import 'package:stackwallet/utilities/logger.dart'; @@ -323,28 +325,28 @@ class ExchangeFormState extends ChangeNotifier { required bool shouldNotifyListeners, }) async { try { - // switch (exchange.name) { - // case ChangeNowExchange.exchangeName: - // if (!_exchangeSupported( - // exchangeName: exchange.name, - // sendCurrency: sendCurrency, - // receiveCurrency: receiveCurrency, - // exchangeRateType: exchangeRateType, - // )) { - // _exchange = MajesticBankExchange.instance; - // } - // break; - // case MajesticBankExchange.exchangeName: - // if (!_exchangeSupported( - // exchangeName: exchange.name, - // sendCurrency: sendCurrency, - // receiveCurrency: receiveCurrency, - // exchangeRateType: exchangeRateType, - // )) { - // _exchange = ChangeNowExchange.instance; - // } - // break; - // } + switch (exchange.name) { + case ChangeNowExchange.exchangeName: + if (!_exchangeSupported( + exchangeName: exchange.name, + sendCurrency: sendCurrency, + receiveCurrency: receiveCurrency, + exchangeRateType: exchangeRateType, + )) { + _exchange = MajesticBankExchange.instance; + } + break; + case MajesticBankExchange.exchangeName: + if (!_exchangeSupported( + exchangeName: exchange.name, + sendCurrency: sendCurrency, + receiveCurrency: receiveCurrency, + exchangeRateType: exchangeRateType, + )) { + _exchange = ChangeNowExchange.instance; + } + break; + } await _updateRanges(shouldNotifyListeners: false); await _updateEstimate(shouldNotifyListeners: false); diff --git a/lib/pages/exchange_view/exchange_coin_selection/exchange_currency_selection_view.dart b/lib/pages/exchange_view/exchange_coin_selection/exchange_currency_selection_view.dart index 6980706c3..1b2376b4c 100644 --- a/lib/pages/exchange_view/exchange_coin_selection/exchange_currency_selection_view.dart +++ b/lib/pages/exchange_view/exchange_coin_selection/exchange_currency_selection_view.dart @@ -9,6 +9,7 @@ import 'package:stackwallet/models/isar/exchange_cache/pair.dart'; import 'package:stackwallet/pages/buy_view/sub_widgets/crypto_selection_view.dart'; import 'package:stackwallet/services/exchange/change_now/change_now_exchange.dart'; import 'package:stackwallet/services/exchange/exchange_data_loading_service.dart'; +import 'package:stackwallet/services/exchange/majestic_bank/majestic_bank_exchange.dart'; import 'package:stackwallet/utilities/assets.dart'; import 'package:stackwallet/utilities/constants.dart'; import 'package:stackwallet/utilities/enums/coin_enum.dart'; @@ -94,12 +95,11 @@ class _ExchangeCurrencySelectionViewState if (widget.pairedTicker == null) { return await _getCurrencies(); } - List currencies = []; - // await ExchangeDataLoadingService - // .instance.isar.currencies - // .where() - // .exchangeNameEqualTo(MajesticBankExchange.exchangeName) - // .findAll(); + List currencies = await ExchangeDataLoadingService + .instance.isar.currencies + .where() + .exchangeNameEqualTo(MajesticBankExchange.exchangeName) + .findAll(); final cn = await ChangeNowExchange.instance.getPairedCurrencies( widget.pairedTicker!, diff --git a/lib/pages/exchange_view/sub_widgets/exchange_provider_options.dart b/lib/pages/exchange_view/sub_widgets/exchange_provider_options.dart index 043a10a5e..c0f4312d0 100644 --- a/lib/pages/exchange_view/sub_widgets/exchange_provider_options.dart +++ b/lib/pages/exchange_view/sub_widgets/exchange_provider_options.dart @@ -71,12 +71,11 @@ class _ExchangeProviderOptionsState sendCurrency: sendCurrency, receiveCurrency: receivingCurrency, ); - final showMajesticBank = false; - // exchangeSupported( - // exchangeName: MajesticBankExchange.exchangeName, - // sendCurrency: sendCurrency, - // receiveCurrency: receivingCurrency, - // ); + final showMajesticBank = exchangeSupported( + exchangeName: MajesticBankExchange.exchangeName, + sendCurrency: sendCurrency, + receiveCurrency: receivingCurrency, + ); return RoundedWhiteContainer( padding: isDesktop ? const EdgeInsets.all(0) : const EdgeInsets.all(12), diff --git a/lib/pages/exchange_view/trade_details_view.dart b/lib/pages/exchange_view/trade_details_view.dart index ca853c6a4..76653bd18 100644 --- a/lib/pages/exchange_view/trade_details_view.dart +++ b/lib/pages/exchange_view/trade_details_view.dart @@ -93,8 +93,7 @@ class _TradeDetailsViewState extends ConsumerState { .trades .firstWhere((e) => e.tradeId == tradeId); - if (mounted && - trade.exchangeName != MajesticBankExchange.exchangeName) { + if (mounted) { final exchange = Exchange.fromName(trade.exchangeName); final response = await exchange.updateTrade(trade); diff --git a/lib/pages_desktop_specific/settings/settings_menu/appearance_settings.dart b/lib/pages_desktop_specific/settings/settings_menu/appearance_settings.dart index f10d91555..fc39cda71 100644 --- a/lib/pages_desktop_specific/settings/settings_menu/appearance_settings.dart +++ b/lib/pages_desktop_specific/settings/settings_menu/appearance_settings.dart @@ -209,6 +209,8 @@ class _ThemeToggle extends ConsumerState { return Assets.svg.themeOcean; case ThemeType.oledBlack: return Assets.svg.themeOledBlack; + case ThemeType.orange: + return Assets.svg.orange; case ThemeType.fruitSorbet: return Assets.svg.themeFruit; case ThemeType.forest: diff --git a/lib/services/exchange/exchange_data_loading_service.dart b/lib/services/exchange/exchange_data_loading_service.dart index 566640adb..ad754cb56 100644 --- a/lib/services/exchange/exchange_data_loading_service.dart +++ b/lib/services/exchange/exchange_data_loading_service.dart @@ -273,25 +273,25 @@ class ExchangeDataLoadingService { // } Future loadMajesticBankCurrencies() async { - // final exchange = MajesticBankExchange.instance; - // final responseCurrencies = await exchange.getAllCurrencies(false); - // - // if (responseCurrencies.value != null) { - await isar.writeTxn(() async { - final idsToDelete = await isar.currencies - .where() - .exchangeNameEqualTo(MajesticBankExchange.exchangeName) - .idProperty() - .findAll(); - await isar.currencies.deleteAll(idsToDelete); - // await isar.currencies.putAll(responseCurrencies.value!); - }); - // } else { - // Logging.instance.log( - // "loadMajesticBankCurrencies: $responseCurrencies", - // level: LogLevel.Warning, - // ); - // } + final exchange = MajesticBankExchange.instance; + final responseCurrencies = await exchange.getAllCurrencies(false); + + if (responseCurrencies.value != null) { + await isar.writeTxn(() async { + final idsToDelete = await isar.currencies + .where() + .exchangeNameEqualTo(MajesticBankExchange.exchangeName) + .idProperty() + .findAll(); + await isar.currencies.deleteAll(idsToDelete); + await isar.currencies.putAll(responseCurrencies.value!); + }); + } else { + Logging.instance.log( + "loadMajesticBankCurrencies: $responseCurrencies", + level: LogLevel.Warning, + ); + } } // Future loadMajesticBankPairs() async { diff --git a/lib/services/exchange/majestic_bank/majestic_bank_api.dart b/lib/services/exchange/majestic_bank/majestic_bank_api.dart index 5641afd55..61eb886a4 100644 --- a/lib/services/exchange/majestic_bank/majestic_bank_api.dart +++ b/lib/services/exchange/majestic_bank/majestic_bank_api.dart @@ -14,11 +14,10 @@ import 'package:stackwallet/services/exchange/exchange_response.dart'; import 'package:stackwallet/utilities/logger.dart'; class MajesticBankAPI { - // ensure no api calls go out to mb - static const String scheme = ""; //"""https"; - static const String authority = ""; //"""majesticbank.sc"; - static const String version = ""; //"""v1"; - static const kMajesticBankRefCode = ""; //"""rjWugM"; + static const String scheme = "https"; + static const String authority = "majesticbank.sc"; + static const String version = "v1"; + static const kMajesticBankRefCode = "rjWugM"; MajesticBankAPI._(); @@ -34,8 +33,6 @@ class MajesticBankAPI { } Future _makeGetRequest(Uri uri) async { - return null; - final client = this.client ?? http.Client(); int code = -1; try { diff --git a/lib/services/notifications_service.dart b/lib/services/notifications_service.dart index 47170fd70..5408d6126 100644 --- a/lib/services/notifications_service.dart +++ b/lib/services/notifications_service.dart @@ -7,7 +7,6 @@ import 'package:stackwallet/hive/db.dart'; import 'package:stackwallet/models/exchange/response_objects/trade.dart'; import 'package:stackwallet/models/notification_model.dart'; import 'package:stackwallet/services/exchange/exchange_response.dart'; -import 'package:stackwallet/services/exchange/majestic_bank/majestic_bank_exchange.dart'; import 'package:stackwallet/services/node_service.dart'; import 'package:stackwallet/services/notifications_api.dart'; import 'package:stackwallet/services/trade_service.dart'; @@ -198,59 +197,57 @@ class NotificationsService extends ChangeNotifier { final oldTrade = trades.first; late final ExchangeResponse response; - if (oldTrade.exchangeName != MajesticBankExchange.exchangeName) { - try { - final exchange = Exchange.fromName(oldTrade.exchangeName); - response = await exchange.updateTrade(oldTrade); - } catch (_) { - return; + try { + final exchange = Exchange.fromName(oldTrade.exchangeName); + response = await exchange.updateTrade(oldTrade); + } catch (_) { + return; + } + + if (response.value == null) { + return; + } + + final trade = response.value!; + + // only update if status has changed + if (trade.status != notification.title) { + bool shouldWatchForUpdates = true; + // TODO: make sure we set shouldWatchForUpdates to correct value here + switch (trade.status) { + case "Refunded": + case "refunded": + case "Failed": + case "failed": + case "closed": + case "expired": + case "Finished": + case "finished": + case "Completed": + case "completed": + case "Not found": + shouldWatchForUpdates = false; + break; + default: + shouldWatchForUpdates = true; } - if (response.value == null) { - return; + final updatedNotification = notification.copyWith( + title: trade.status, + shouldWatchForUpdates: shouldWatchForUpdates, + ); + + // remove from watch list if shouldWatchForUpdates was changed + if (!shouldWatchForUpdates) { + await _deleteWatchedTradeNotification(notification); } - final trade = response.value!; + // replaces the current notification with the updated one + unawaited(add(updatedNotification, true)); - // only update if status has changed - if (trade.status != notification.title) { - bool shouldWatchForUpdates = true; - // TODO: make sure we set shouldWatchForUpdates to correct value here - switch (trade.status) { - case "Refunded": - case "refunded": - case "Failed": - case "failed": - case "closed": - case "expired": - case "Finished": - case "finished": - case "Completed": - case "completed": - case "Not found": - shouldWatchForUpdates = false; - break; - default: - shouldWatchForUpdates = true; - } - - final updatedNotification = notification.copyWith( - title: trade.status, - shouldWatchForUpdates: shouldWatchForUpdates, - ); - - // remove from watch list if shouldWatchForUpdates was changed - if (!shouldWatchForUpdates) { - await _deleteWatchedTradeNotification(notification); - } - - // replaces the current notification with the updated one - unawaited(add(updatedNotification, true)); - - // update the trade in db - // over write trade stored in db with updated version - await tradesService.edit(trade: trade, shouldNotifyListeners: true); - } + // update the trade in db + // over write trade stored in db with updated version + await tradesService.edit(trade: trade, shouldNotifyListeners: true); } } } diff --git a/lib/utilities/assets.dart b/lib/utilities/assets.dart index c54e75baf..4863bc7a0 100644 --- a/lib/utilities/assets.dart +++ b/lib/utilities/assets.dart @@ -80,6 +80,7 @@ class _BUY { case ThemeType.oceanBreeze: case ThemeType.light: case ThemeType.chan: + case ThemeType.orange: return "assets/svg/buy/Simplex-Nuvei-Logo.svg"; } } @@ -119,6 +120,7 @@ class _SVG { case ThemeType.light: case ThemeType.chan: case ThemeType.dark: + case ThemeType.orange: case ThemeType.oledBlack: case ThemeType.darkChans: return null; @@ -166,6 +168,7 @@ class _SVG { String get themeForest => "assets/svg/forest-theme.svg"; String get themeOledBlack => "assets/svg/oled-black-theme.svg"; String get themeOcean => "assets/svg/ocean-breeze-theme.svg"; + String get orange => "assets/svg/orange-theme.svg"; String get themeLight => "assets/svg/light-mode.svg"; String get themeDark => "assets/svg/dark-theme.svg"; String get themeChan => "assets/svg/chanstheme.svg"; diff --git a/lib/utilities/theme/color_theme.dart b/lib/utilities/theme/color_theme.dart index fb7306de2..eb728355e 100644 --- a/lib/utilities/theme/color_theme.dart +++ b/lib/utilities/theme/color_theme.dart @@ -9,12 +9,14 @@ import 'package:stackwallet/utilities/theme/oled_black_colors.dart'; import 'package:stackwallet/utilities/theme/oled_chans_colors.dart'; import 'chan_colors.dart'; +import 'orange_colors.dart'; enum ThemeType { light, dark, oceanBreeze, oledBlack, + orange, fruitSorbet, forest, chan, @@ -36,6 +38,8 @@ extension ThemeTypeExt on ThemeType { return ThemeType.oceanBreeze; case "oledBlack": return ThemeType.oledBlack; + case "orange": + return ThemeType.oledBlack; case "fruitSorbet": return ThemeType.fruitSorbet; case "forest": @@ -59,6 +63,8 @@ extension ThemeTypeExt on ThemeType { return OceanBreezeColors(); case ThemeType.oledBlack: return OledBlackColors(); + case ThemeType.orange: + return OrangeColors(); case ThemeType.fruitSorbet: return FruitSorbetColors(); case ThemeType.forest: @@ -80,6 +86,8 @@ extension ThemeTypeExt on ThemeType { return "Ocean Breeze"; case ThemeType.oledBlack: return "OLED Black"; + case ThemeType.orange: + return "Orange"; case ThemeType.fruitSorbet: return "Fruit Sorbet"; case ThemeType.forest: diff --git a/lib/utilities/theme/orange_colors.dart b/lib/utilities/theme/orange_colors.dart new file mode 100644 index 000000000..48074c94f --- /dev/null +++ b/lib/utilities/theme/orange_colors.dart @@ -0,0 +1,351 @@ +import 'package:flutter/material.dart'; +import 'package:stackwallet/utilities/theme/color_theme.dart'; + +class OrangeColors extends StackColorTheme { + @override + ThemeType get themeType => ThemeType.orange; + @override + Brightness get brightness => Brightness.light; + + @override + Color get background => const Color(0xFFF7F7F7); + @override + Color get backgroundAppBar => background; + @override + Gradient? get gradientBackground => null; + + @override + Color get overlay => const Color(0xFF111215); + + @override + Color get accentColorBlue => const Color(0xFF077CBE); + @override + Color get accentColorGreen => const Color(0xFF00A591); + @override + Color get accentColorYellow => const Color(0xFFF4C517); + @override + Color get accentColorRed => const Color(0xFFD1382D); + @override + Color get accentColorOrange => const Color(0xFFFF985F); + @override + Color get accentColorDark => const Color(0xFFF36B43); + + @override + Color get shadow => const Color(0x0F2D3132); + + @override + Color get textDark => const Color(0xFF232323); + @override + Color get textDark2 => const Color(0xFF333333); + @override + Color get textDark3 => const Color(0xFF696B6C); + @override + Color get textSubtitle1 => const Color(0xFF7E8284); + @override + Color get textSubtitle2 => const Color(0xFF919393); + @override + Color get textSubtitle3 => const Color(0xFFB0B2B2); + @override + Color get textSubtitle4 => const Color(0xFFD1D3D3); + @override + Color get textSubtitle5 => const Color(0xFFDEDFE1); + @override + Color get textSubtitle6 => const Color(0xFFF1F1F1); + @override + Color get textWhite => const Color(0xFFFFFFFF); + @override + Color get textFavoriteCard => const Color(0xFF232323); + @override + Color get textError => const Color(0xFF8D0006); + @override + Color get textRestore => overlay; + + // button background + @override + Color get buttonBackPrimary => const Color(0xFFF36B43); + @override + Color get buttonBackSecondary => const Color(0xFFFFEEC2); + @override + Color get buttonBackPrimaryDisabled => const Color(0xFFF8EAE6); + @override + Color get buttonBackSecondaryDisabled => const Color(0xFFBDBDBD); + @override + Color get buttonBackBorder => const Color(0xFFF36B43); + @override + Color get buttonBackBorderDisabled => const Color(0xFFF8EAE6); + @override + Color get buttonBackBorderSecondary => buttonBackSecondary; + @override + Color get buttonBackBorderSecondaryDisabled => buttonBackSecondaryDisabled; + + @override + Color get numberBackDefault => const Color(0xFFFFF0D4); + @override + Color get numpadBackDefault => const Color(0xFFF36B43); + @override + Color get bottomNavBack => const Color(0xFFFFFFFF); + + // button text/element + @override + Color get buttonTextPrimary => const Color(0xFFFFFFFF); + @override + Color get buttonTextSecondary => const Color(0xFF232323); + @override + Color get buttonTextPrimaryDisabled => const Color(0xFFFFFFFF); + @override + Color get buttonTextSecondaryDisabled => const Color(0xFFF8EAE6); + @override + Color get buttonTextBorder => const Color(0xFFF36B43); + @override + Color get buttonTextDisabled => const Color(0xFFFFFFFF); + @override + Color get buttonTextBorderless => const Color(0xFF056EC6); + @override + Color get buttonTextBorderlessDisabled => const Color(0xFFB6B6B6); + @override + Color get numberTextDefault => const Color(0xFF232323); + @override + Color get numpadTextDefault => const Color(0xFFFFFFFF); + @override + Color get bottomNavText => const Color(0xFF232323); + @override + Color get customTextButtonEnabledText => buttonTextBorderless; + @override + Color get customTextButtonDisabledText => textSubtitle1; + + // switch + @override + Color get switchBGOn => const Color(0xFFF36B43); + @override + Color get switchBGOff => const Color(0xFFFFE4B2); + @override + Color get switchBGDisabled => const Color(0xFFC5C6C9); + @override + Color get switchCircleOn => const Color(0xFFFFF0D4); + @override + Color get switchCircleOff => const Color(0xFFFBFCFF); + @override + Color get switchCircleDisabled => const Color(0xFFFBFCFF); + + // step indicator background + @override + Color get stepIndicatorBGCheck => const Color(0xFFFFDAD1); + @override + Color get stepIndicatorBGNumber => const Color(0xFFCDD9FF); + @override + Color get stepIndicatorBGInactive => const Color(0xFFF8EAE6); + @override + Color get stepIndicatorBGLines => const Color(0xFFFFD5C9); + @override + Color get stepIndicatorBGLinesInactive => const Color(0xFFFFD9CF); + @override + Color get stepIndicatorIconText => const Color(0xFFF36B43); + @override + Color get stepIndicatorIconNumber => const Color(0xFF005BAF); + @override + Color get stepIndicatorIconInactive => const Color(0xFFD4DFFF); + + // checkbox + @override + Color get checkboxBGChecked => const Color(0xFFF36B43); + @override + Color get checkboxBorderEmpty => const Color(0xFF8C8F90); + @override + Color get checkboxBGDisabled => const Color(0xFFFFEEC2); + @override + Color get checkboxIconChecked => const Color(0xFFFFFFFF); + @override + Color get checkboxIconDisabled => const Color(0xFFFFFFFF); + @override + Color get checkboxTextLabel => const Color(0xFF232323); + + // snack bar + @override + Color get snackBarBackSuccess => const Color(0xFFADD6D2); + @override + Color get snackBarBackError => const Color(0xFFF6C7C3); + @override + Color get snackBarBackInfo => const Color(0xFFCCD7FF); + @override + Color get snackBarTextSuccess => const Color(0xFF075547); + @override + Color get snackBarTextError => const Color(0xFF8D0006); + @override + Color get snackBarTextInfo => const Color(0xFF002569); + + // icons + @override + Color get bottomNavIconBack => const Color(0xFFFFC58F); + @override + Color get bottomNavIconIcon => const Color(0xFFFFFFFF); + + @override + Color get topNavIconPrimary => const Color(0xFFF36B43); + @override + Color get topNavIconGreen => const Color(0xFF00A591); + @override + Color get topNavIconYellow => const Color(0xFFFDD33A); + @override + Color get topNavIconRed => const Color(0xFFEA4649); + + @override + Color get settingsIconBack => const Color(0xFFE0E3E3); + @override + Color get settingsIconIcon => const Color(0xFF232323); + @override + Color get settingsIconBack2 => const Color(0xFF80D2C8); + @override + Color get settingsIconElement => const Color(0xFF00A591); + + // text field + @override + Color get textFieldActiveBG => const Color(0xFFFFF0D4); + @override + Color get textFieldDefaultBG => const Color(0xFFFFF3DD); + @override + Color get textFieldErrorBG => const Color(0xFFF6C7C3); + @override + Color get textFieldSuccessBG => const Color(0xFFADD6D2); + @override + Color get textFieldErrorBorder => textFieldErrorBG; + @override + Color get textFieldSuccessBorder => textFieldSuccessBG; + + @override + Color get textFieldActiveSearchIconLeft => const Color(0xFF86898C); + @override + Color get textFieldDefaultSearchIconLeft => const Color(0xFF86898C); + @override + Color get textFieldErrorSearchIconLeft => const Color(0xFF8D0006); + @override + Color get textFieldSuccessSearchIconLeft => const Color(0xFF006C4D); + + @override + Color get textFieldActiveText => const Color(0xFF232323); + @override + Color get textFieldDefaultText => const Color(0xFF86898C); + @override + Color get textFieldErrorText => const Color(0xFF000000); + @override + Color get textFieldSuccessText => const Color(0xFF000000); + + @override + Color get textFieldActiveLabel => const Color(0xFF86898C); + @override + Color get textFieldErrorLabel => const Color(0xFF8D0006); + @override + Color get textFieldSuccessLabel => const Color(0xFF077C6E); + + @override + Color get textFieldActiveSearchIconRight => const Color(0xFFF36B43); + @override + Color get textFieldDefaultSearchIconRight => const Color(0xFFF36B43); + @override + Color get textFieldErrorSearchIconRight => const Color(0xFF8D0006); + @override + Color get textFieldSuccessSearchIconRight => const Color(0xFF077C6E); + + // settings item level2 + @override + Color get settingsItem2ActiveBG => const Color(0xFFFFFFFF); + @override + Color get settingsItem2ActiveText => const Color(0xFF232323); + @override + Color get settingsItem2ActiveSub => const Color(0xFF8C8F90); + + // radio buttons + @override + Color get radioButtonIconBorder => const Color(0xFFF36B43); + @override + Color get radioButtonIconBorderDisabled => const Color(0xFF8C8D97); + @override + Color get radioButtonBorderEnabled => const Color(0xFFF36B43); + @override + Color get radioButtonBorderDisabled => const Color(0xFF8C8D97); + @override + Color get radioButtonIconCircle => const Color(0xFFF36B43); + @override + Color get radioButtonIconEnabled => const Color(0xFFF36B43); + @override + Color get radioButtonTextEnabled => const Color(0xFF42444B); + @override + Color get radioButtonTextDisabled => const Color(0xFF42444B); + @override + Color get radioButtonLabelEnabled => const Color(0xFF8C8F90); + @override + Color get radioButtonLabelDisabled => const Color(0xFF8C8F90); + + // info text + @override + Color get infoItemBG => const Color(0xFFFFFFFF); + @override + Color get infoItemLabel => const Color(0xFF838788); + @override + Color get infoItemText => const Color(0xFF232323); + @override + Color get infoItemIcons => const Color(0xFFF36B43); + + // popup + @override + Color get popupBG => const Color(0xFFFFFFFF); + + // currency list + @override + Color get currencyListItemBG => const Color(0xFFF0F5F7); + + // bottom nav + @override + Color get stackWalletBG => const Color(0xFFFFFFFF); + @override + Color get stackWalletMid => const Color(0xFFFFFFFF); + @override + Color get stackWalletBottom => const Color(0xFFFFFFFF); + @override + Color get bottomNavShadow => const Color(0xFF388192); + + @override + Color get favoriteStarActive => const Color(0xFFF4C517); + @override + Color get favoriteStarInactive => textSubtitle3; + + @override + Color get splash => const Color(0xFF8E9192); + @override + Color get highlight => const Color(0xFFA9ACAC); + @override + Color get warningForeground => textDark; + @override + Color get warningBackground => const Color(0xFFF6C7C3); + @override + Color get loadingOverlayTextColor => const Color(0xFFF7F7F7); + @override + Color get myStackContactIconBG => const Color(0xFFFFF3DD); + @override + Color get textConfirmTotalAmount => const Color(0xFF232323); + @override + Color get textSelectedWordTableItem => const Color(0xFF232323); + + //rate type toggle + @override + Color get rateTypeToggleColorOn => textFieldDefaultBG; + @override + Color get rateTypeToggleColorOff => popupBG; + @override + Color get rateTypeToggleDesktopColorOn => textFieldDefaultBG; + @override + Color get rateTypeToggleDesktopColorOff => buttonBackSecondary; + + @override + BoxShadow get standardBoxShadow => BoxShadow( + color: shadow, + spreadRadius: 3, + blurRadius: 4, + ); + + @override + BoxShadow? get homeViewButtonBarBoxShadow => BoxShadow( + color: shadow, + spreadRadius: 3, + blurRadius: 4, + ); +} diff --git a/pubspec.yaml b/pubspec.yaml index aeeba8c3e..1ddbe37ca 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -356,6 +356,9 @@ flutter: # forest theme specific - assets/svg/themed/forest/ + # orange theme specific + - assets/svg/themed/orange/ + # buy - assets/svg/buy/