From 69262cefd24599ffd44d4be7bf8199fcfb98b6eb Mon Sep 17 00:00:00 2001 From: ryleedavis Date: Sun, 22 Jan 2023 23:16:01 -0700 Subject: [PATCH 01/21] added fruit sorbet theme colors --- lib/utilities/theme/fruit_sorbet_theme.dart | 318 ++++++++++++++++++++ 1 file changed, 318 insertions(+) create mode 100644 lib/utilities/theme/fruit_sorbet_theme.dart diff --git a/lib/utilities/theme/fruit_sorbet_theme.dart b/lib/utilities/theme/fruit_sorbet_theme.dart new file mode 100644 index 000000000..9ee140407 --- /dev/null +++ b/lib/utilities/theme/fruit_sorbet_theme.dart @@ -0,0 +1,318 @@ +import 'package:flutter/material.dart'; +import 'package:stackwallet/utilities/theme/color_theme.dart'; + +class LightColors extends StackColorTheme { + @override + ThemeType get themeType => ThemeType.light; + + @override + Color get background => + const Color(0xFFF7F7F7); //change this to background svg + @override + Color get backgroundAppBar => background; + @override + Gradient? get gradientBackground => null; + + @override + Color get overlay => const Color(0xFF111215); + + @override + Color get accentColorBlue => const Color(0xFF1276EB); + @override + Color get accentColorGreen => const Color(0xFF00A578); + @override + Color get accentColorYellow => const Color(0xFFFDC800); + @override + Color get accentColorRed => const Color(0xFFDD5869); + @override + Color get accentColorOrange => const Color(0xFFF8894B); + @override + Color get accentColorDark => const Color(0xFFF95369); + + @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(0xFF8E9192); + @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(0xFFA8000C); + @override + Color get textRestore => overlay; + + // button background + @override + Color get buttonBackPrimary => const Color(0xFFF95369); + @override + Color get buttonBackSecondary => const Color(0xFFFDCBD2); + @override + Color get buttonBackPrimaryDisabled => const Color(0xFFFDC3CB); + @override + Color get buttonBackSecondaryDisabled => const Color(0xFFFEEAED); + @override + Color get buttonBackBorder => const Color(0xFFF95369); + @override + Color get buttonBackBorderDisabled => const Color(0xFFFCA7B3); + + @override + Color get numberBackDefault => const Color(0xFFFFF8EE); + @override + Color get numpadBackDefault => const Color(0xFFF95369); + @override + Color get bottomNavBack => const Color(0xFFFFFFFF); + + // button text/element + @override + Color get buttonTextPrimary => const Color(0xFFFFFFFF); + @override + Color get buttonTextSecondary => const Color(0xFF9D3241); + @override + Color get buttonTextPrimaryDisabled => const Color(0xFFFFFFFF); + @override + Color get buttonTextSecondaryDisabled => const Color(0xFFD8ADB3); + @override + Color get buttonTextBorder => const Color(0xFFF95369); + @override + Color get buttonTextDisabled => const Color(0xFFFFFFFF); + @override + Color get buttonTextBorderless => const Color(0xFFF95369); + @override + Color get buttonTextBorderlessDisabled => const Color(0xFFFFFFFF); + @override + Color get numberTextDefault => const Color(0xFF232323); + @override + Color get numpadTextDefault => const Color(0xFFFFFFFF); + @override + Color get bottomNavText => const Color(0xFFD12B41); + + // switch + @override + Color get switchBGOn => const Color(0xFFF95369); + @override + Color get switchBGOff => const Color(0xFFFCADB2); + @override + Color get switchBGDisabled => const Color(0xFFC5C6C9); + @override + Color get switchCircleOn => const Color(0xFFFFEEF0); + @override + Color get switchCircleOff => const Color(0xFFFFFCF5); + @override + Color get switchCircleDisabled => const Color(0xFFFFFCF5); + + // step indicator background + @override + Color get stepIndicatorBGCheck => const Color(0xFFFFC6AE); + @override + Color get stepIndicatorBGNumber => const Color(0xFFFFC6AE); + @override + Color get stepIndicatorBGInactive => const Color(0xFFBFBFBF); + @override + Color get stepIndicatorBGLines => const Color(0xFFF39774); + @override + Color get stepIndicatorBGLinesInactive => const Color(0xFFB3B3B3); + @override + Color get stepIndicatorIconText => const Color(0xFFE12F09); + @override + Color get stepIndicatorIconNumber => const Color(0xFFE12F09); + @override + Color get stepIndicatorIconInactive => const Color(0xFFFFCFBA); + + // checkbox + @override + Color get checkboxBGChecked => const Color(0xFFF95369); + @override + Color get checkboxBorderEmpty => const Color(0xFF8C8F90); + @override + Color get checkboxBGDisabled => const Color(0xFFFDB0AE); + @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(0xFFB7F0CC); + @override + Color get snackBarBackError => const Color(0xFFFCBDBA); + @override + Color get snackBarBackInfo => const Color(0xFFDAE2FF); + @override + Color get snackBarTextSuccess => const Color(0xFF2E7356); + @override + Color get snackBarTextError => const Color(0xFFBC0D20); + @override + Color get snackBarTextInfo => const Color(0xFF143E8C); + + // icons + @override + Color get bottomNavIconBack => const Color(0xFFFDBAC3); + @override + Color get bottomNavIconIcon => const Color(0xFFD12B41); + + @override + Color get topNavIconPrimary => const Color(0xFFF95369); + @override + Color get topNavIconGreen => const Color(0xFF00A578); + @override + Color get topNavIconYellow => const Color(0xFFF8894B); + @override + Color get topNavIconRed => const Color(0xFFD91B1B); + + @override + Color get settingsIconBack => const Color(0xFFFED7CA); + @override + Color get settingsIconIcon => const Color(0xFFF95369); + @override + Color get settingsIconBack2 => const Color(0xFF80D2BB); + @override + Color get settingsIconElement => const Color(0xFF00A578); + + // text field + @override + Color get textFieldActiveBG => const Color(0xFFFFFBF6); + @override + Color get textFieldDefaultBG => const Color(0xFFFFF8EE); + @override + Color get textFieldErrorBG => const Color(0xFFFCBDBA); + @override + Color get textFieldSuccessBG => const Color(0xFFB7F0CC); + @override + Color get textFieldErrorBorder => textFieldErrorBG; + @override + Color get textFieldSuccessBorder => textFieldSuccessBG; + + @override + Color get textFieldActiveSearchIconLeft => const Color(0xFF86898C); + @override + Color get textFieldDefaultSearchIconLeft => const Color(0xFF9A9DA0); + @override + Color get textFieldErrorSearchIconLeft => const Color(0xFFBC0D20); + @override + Color get textFieldSuccessSearchIconLeft => const Color(0xFF387D60); + + @override + Color get textFieldActiveText => const Color(0xFF232323); + @override + Color get textFieldDefaultText => const Color(0xFF86898C); + @override + Color get textFieldErrorText => const Color(0xFF232323); + @override + Color get textFieldSuccessText => const Color(0xFF232323); + + @override + Color get textFieldActiveLabel => const Color(0xFF86898C); + @override + Color get textFieldErrorLabel => const Color(0xFFBC0D20); + @override + Color get textFieldSuccessLabel => const Color(0xFF387D60); + + @override + Color get textFieldActiveSearchIconRight => const Color(0xFFF95369); + @override + Color get textFieldDefaultSearchIconRight => const Color(0xFFF95369); + @override + Color get textFieldErrorSearchIconRight => const Color(0xFFBC0D20); + @override + Color get textFieldSuccessSearchIconRight => const Color(0xFF387D60); + + // settings item level2 + @override + Color get settingsItem2ActiveBG => const Color(0xFFFFFFFF); + @override + Color get settingsItem2ActiveText => const Color(0xFF232323); + @override + Color get settingsItem2ActiveSub => const Color(0xFFFED7CA); + + // radio buttons + @override + Color get radioButtonIconBorder => const Color(0xFFF95369); + @override + Color get radioButtonIconBorderDisabled => const Color(0xFF8C8D97); + @override + Color get radioButtonBorderEnabled => const Color(0xFFF95369); + @override + Color get radioButtonBorderDisabled => const Color(0xFF8C8D97); + @override + Color get radioButtonIconCircle => const Color(0xFFF95369); + @override + Color get radioButtonIconEnabled => const Color(0xFFF95369); + @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(0xFFFFF8EE); + @override + Color get infoItemLabel => const Color(0xFF838788); + @override + Color get infoItemText => const Color(0xFF232323); + @override + Color get infoItemIcons => const Color(0xFF0A6CE1); + + // popup + @override + Color get popupBG => const Color(0xFFFFF8EE); + + // currency list + @override + Color get currencyListItemBG => const Color(0xFFFFEBE0); + + // bottom nav + @override + Color get stackWalletBG => const Color(0xFFFFFFFF); + @override + Color get stackWalletMid => const Color(0xFF666666); + @override + Color get stackWalletBottom => const Color(0xFF232323); + @override + Color get bottomNavShadow => const Color(0xFFFE7160); + + @override + Color get favoriteStarActive => infoItemIcons; + @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(0xFFFCBDBA); + @override + Color get loadingOverlayTextColor => const Color(0xFFF7F7F7); + @override + Color get myStackContactIconBG => textFieldDefaultBG; + @override + Color get textConfirmTotalAmount => const Color(0xFF232323); + @override + Color get textSelectedWordTableItem => const Color(0xFF232323); +} From a135404d6745727cb2b030945bf4d84bd2a9d749 Mon Sep 17 00:00:00 2001 From: julian Date: Mon, 23 Jan 2023 09:37:14 -0600 Subject: [PATCH 02/21] migrate bugfix --- lib/utilities/db_version_migration.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/utilities/db_version_migration.dart b/lib/utilities/db_version_migration.dart index eab9a8966..21378c8b5 100644 --- a/lib/utilities/db_version_migration.dart +++ b/lib/utilities/db_version_migration.dart @@ -503,7 +503,7 @@ class DbVersionMigrator with WalletDB { type: isar_models.AddressType.unknown, subType: type == isar_models.TransactionType.incoming ? isar_models.AddressSubType.receiving - : isar_models.AddressSubType.change, + : isar_models.AddressSubType.unknown, ); } } From 54cabe935fc773230369c7b18a20548df495112e Mon Sep 17 00:00:00 2001 From: julian Date: Mon, 23 Jan 2023 10:32:53 -0600 Subject: [PATCH 03/21] null address fix --- .../coins/bitcoin/bitcoin_wallet.dart | 52 +++++++++--------- .../coins/bitcoincash/bitcoincash_wallet.dart | 52 +++++++++--------- .../coins/dogecoin/dogecoin_wallet.dart | 52 +++++++++--------- lib/services/coins/firo/firo_wallet.dart | 52 +++++++++--------- .../coins/litecoin/litecoin_wallet.dart | 52 +++++++++--------- lib/services/coins/monero/monero_wallet.dart | 2 + .../coins/namecoin/namecoin_wallet.dart | 53 ++++++++++--------- .../coins/particl/particl_wallet.dart | 52 +++++++++--------- .../coins/wownero/wownero_wallet.dart | 9 ++-- 9 files changed, 189 insertions(+), 187 deletions(-) diff --git a/lib/services/coins/bitcoin/bitcoin_wallet.dart b/lib/services/coins/bitcoin/bitcoin_wallet.dart index 55b17d837..595c089eb 100644 --- a/lib/services/coins/bitcoin/bitcoin_wallet.dart +++ b/lib/services/coins/bitcoin/bitcoin_wallet.dart @@ -185,24 +185,28 @@ class BitcoinWallet extends CoinServiceAPI with WalletCache, WalletDB { Future get currentReceivingAddress async => (await _currentReceivingAddress).value; - Future get _currentReceivingAddress async => (await db - .getAddresses(walletId) - .filter() - .typeEqualTo(isar_models.AddressType.p2wpkh) - .subTypeEqualTo(isar_models.AddressSubType.receiving) - .sortByDerivationIndexDesc() - .findFirst())!; + Future get _currentReceivingAddress async => + (await db + .getAddresses(walletId) + .filter() + .typeEqualTo(isar_models.AddressType.p2wpkh) + .subTypeEqualTo(isar_models.AddressSubType.receiving) + .sortByDerivationIndexDesc() + .findFirst()) ?? + await _generateAddressForChain(0, 0, DerivePathType.bip84); Future get currentChangeAddress async => (await _currentChangeAddress).value; - Future get _currentChangeAddress async => (await db - .getAddresses(walletId) - .filter() - .typeEqualTo(isar_models.AddressType.p2wpkh) - .subTypeEqualTo(isar_models.AddressSubType.change) - .sortByDerivationIndexDesc() - .findFirst())!; + Future get _currentChangeAddress async => + (await db + .getAddresses(walletId) + .filter() + .typeEqualTo(isar_models.AddressType.p2wpkh) + .subTypeEqualTo(isar_models.AddressSubType.change) + .sortByDerivationIndexDesc() + .findFirst()) ?? + await _generateAddressForChain(1, 0, DerivePathType.bip84); @override Future exit() async { @@ -1163,6 +1167,8 @@ class BitcoinWallet extends CoinServiceAPI with WalletCache, WalletDB { } await _prefs.init(); + await _checkCurrentChangeAddressesForTransactions(); + await _checkCurrentReceivingAddressesForTransactions(); } // hack to add tx to txData before refresh completes @@ -1856,7 +1862,7 @@ class BitcoinWallet extends CoinServiceAPI with WalletCache, WalletDB { 'Number of txs for current receiving address $currentReceiving: $txCount', level: LogLevel.Info); - if (txCount >= 1) { + if (txCount >= 1 || currentReceiving.derivationIndex < 0) { // First increment the receiving index final newReceivingIndex = currentReceiving.derivationIndex + 1; @@ -1875,12 +1881,9 @@ class BitcoinWallet extends CoinServiceAPI with WalletCache, WalletDB { } else { // we need to update the address await db.updateAddress(existing, newReceivingAddress); - - // since we updated an existing address there is a chance it has - // some tx history. To prevent address reuse we will call check again - // recursively - await _checkReceivingAddressForTransactions(); } + // keep checking until address with no tx history is set as current + await _checkReceivingAddressForTransactions(); } } catch (e, s) { Logging.instance.log( @@ -1898,7 +1901,7 @@ class BitcoinWallet extends CoinServiceAPI with WalletCache, WalletDB { 'Number of txs for current change address $currentChange: $txCount', level: LogLevel.Info); - if (txCount >= 1) { + if (txCount >= 1 || currentChange.derivationIndex < 0) { // First increment the change index final newChangeIndex = currentChange.derivationIndex + 1; @@ -1917,12 +1920,9 @@ class BitcoinWallet extends CoinServiceAPI with WalletCache, WalletDB { } else { // we need to update the address await db.updateAddress(existing, newChangeAddress); - - // since we updated an existing address there is a chance it has - // some tx history. To prevent address reuse we will call check again - // recursively - await _checkChangeAddressForTransactions(); } + // keep checking until address with no tx history is set as current + await _checkChangeAddressForTransactions(); } } on SocketException catch (se, s) { Logging.instance.log( diff --git a/lib/services/coins/bitcoincash/bitcoincash_wallet.dart b/lib/services/coins/bitcoincash/bitcoincash_wallet.dart index 1a6587e6b..70e3a5d55 100644 --- a/lib/services/coins/bitcoincash/bitcoincash_wallet.dart +++ b/lib/services/coins/bitcoincash/bitcoincash_wallet.dart @@ -162,24 +162,28 @@ class BitcoinCashWallet extends CoinServiceAPI with WalletCache, WalletDB { Future get currentReceivingAddress async => (await _currentReceivingAddress).value; - Future get _currentReceivingAddress async => (await db - .getAddresses(walletId) - .filter() - .typeEqualTo(isar_models.AddressType.p2pkh) - .subTypeEqualTo(isar_models.AddressSubType.receiving) - .sortByDerivationIndexDesc() - .findFirst())!; + Future get _currentReceivingAddress async => + (await db + .getAddresses(walletId) + .filter() + .typeEqualTo(isar_models.AddressType.p2pkh) + .subTypeEqualTo(isar_models.AddressSubType.receiving) + .sortByDerivationIndexDesc() + .findFirst()) ?? + await _generateAddressForChain(0, 0, DerivePathType.bip44); Future get currentChangeAddress async => (await _currentChangeAddress).value; - Future get _currentChangeAddress async => (await db - .getAddresses(walletId) - .filter() - .typeEqualTo(isar_models.AddressType.p2pkh) - .subTypeEqualTo(isar_models.AddressSubType.change) - .sortByDerivationIndexDesc() - .findFirst())!; + Future get _currentChangeAddress async => + (await db + .getAddresses(walletId) + .filter() + .typeEqualTo(isar_models.AddressType.p2pkh) + .subTypeEqualTo(isar_models.AddressSubType.change) + .sortByDerivationIndexDesc() + .findFirst()) ?? + await _generateAddressForChain(1, 0, DerivePathType.bip44); @override Future exit() async { @@ -1093,6 +1097,8 @@ class BitcoinCashWallet extends CoinServiceAPI with WalletCache, WalletDB { } await _prefs.init(); + await _checkCurrentChangeAddressesForTransactions(); + await _checkCurrentReceivingAddressesForTransactions(); } // hack to add tx to txData before refresh completes @@ -1740,7 +1746,7 @@ class BitcoinCashWallet extends CoinServiceAPI with WalletCache, WalletDB { 'Number of txs for current receiving address $currentReceiving: $txCount', level: LogLevel.Info); - if (txCount >= 1) { + if (txCount >= 1 || currentReceiving.derivationIndex < 0) { // First increment the receiving index final newReceivingIndex = currentReceiving.derivationIndex + 1; @@ -1759,12 +1765,9 @@ class BitcoinCashWallet extends CoinServiceAPI with WalletCache, WalletDB { } else { // we need to update the address await db.updateAddress(existing, newReceivingAddress); - - // since we updated an existing address there is a chance it has - // some tx history. To prevent address reuse we will call check again - // recursively - await _checkReceivingAddressForTransactions(); } + // keep checking until address with no tx history is set as current + await _checkReceivingAddressForTransactions(); } } on SocketException catch (se, s) { Logging.instance.log( @@ -1787,7 +1790,7 @@ class BitcoinCashWallet extends CoinServiceAPI with WalletCache, WalletDB { 'Number of txs for current change address $currentChange: $txCount', level: LogLevel.Info); - if (txCount >= 1) { + if (txCount >= 1 || currentChange.derivationIndex < 0) { // First increment the change index final newChangeIndex = currentChange.derivationIndex + 1; @@ -1806,12 +1809,9 @@ class BitcoinCashWallet extends CoinServiceAPI with WalletCache, WalletDB { } else { // we need to update the address await db.updateAddress(existing, newChangeAddress); - - // since we updated an existing address there is a chance it has - // some tx history. To prevent address reuse we will call check again - // recursively - await _checkChangeAddressForTransactions(); } + // keep checking until address with no tx history is set as current + await _checkChangeAddressForTransactions(); } } on SocketException catch (se, s) { Logging.instance.log( diff --git a/lib/services/coins/dogecoin/dogecoin_wallet.dart b/lib/services/coins/dogecoin/dogecoin_wallet.dart index e13c3673a..7e88fe3c5 100644 --- a/lib/services/coins/dogecoin/dogecoin_wallet.dart +++ b/lib/services/coins/dogecoin/dogecoin_wallet.dart @@ -160,25 +160,29 @@ class DogecoinWallet extends CoinServiceAPI with WalletCache, WalletDB { Future get currentReceivingAddress async => (await _currentReceivingAddress).value; - Future get _currentReceivingAddress async => (await db - .getAddresses(walletId) - .filter() - .typeEqualTo(isar_models.AddressType.p2pkh) - .subTypeEqualTo(isar_models.AddressSubType.receiving) - .sortByDerivationIndexDesc() - .findFirst())!; + Future get _currentReceivingAddress async => + (await db + .getAddresses(walletId) + .filter() + .typeEqualTo(isar_models.AddressType.p2pkh) + .subTypeEqualTo(isar_models.AddressSubType.receiving) + .sortByDerivationIndexDesc() + .findFirst()) ?? + await _generateAddressForChain(0, 0, DerivePathType.bip44); // @override Future get currentChangeAddress async => (await _currentChangeAddress).value; - Future get _currentChangeAddress async => (await db - .getAddresses(walletId) - .filter() - .typeEqualTo(isar_models.AddressType.p2pkh) - .subTypeEqualTo(isar_models.AddressSubType.change) - .sortByDerivationIndexDesc() - .findFirst())!; + Future get _currentChangeAddress async => + (await db + .getAddresses(walletId) + .filter() + .typeEqualTo(isar_models.AddressType.p2pkh) + .subTypeEqualTo(isar_models.AddressSubType.change) + .sortByDerivationIndexDesc() + .findFirst()) ?? + await _generateAddressForChain(1, 0, DerivePathType.bip44); @override Future exit() async { @@ -998,6 +1002,8 @@ class DogecoinWallet extends CoinServiceAPI with WalletCache, WalletDB { } await _prefs.init(); + await _checkCurrentChangeAddressesForTransactions(); + await _checkCurrentReceivingAddressesForTransactions(); } // hack to add tx to txData before refresh completes @@ -1644,7 +1650,7 @@ class DogecoinWallet extends CoinServiceAPI with WalletCache, WalletDB { 'Number of txs for current receiving address $currentReceiving: $txCount', level: LogLevel.Info); - if (txCount >= 1) { + if (txCount >= 1 || currentReceiving.derivationIndex < 0) { // First increment the receiving index final newReceivingIndex = currentReceiving.derivationIndex + 1; @@ -1663,12 +1669,9 @@ class DogecoinWallet extends CoinServiceAPI with WalletCache, WalletDB { } else { // we need to update the address await db.updateAddress(existing, newReceivingAddress); - - // since we updated an existing address there is a chance it has - // some tx history. To prevent address reuse we will call check again - // recursively - await _checkReceivingAddressForTransactions(); } + // keep checking until address with no tx history is set as current + await _checkReceivingAddressForTransactions(); } } on SocketException catch (se, s) { Logging.instance.log( @@ -1691,7 +1694,7 @@ class DogecoinWallet extends CoinServiceAPI with WalletCache, WalletDB { 'Number of txs for current change address $currentChange: $txCount', level: LogLevel.Info); - if (txCount >= 1) { + if (txCount >= 1 || currentChange.derivationIndex < 0) { // First increment the change index final newChangeIndex = currentChange.derivationIndex + 1; @@ -1710,12 +1713,9 @@ class DogecoinWallet extends CoinServiceAPI with WalletCache, WalletDB { } else { // we need to update the address await db.updateAddress(existing, newChangeAddress); - - // since we updated an existing address there is a chance it has - // some tx history. To prevent address reuse we will call check again - // recursively - await checkChangeAddressForTransactions(); } + // keep checking until address with no tx history is set as current + await checkChangeAddressForTransactions(); } } catch (e, s) { Logging.instance.log( diff --git a/lib/services/coins/firo/firo_wallet.dart b/lib/services/coins/firo/firo_wallet.dart index 0962e6fdc..ec63db186 100644 --- a/lib/services/coins/firo/firo_wallet.dart +++ b/lib/services/coins/firo/firo_wallet.dart @@ -871,24 +871,28 @@ class FiroWallet extends CoinServiceAPI with WalletCache, WalletDB, FiroHive { Future get currentReceivingAddress async => (await _currentReceivingAddress).value; - Future get _currentReceivingAddress async => (await db - .getAddresses(walletId) - .filter() - .typeEqualTo(isar_models.AddressType.p2pkh) - .subTypeEqualTo(isar_models.AddressSubType.receiving) - .sortByDerivationIndexDesc() - .findFirst())!; + Future get _currentReceivingAddress async => + (await db + .getAddresses(walletId) + .filter() + .typeEqualTo(isar_models.AddressType.p2pkh) + .subTypeEqualTo(isar_models.AddressSubType.receiving) + .sortByDerivationIndexDesc() + .findFirst()) ?? + await _generateAddressForChain(0, 0); Future get currentChangeAddress async => (await _currentChangeAddress).value; - Future get _currentChangeAddress async => (await db - .getAddresses(walletId) - .filter() - .typeEqualTo(isar_models.AddressType.p2pkh) - .subTypeEqualTo(isar_models.AddressSubType.change) - .sortByDerivationIndexDesc() - .findFirst())!; + Future get _currentChangeAddress async => + (await db + .getAddresses(walletId) + .filter() + .typeEqualTo(isar_models.AddressType.p2pkh) + .subTypeEqualTo(isar_models.AddressSubType.change) + .sortByDerivationIndexDesc() + .findFirst()) ?? + await _generateAddressForChain(1, 0); late String _walletName; @override @@ -1831,6 +1835,8 @@ class FiroWallet extends CoinServiceAPI with WalletCache, WalletDB, FiroHive { "Attempted to initialize an existing wallet using an unknown wallet ID!"); } await _prefs.init(); + await checkChangeAddressForTransactions(); + await checkReceivingAddressForTransactions(); } Future refreshIfThereIsNewData() async { @@ -3144,7 +3150,7 @@ class FiroWallet extends CoinServiceAPI with WalletCache, WalletDB, FiroHive { 'Number of txs for current receiving address $currentReceiving: $txCount', level: LogLevel.Info); - if (txCount >= 1) { + if (txCount >= 1 || currentReceiving.derivationIndex < 0) { // First increment the receiving index final newReceivingIndex = currentReceiving.derivationIndex + 1; @@ -3165,12 +3171,9 @@ class FiroWallet extends CoinServiceAPI with WalletCache, WalletDB, FiroHive { } else { // we need to update the address await db.updateAddress(existing, newReceivingAddress); - - // since we updated an existing address there is a chance it has - // some tx history. To prevent address reuse we will call check again - // recursively - await checkReceivingAddressForTransactions(); } + // keep checking until address with no tx history is set as current + await checkReceivingAddressForTransactions(); } } on SocketException catch (se, s) { Logging.instance.log( @@ -3194,7 +3197,7 @@ class FiroWallet extends CoinServiceAPI with WalletCache, WalletDB, FiroHive { 'Number of txs for current change address: $currentChange: $txCount', level: LogLevel.Info); - if (txCount >= 1) { + if (txCount >= 1 || currentChange.derivationIndex < 0) { // First increment the change index final newChangeIndex = currentChange.derivationIndex + 1; @@ -3215,12 +3218,9 @@ class FiroWallet extends CoinServiceAPI with WalletCache, WalletDB, FiroHive { } else { // we need to update the address await db.updateAddress(existing, newChangeAddress); - - // since we updated an existing address there is a chance it has - // some tx history. To prevent address reuse we will call check again - // recursively - await checkChangeAddressForTransactions(); } + // keep checking until address with no tx history is set as current + await checkChangeAddressForTransactions(); } } on SocketException catch (se, s) { Logging.instance.log( diff --git a/lib/services/coins/litecoin/litecoin_wallet.dart b/lib/services/coins/litecoin/litecoin_wallet.dart index f248aa0a0..c36f10eb6 100644 --- a/lib/services/coins/litecoin/litecoin_wallet.dart +++ b/lib/services/coins/litecoin/litecoin_wallet.dart @@ -185,24 +185,28 @@ class LitecoinWallet extends CoinServiceAPI with WalletCache, WalletDB { Future get currentReceivingAddress async => (await _currentReceivingAddress).value; - Future get _currentReceivingAddress async => (await db - .getAddresses(walletId) - .filter() - .typeEqualTo(isar_models.AddressType.p2wpkh) - .subTypeEqualTo(isar_models.AddressSubType.receiving) - .sortByDerivationIndexDesc() - .findFirst())!; + Future get _currentReceivingAddress async => + (await db + .getAddresses(walletId) + .filter() + .typeEqualTo(isar_models.AddressType.p2wpkh) + .subTypeEqualTo(isar_models.AddressSubType.receiving) + .sortByDerivationIndexDesc() + .findFirst()) ?? + await _generateAddressForChain(0, 0, DerivePathType.bip84); Future get currentChangeAddress async => (await _currentChangeAddress).value; - Future get _currentChangeAddress async => (await db - .getAddresses(walletId) - .filter() - .typeEqualTo(isar_models.AddressType.p2wpkh) - .subTypeEqualTo(isar_models.AddressSubType.change) - .sortByDerivationIndexDesc() - .findFirst())!; + Future get _currentChangeAddress async => + (await db + .getAddresses(walletId) + .filter() + .typeEqualTo(isar_models.AddressType.p2wpkh) + .subTypeEqualTo(isar_models.AddressSubType.change) + .sortByDerivationIndexDesc() + .findFirst()) ?? + await _generateAddressForChain(1, 0, DerivePathType.bip84); @override Future exit() async { @@ -1181,6 +1185,8 @@ class LitecoinWallet extends CoinServiceAPI with WalletCache, WalletDB { "Attempted to initialize an existing wallet using an unknown wallet ID!"); } await _prefs.init(); + await _checkCurrentChangeAddressesForTransactions(); + await _checkCurrentReceivingAddressesForTransactions(); } // hack to add tx to txData before refresh completes @@ -1879,7 +1885,7 @@ class LitecoinWallet extends CoinServiceAPI with WalletCache, WalletDB { 'Number of txs for current receiving address $currentReceiving: $txCount', level: LogLevel.Info); - if (txCount >= 1) { + if (txCount >= 1 || currentReceiving.derivationIndex < 0) { // First increment the receiving index final newReceivingIndex = currentReceiving.derivationIndex + 1; @@ -1898,12 +1904,9 @@ class LitecoinWallet extends CoinServiceAPI with WalletCache, WalletDB { } else { // we need to update the address await db.updateAddress(existing, newReceivingAddress); - - // since we updated an existing address there is a chance it has - // some tx history. To prevent address reuse we will call check again - // recursively - await _checkReceivingAddressForTransactions(); } + // keep checking until address with no tx history is set as current + await _checkReceivingAddressForTransactions(); } } catch (e, s) { Logging.instance.log( @@ -1921,7 +1924,7 @@ class LitecoinWallet extends CoinServiceAPI with WalletCache, WalletDB { 'Number of txs for current change address $currentChange: $txCount', level: LogLevel.Info); - if (txCount >= 1) { + if (txCount >= 1 || currentChange.derivationIndex < 0) { // First increment the change index final newChangeIndex = currentChange.derivationIndex + 1; @@ -1940,12 +1943,9 @@ class LitecoinWallet extends CoinServiceAPI with WalletCache, WalletDB { } else { // we need to update the address await db.updateAddress(existing, newChangeAddress); - - // since we updated an existing address there is a chance it has - // some tx history. To prevent address reuse we will call check again - // recursively - await _checkChangeAddressForTransactions(); } + // keep checking until address with no tx history is set as current + await _checkChangeAddressForTransactions(); } } on SocketException catch (se, s) { Logging.instance.log( diff --git a/lib/services/coins/monero/monero_wallet.dart b/lib/services/coins/monero/monero_wallet.dart index ee3807163..d46595ec4 100644 --- a/lib/services/coins/monero/monero_wallet.dart +++ b/lib/services/coins/monero/monero_wallet.dart @@ -288,6 +288,8 @@ class MoneroWallet extends CoinServiceAPI with WalletCache, WalletDB { } walletBase = (await walletService!.openWallet(_walletId, password)) as MoneroWalletBase; + + await _checkCurrentReceivingAddressesForTransactions(); // walletBase!.onNewBlock = onNewBlock; // walletBase!.onNewTransaction = onNewTransaction; // walletBase!.syncStatusChanged = syncStatusChanged; diff --git a/lib/services/coins/namecoin/namecoin_wallet.dart b/lib/services/coins/namecoin/namecoin_wallet.dart index b9968f6c0..d7346a880 100644 --- a/lib/services/coins/namecoin/namecoin_wallet.dart +++ b/lib/services/coins/namecoin/namecoin_wallet.dart @@ -180,24 +180,28 @@ class NamecoinWallet extends CoinServiceAPI with WalletCache, WalletDB { Future get currentReceivingAddress async => (await _currentReceivingAddress).value; - Future get _currentReceivingAddress async => (await db - .getAddresses(walletId) - .filter() - .typeEqualTo(isar_models.AddressType.p2wpkh) - .subTypeEqualTo(isar_models.AddressSubType.receiving) - .sortByDerivationIndexDesc() - .findFirst())!; + Future get _currentReceivingAddress async => + (await db + .getAddresses(walletId) + .filter() + .typeEqualTo(isar_models.AddressType.p2wpkh) + .subTypeEqualTo(isar_models.AddressSubType.receiving) + .sortByDerivationIndexDesc() + .findFirst()) ?? + await _generateAddressForChain(0, 0, DerivePathType.bip84); Future get currentChangeAddress async => (await _currentChangeAddress).value; - Future get _currentChangeAddress async => (await db - .getAddresses(walletId) - .filter() - .typeEqualTo(isar_models.AddressType.p2wpkh) - .subTypeEqualTo(isar_models.AddressSubType.change) - .sortByDerivationIndexDesc() - .findFirst())!; + Future get _currentChangeAddress async => + (await db + .getAddresses(walletId) + .filter() + .typeEqualTo(isar_models.AddressType.p2wpkh) + .subTypeEqualTo(isar_models.AddressSubType.change) + .sortByDerivationIndexDesc() + .findFirst()) ?? + await _generateAddressForChain(1, 0, DerivePathType.bip84); @override Future exit() async { @@ -1170,6 +1174,8 @@ class NamecoinWallet extends CoinServiceAPI with WalletCache, WalletDB { "Attempted to initialize an existing wallet using an unknown wallet ID!"); } await _prefs.init(); + await _checkCurrentChangeAddressesForTransactions(); + await _checkCurrentReceivingAddressesForTransactions(); } // hack to add tx to txData before refresh completes @@ -1861,7 +1867,7 @@ class NamecoinWallet extends CoinServiceAPI with WalletCache, WalletDB { 'Number of txs for current receiving address $currentReceiving: $txCount', level: LogLevel.Info); - if (txCount >= 1) { + if (txCount >= 1 || currentReceiving.derivationIndex < 0) { // First increment the receiving index final newReceivingIndex = currentReceiving.derivationIndex + 1; @@ -1880,12 +1886,9 @@ class NamecoinWallet extends CoinServiceAPI with WalletCache, WalletDB { } else { // we need to update the address await db.updateAddress(existing, newReceivingAddress); - - // since we updated an existing address there is a chance it has - // some tx history. To prevent address reuse we will call check again - // recursively - await _checkReceivingAddressForTransactions(); } + // keep checking until address with no tx history is set as current + await _checkReceivingAddressForTransactions(); } } catch (e, s) { Logging.instance.log( @@ -1903,7 +1906,7 @@ class NamecoinWallet extends CoinServiceAPI with WalletCache, WalletDB { 'Number of txs for current change address $currentChange: $txCount', level: LogLevel.Info); - if (txCount >= 1) { + if (txCount >= 1 || currentChange.derivationIndex < 0) { // First increment the change index final newChangeIndex = currentChange.derivationIndex + 1; @@ -1922,12 +1925,10 @@ class NamecoinWallet extends CoinServiceAPI with WalletCache, WalletDB { } else { // we need to update the address await db.updateAddress(existing, newChangeAddress); - - // since we updated an existing address there is a chance it has - // some tx history. To prevent address reuse we will call check again - // recursively - await _checkChangeAddressForTransactions(); } + + // keep checking until address with no tx history is set as current + await _checkChangeAddressForTransactions(); } } on SocketException catch (se, s) { Logging.instance.log( diff --git a/lib/services/coins/particl/particl_wallet.dart b/lib/services/coins/particl/particl_wallet.dart index e705a6178..d19fdf769 100644 --- a/lib/services/coins/particl/particl_wallet.dart +++ b/lib/services/coins/particl/particl_wallet.dart @@ -176,24 +176,28 @@ class ParticlWallet extends CoinServiceAPI with WalletCache, WalletDB { Future get currentReceivingAddress async => (await _currentReceivingAddress).value; - Future get _currentReceivingAddress async => (await db - .getAddresses(walletId) - .filter() - .typeEqualTo(isar_models.AddressType.p2wpkh) - .subTypeEqualTo(isar_models.AddressSubType.receiving) - .sortByDerivationIndexDesc() - .findFirst())!; + Future get _currentReceivingAddress async => + (await db + .getAddresses(walletId) + .filter() + .typeEqualTo(isar_models.AddressType.p2wpkh) + .subTypeEqualTo(isar_models.AddressSubType.receiving) + .sortByDerivationIndexDesc() + .findFirst()) ?? + await _generateAddressForChain(0, 0, DerivePathType.bip84); Future get currentChangeAddress async => (await _currentChangeAddress).value; - Future get _currentChangeAddress async => (await db - .getAddresses(walletId) - .filter() - .typeEqualTo(isar_models.AddressType.p2wpkh) - .subTypeEqualTo(isar_models.AddressSubType.change) - .sortByDerivationIndexDesc() - .findFirst())!; + Future get _currentChangeAddress async => + (await db + .getAddresses(walletId) + .filter() + .typeEqualTo(isar_models.AddressType.p2wpkh) + .subTypeEqualTo(isar_models.AddressSubType.change) + .sortByDerivationIndexDesc() + .findFirst()) ?? + await _generateAddressForChain(1, 0, DerivePathType.bip84); @override Future exit() async { @@ -1100,6 +1104,8 @@ class ParticlWallet extends CoinServiceAPI with WalletCache, WalletDB { "Attempted to initialize an existing wallet using an unknown wallet ID!"); } await _prefs.init(); + await _checkCurrentChangeAddressesForTransactions(); + await _checkCurrentReceivingAddressesForTransactions(); } // TODO make sure this copied implementation from bitcoin_wallet.dart applies for particl just as well--or import it @@ -1749,7 +1755,7 @@ class ParticlWallet extends CoinServiceAPI with WalletCache, WalletDB { 'Number of txs for current receiving address $currentReceiving: $txCount', level: LogLevel.Info); - if (txCount >= 1) { + if (txCount >= 1 || currentReceiving.derivationIndex < 0) { // First increment the receiving index final newReceivingIndex = currentReceiving.derivationIndex + 1; @@ -1768,12 +1774,9 @@ class ParticlWallet extends CoinServiceAPI with WalletCache, WalletDB { } else { // we need to update the address await db.updateAddress(existing, newReceivingAddress); - - // since we updated an existing address there is a chance it has - // some tx history. To prevent address reuse we will call check again - // recursively - await _checkReceivingAddressForTransactions(); } + // keep checking until address with no tx history is set as current + await _checkReceivingAddressForTransactions(); } } catch (e, s) { Logging.instance.log( @@ -1791,7 +1794,7 @@ class ParticlWallet extends CoinServiceAPI with WalletCache, WalletDB { 'Number of txs for current change address $currentChange: $txCount', level: LogLevel.Info); - if (txCount >= 1) { + if (txCount >= 1 || currentChange.derivationIndex < 0) { // First increment the change index final newChangeIndex = currentChange.derivationIndex + 1; @@ -1810,12 +1813,9 @@ class ParticlWallet extends CoinServiceAPI with WalletCache, WalletDB { } else { // we need to update the address await db.updateAddress(existing, newChangeAddress); - - // since we updated an existing address there is a chance it has - // some tx history. To prevent address reuse we will call check again - // recursively - await _checkChangeAddressForTransactions(); } + // keep checking until address with no tx history is set as current + await _checkChangeAddressForTransactions(); } } on SocketException catch (se, s) { Logging.instance.log( diff --git a/lib/services/coins/wownero/wownero_wallet.dart b/lib/services/coins/wownero/wownero_wallet.dart index d471208cd..b1afa561d 100644 --- a/lib/services/coins/wownero/wownero_wallet.dart +++ b/lib/services/coins/wownero/wownero_wallet.dart @@ -306,6 +306,8 @@ class WowneroWallet extends CoinServiceAPI with WalletCache, WalletDB { walletBase = (await walletService?.openWallet(_walletId, password!)) as WowneroWalletBase; + await _checkCurrentReceivingAddressesForTransactions(); + Logging.instance.log( "Opened existing ${coin.prettyName} wallet $walletName", level: LogLevel.Info, @@ -1245,12 +1247,9 @@ class WowneroWallet extends CoinServiceAPI with WalletCache, WalletDB { } else { // we need to update the address await db.updateAddress(existing, newReceivingAddress); - - // since we updated an existing address there is a chance it has - // some tx history. To prevent address reuse we will call check again - // recursively - await _checkReceivingAddressForTransactions(); } + // keep checking until address with no tx history is set as current + await _checkReceivingAddressForTransactions(); } } on SocketException catch (se, s) { Logging.instance.log( From c9b4006dd692b980fbfa0ca19d470555a6d1780c Mon Sep 17 00:00:00 2001 From: julian Date: Mon, 23 Jan 2023 10:33:36 -0600 Subject: [PATCH 04/21] increment build number --- pubspec.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pubspec.yaml b/pubspec.yaml index a4ba77948..134132e5f 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -11,7 +11,7 @@ description: Stack Wallet # In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion. # Read more about iOS versioning at # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html -version: 1.5.30+104 +version: 1.5.30+105 environment: sdk: ">=2.17.0 <3.0.0" From edec5f0c2af5ec5f8f925bfe033237f6c003067a Mon Sep 17 00:00:00 2001 From: ryleedavis Date: Mon, 23 Jan 2023 10:58:06 -0700 Subject: [PATCH 05/21] adding fruit sorbet theme type and selector svg --- assets/svg/fruit-sorbet-theme.svg | 28 ++ assets/svg/oled-black.svg | 16 - lib/utilities/assets.dart | 1 + lib/utilities/text_styles.dart | 357 ++++++++++++++++++++ lib/utilities/theme/color_theme.dart | 7 +- lib/utilities/theme/fruit_sorbet_theme.dart | 2 +- pubspec.yaml | 1 + 7 files changed, 394 insertions(+), 18 deletions(-) create mode 100644 assets/svg/fruit-sorbet-theme.svg delete mode 100644 assets/svg/oled-black.svg diff --git a/assets/svg/fruit-sorbet-theme.svg b/assets/svg/fruit-sorbet-theme.svg new file mode 100644 index 000000000..d8680aec9 --- /dev/null +++ b/assets/svg/fruit-sorbet-theme.svg @@ -0,0 +1,28 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/assets/svg/oled-black.svg b/assets/svg/oled-black.svg deleted file mode 100644 index 98b67ae6c..000000000 --- a/assets/svg/oled-black.svg +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - - - - - - - - - - - diff --git a/lib/utilities/assets.dart b/lib/utilities/assets.dart index f9128205d..e693b8595 100644 --- a/lib/utilities/assets.dart +++ b/lib/utilities/assets.dart @@ -71,6 +71,7 @@ class _SVG { String txExchangeFailed(BuildContext context) => "assets/svg/${Theme.of(context).extension()!.themeType.name}/tx-exchange-icon-failed.svg"; + String get themeFruit => "assets/svg/fruit-sorbet-theme.svg"; String get themeOledBlack => "assets/svg/oled-black-theme.svg"; String get themeOcean => "assets/svg/ocean-breeze-theme.svg"; String get themeLight => "assets/svg/light-mode.svg"; diff --git a/lib/utilities/text_styles.dart b/lib/utilities/text_styles.dart index 3d1a38c12..530c3335e 100644 --- a/lib/utilities/text_styles.dart +++ b/lib/utilities/text_styles.dart @@ -33,6 +33,12 @@ class STextStyles { fontWeight: FontWeight.w600, fontSize: 20, ); + case ThemeType.fruitSorbet: + return GoogleFonts.inter( + color: _theme(context).textDark, + fontWeight: FontWeight.w600, + fontSize: 20, + ); } } @@ -62,6 +68,12 @@ class STextStyles { fontWeight: FontWeight.w600, fontSize: 18, ); + case ThemeType.fruitSorbet: + return GoogleFonts.inter( + color: _theme(context).textDark, + fontWeight: FontWeight.w600, + fontSize: 18, + ); } } @@ -91,6 +103,12 @@ class STextStyles { fontWeight: FontWeight.w600, fontSize: 16, ); + case ThemeType.fruitSorbet: + return GoogleFonts.inter( + color: _theme(context).textDark, + fontWeight: FontWeight.w600, + fontSize: 16, + ); } } @@ -120,6 +138,12 @@ class STextStyles { fontWeight: FontWeight.w600, fontSize: 16, ); + case ThemeType.fruitSorbet: + return GoogleFonts.inter( + color: _theme(context).textDark, + fontWeight: FontWeight.w600, + fontSize: 16, + ); } } @@ -149,6 +173,12 @@ class STextStyles { fontWeight: FontWeight.w400, fontSize: 16, ); + case ThemeType.fruitSorbet: + return GoogleFonts.inter( + color: _theme(context).textDark, + fontWeight: FontWeight.w400, + fontSize: 16, + ); } } @@ -178,6 +208,12 @@ class STextStyles { fontWeight: FontWeight.w400, fontSize: 16, ); + case ThemeType.fruitSorbet: + return GoogleFonts.inter( + color: _theme(context).textDark, + fontWeight: FontWeight.w400, + fontSize: 16, + ); } } @@ -207,6 +243,12 @@ class STextStyles { fontWeight: FontWeight.w500, fontSize: 16, ); + case ThemeType.fruitSorbet: + return GoogleFonts.inter( + color: _theme(context).textDark, + fontWeight: FontWeight.w500, + fontSize: 16, + ); } } @@ -236,6 +278,12 @@ class STextStyles { fontWeight: FontWeight.w600, fontSize: 16, ); + case ThemeType.fruitSorbet: + return GoogleFonts.inter( + color: _theme(context).textDark, + fontWeight: FontWeight.w600, + fontSize: 16, + ); } } @@ -265,6 +313,12 @@ class STextStyles { fontWeight: FontWeight.w500, fontSize: 16, ); + case ThemeType.fruitSorbet: + return GoogleFonts.inter( + color: _theme(context).buttonTextPrimary, + fontWeight: FontWeight.w500, + fontSize: 16, + ); } } @@ -294,6 +348,12 @@ class STextStyles { fontWeight: FontWeight.w500, fontSize: 16, ); + case ThemeType.fruitSorbet: + return GoogleFonts.inter( + color: _theme(context).textDark, + fontWeight: FontWeight.w500, + fontSize: 16, + ); } } @@ -323,6 +383,12 @@ class STextStyles { fontWeight: FontWeight.w500, fontSize: 16, ); + case ThemeType.fruitSorbet: + return GoogleFonts.inter( + color: _theme(context).textDark3, + fontWeight: FontWeight.w500, + fontSize: 16, + ); } } @@ -352,6 +418,12 @@ class STextStyles { fontWeight: FontWeight.w500, fontSize: 14, ); + case ThemeType.fruitSorbet: + return GoogleFonts.inter( + color: _theme(context).textDark3, + fontWeight: FontWeight.w500, + fontSize: 14, + ); } } @@ -381,6 +453,12 @@ class STextStyles { fontWeight: FontWeight.w500, fontSize: 12, ); + case ThemeType.fruitSorbet: + return GoogleFonts.inter( + color: _theme(context).textSubtitle1, + fontWeight: FontWeight.w500, + fontSize: 12, + ); } } @@ -414,6 +492,13 @@ class STextStyles { fontSize: 14, height: 14 / 14, ); + case ThemeType.fruitSorbet: + return GoogleFonts.inter( + color: _theme(context).textFieldActiveSearchIconRight, + fontWeight: FontWeight.w500, + fontSize: 14, + height: 14 / 14, + ); } } @@ -443,6 +528,12 @@ class STextStyles { fontWeight: FontWeight.w700, fontSize: 12, ); + case ThemeType.fruitSorbet: + return GoogleFonts.inter( + color: _theme(context).textSubtitle1, + fontWeight: FontWeight.w700, + fontSize: 12, + ); } } @@ -472,6 +563,12 @@ class STextStyles { fontWeight: FontWeight.w500, fontSize: 14, ); + case ThemeType.fruitSorbet: + return GoogleFonts.inter( + color: _theme(context).infoItemLabel, + fontWeight: FontWeight.w500, + fontSize: 14, + ); } } @@ -501,6 +598,12 @@ class STextStyles { fontWeight: FontWeight.w500, fontSize: 14, ); + case ThemeType.fruitSorbet: + return GoogleFonts.inter( + color: _theme(context).textDark, + fontWeight: FontWeight.w500, + fontSize: 14, + ); } } @@ -530,6 +633,12 @@ class STextStyles { fontWeight: FontWeight.w500, fontSize: 14, ); + case ThemeType.fruitSorbet: + return GoogleFonts.inter( + color: _theme(context).textDark, + fontWeight: FontWeight.w500, + fontSize: 14, + ); } } @@ -563,6 +672,13 @@ class STextStyles { fontSize: 14, height: 1.5, ); + case ThemeType.fruitSorbet: + return GoogleFonts.inter( + color: _theme(context).textSubtitle2, + fontWeight: FontWeight.w500, + fontSize: 14, + height: 1.5, + ); } } @@ -596,6 +712,13 @@ class STextStyles { fontSize: 14, height: 1.5, ); + case ThemeType.fruitSorbet: + return GoogleFonts.inter( + color: _theme(context).textDark, + fontWeight: FontWeight.w500, + fontSize: 14, + height: 1.5, + ); } } @@ -625,6 +748,12 @@ class STextStyles { fontWeight: FontWeight.w400, fontSize: 14, ); + case ThemeType.fruitSorbet: + return GoogleFonts.inter( + color: _theme(context).textDark, + fontWeight: FontWeight.w400, + fontSize: 14, + ); } } @@ -654,6 +783,12 @@ class STextStyles { fontWeight: FontWeight.w500, fontSize: 14, ); + case ThemeType.fruitSorbet: + return GoogleFonts.inter( + color: _theme(context).accentColorRed, + fontWeight: FontWeight.w500, + fontSize: 14, + ); } } @@ -683,6 +818,12 @@ class STextStyles { fontWeight: FontWeight.w500, fontSize: 14, ); + case ThemeType.fruitSorbet: + return GoogleFonts.inter( + color: _theme(context).infoItemIcons, + fontWeight: FontWeight.w500, + fontSize: 14, + ); } } @@ -712,6 +853,12 @@ class STextStyles { fontWeight: FontWeight.w500, fontSize: 12, ); + case ThemeType.fruitSorbet: + return GoogleFonts.inter( + color: _theme(context).accentColorBlue, + fontWeight: FontWeight.w500, + fontSize: 12, + ); } } @@ -741,6 +888,12 @@ class STextStyles { fontWeight: FontWeight.w600, fontSize: 12, ); + case ThemeType.fruitSorbet: + return GoogleFonts.inter( + color: _theme(context).textDark, + fontWeight: FontWeight.w600, + fontSize: 12, + ); } } @@ -770,6 +923,12 @@ class STextStyles { fontWeight: FontWeight.w500, fontSize: 12, ); + case ThemeType.fruitSorbet: + return GoogleFonts.inter( + color: _theme(context).textDark, + fontWeight: FontWeight.w500, + fontSize: 12, + ); } } @@ -799,6 +958,12 @@ class STextStyles { fontWeight: FontWeight.w500, fontSize: 12, ); + case ThemeType.fruitSorbet: + return GoogleFonts.inter( + color: _theme(context).textDark, + fontWeight: FontWeight.w500, + fontSize: 12, + ); } } @@ -828,6 +993,12 @@ class STextStyles { fontWeight: FontWeight.w500, fontSize: 10, ); + case ThemeType.fruitSorbet: + return GoogleFonts.inter( + color: _theme(context).textError, + fontWeight: FontWeight.w500, + fontSize: 10, + ); } } @@ -857,6 +1028,12 @@ class STextStyles { fontWeight: FontWeight.w500, fontSize: 10, ); + case ThemeType.fruitSorbet: + return GoogleFonts.inter( + color: _theme(context).textSubtitle1, + fontWeight: FontWeight.w500, + fontSize: 10, + ); } } @@ -892,6 +1069,13 @@ class STextStyles { fontSize: 40, height: 40 / 40, ); + case ThemeType.fruitSorbet: + return GoogleFonts.inter( + color: _theme(context).textDark, + fontWeight: FontWeight.w600, + fontSize: 40, + height: 40 / 40, + ); } } @@ -925,6 +1109,13 @@ class STextStyles { fontSize: 32, height: 32 / 32, ); + case ThemeType.fruitSorbet: + return GoogleFonts.inter( + color: _theme(context).textDark, + fontWeight: FontWeight.w600, + fontSize: 32, + height: 32 / 32, + ); } } @@ -958,6 +1149,13 @@ class STextStyles { fontSize: 24, height: 24 / 24, ); + case ThemeType.fruitSorbet: + return GoogleFonts.inter( + color: _theme(context).textDark, + fontWeight: FontWeight.w600, + fontSize: 24, + height: 24 / 24, + ); } } @@ -991,6 +1189,13 @@ class STextStyles { fontSize: 20, height: 30 / 20, ); + case ThemeType.fruitSorbet: + return GoogleFonts.inter( + color: _theme(context).textDark, + fontWeight: FontWeight.w500, + fontSize: 20, + height: 30 / 20, + ); } } @@ -1024,6 +1229,13 @@ class STextStyles { fontSize: 20, height: 30 / 20, ); + case ThemeType.fruitSorbet: + return GoogleFonts.inter( + color: _theme(context).textDark, + fontWeight: FontWeight.w400, + fontSize: 20, + height: 30 / 20, + ); } } @@ -1057,6 +1269,13 @@ class STextStyles { fontSize: 20, height: 28 / 20, ); + case ThemeType.fruitSorbet: + return GoogleFonts.inter( + color: _theme(context).textDark, + fontWeight: FontWeight.w400, + fontSize: 20, + height: 28 / 20, + ); } } @@ -1090,6 +1309,13 @@ class STextStyles { fontSize: 24, height: 33 / 24, ); + case ThemeType.fruitSorbet: + return GoogleFonts.inter( + color: _theme(context).textDark, + fontWeight: FontWeight.w400, + fontSize: 24, + height: 33 / 24, + ); } } @@ -1123,6 +1349,13 @@ class STextStyles { fontSize: 20, height: 26 / 20, ); + case ThemeType.fruitSorbet: + return GoogleFonts.inter( + color: _theme(context).buttonTextPrimary, + fontWeight: FontWeight.w500, + fontSize: 20, + height: 26 / 20, + ); } } @@ -1156,6 +1389,13 @@ class STextStyles { fontSize: 20, height: 26 / 20, ); + case ThemeType.fruitSorbet: + return GoogleFonts.inter( + color: _theme(context).buttonTextPrimaryDisabled, + fontWeight: FontWeight.w500, + fontSize: 20, + height: 26 / 20, + ); } } @@ -1189,6 +1429,13 @@ class STextStyles { fontSize: 20, height: 26 / 20, ); + case ThemeType.fruitSorbet: + return GoogleFonts.inter( + color: _theme(context).buttonTextSecondary, + fontWeight: FontWeight.w500, + fontSize: 20, + height: 26 / 20, + ); } } @@ -1222,6 +1469,13 @@ class STextStyles { fontSize: 20, height: 26 / 20, ); + case ThemeType.fruitSorbet: + return GoogleFonts.inter( + color: _theme(context).buttonTextSecondaryDisabled, + fontWeight: FontWeight.w500, + fontSize: 20, + height: 26 / 20, + ); } } @@ -1255,6 +1509,13 @@ class STextStyles { fontSize: 18, height: 27 / 18, ); + case ThemeType.fruitSorbet: + return GoogleFonts.inter( + color: _theme(context).textDark, + fontWeight: FontWeight.w500, + fontSize: 18, + height: 27 / 18, + ); } } @@ -1288,6 +1549,13 @@ class STextStyles { fontSize: 18, height: 27 / 18, ); + case ThemeType.fruitSorbet: + return GoogleFonts.inter( + color: _theme(context).textDark, + fontWeight: FontWeight.w700, + fontSize: 18, + height: 27 / 18, + ); } } @@ -1321,6 +1589,13 @@ class STextStyles { fontSize: 16, height: 24 / 16, ); + case ThemeType.fruitSorbet: + return GoogleFonts.inter( + color: _theme(context).buttonTextPrimaryDisabled, + fontWeight: FontWeight.w500, + fontSize: 16, + height: 24 / 16, + ); } } @@ -1354,6 +1629,13 @@ class STextStyles { fontSize: 14, height: 21 / 14, ); + case ThemeType.fruitSorbet: + return GoogleFonts.inter( + color: _theme(context).textSubtitle1, + fontWeight: FontWeight.w500, + fontSize: 14, + height: 21 / 14, + ); } } @@ -1387,6 +1669,13 @@ class STextStyles { fontSize: 14, height: 21 / 14, ); + case ThemeType.fruitSorbet: + return GoogleFonts.inter( + color: _theme(context).textDark, + fontWeight: FontWeight.w600, + fontSize: 14, + height: 21 / 14, + ); } } @@ -1420,6 +1709,13 @@ class STextStyles { fontSize: 16, height: 24 / 16, ); + case ThemeType.fruitSorbet: + return GoogleFonts.inter( + color: _theme(context).buttonTextSecondary, + fontWeight: FontWeight.w500, + fontSize: 16, + height: 24 / 16, + ); } } @@ -1453,6 +1749,13 @@ class STextStyles { fontSize: 20, height: 30 / 20, ); + case ThemeType.fruitSorbet: + return GoogleFonts.inter( + color: _theme(context).textSubtitle2, + fontWeight: FontWeight.w500, + fontSize: 20, + height: 30 / 20, + ); } } @@ -1486,6 +1789,13 @@ class STextStyles { fontSize: 16, height: 20.8 / 16, ); + case ThemeType.fruitSorbet: + return GoogleFonts.inter( + color: _theme(context).textDark.withOpacity(0.8), + fontWeight: FontWeight.w500, + fontSize: 16, + height: 20.8 / 16, + ); } } @@ -1519,6 +1829,13 @@ class STextStyles { fontSize: 16, height: 20.8 / 16, ); + case ThemeType.fruitSorbet: + return GoogleFonts.inter( + color: _theme(context).textDark, + fontWeight: FontWeight.w500, + fontSize: 16, + height: 20.8 / 16, + ); } } @@ -1552,6 +1869,13 @@ class STextStyles { fontSize: 16, height: 20.8 / 16, ); + case ThemeType.fruitSorbet: + return GoogleFonts.inter( + color: _theme(context).textDark.withOpacity(0.5), + fontWeight: FontWeight.w500, + fontSize: 16, + height: 20.8 / 16, + ); } } @@ -1585,6 +1909,13 @@ class STextStyles { fontSize: 16, height: 20.8 / 16, ); + case ThemeType.fruitSorbet: + return GoogleFonts.inter( + color: _theme(context).textDark, + fontWeight: FontWeight.w500, + fontSize: 16, + height: 20.8 / 16, + ); } } @@ -1614,6 +1945,12 @@ class STextStyles { fontWeight: FontWeight.w600, fontSize: 8, ); + case ThemeType.fruitSorbet: + return GoogleFonts.roboto( + color: _theme(context).textDark, + fontWeight: FontWeight.w600, + fontSize: 8, + ); } } @@ -1643,6 +1980,12 @@ class STextStyles { fontWeight: FontWeight.w400, fontSize: 26, ); + case ThemeType.fruitSorbet: + return GoogleFonts.roboto( + color: _theme(context).numberTextDefault, + fontWeight: FontWeight.w400, + fontSize: 26, + ); } } @@ -1676,6 +2019,13 @@ class STextStyles { fontWeight: FontWeight.w400, fontSize: 12, ); + case ThemeType.fruitSorbet: + return GoogleFonts.inter( + letterSpacing: 0.5, + color: _theme(context).accentColorDark, + fontWeight: FontWeight.w400, + fontSize: 12, + ); } } @@ -1709,6 +2059,13 @@ class STextStyles { fontWeight: FontWeight.w600, fontSize: 16, ); + case ThemeType.fruitSorbet: + return GoogleFonts.inter( + letterSpacing: 0.5, + color: _theme(context).accentColorDark, + fontWeight: FontWeight.w600, + fontSize: 16, + ); } } } diff --git a/lib/utilities/theme/color_theme.dart b/lib/utilities/theme/color_theme.dart index 8e85a69c1..0403589e4 100644 --- a/lib/utilities/theme/color_theme.dart +++ b/lib/utilities/theme/color_theme.dart @@ -1,11 +1,12 @@ import 'package:flutter/material.dart'; import 'package:stackwallet/utilities/enums/coin_enum.dart'; import 'package:stackwallet/utilities/theme/dark_colors.dart'; +import 'package:stackwallet/utilities/theme/fruit_sorbet_theme.dart'; import 'package:stackwallet/utilities/theme/light_colors.dart'; import 'package:stackwallet/utilities/theme/ocean_breeze_colors.dart'; import 'package:stackwallet/utilities/theme/oled_black_colors.dart'; -enum ThemeType { light, dark, oceanBreeze, oledBlack } +enum ThemeType { light, dark, oceanBreeze, oledBlack, fruitSorbet } // adjust this file @@ -20,6 +21,8 @@ extension ThemeTypeExt on ThemeType { return OceanBreezeColors(); case ThemeType.oledBlack: return OledBlackColors(); + case ThemeType.fruitSorbet: + return FruitSorbetColors(); } } @@ -33,6 +36,8 @@ extension ThemeTypeExt on ThemeType { return "Ocean Breeze"; case ThemeType.oledBlack: return "Oled Black"; + case ThemeType.fruitSorbet: + return "Fruit Sorbet"; } } } diff --git a/lib/utilities/theme/fruit_sorbet_theme.dart b/lib/utilities/theme/fruit_sorbet_theme.dart index 9ee140407..7956875d7 100644 --- a/lib/utilities/theme/fruit_sorbet_theme.dart +++ b/lib/utilities/theme/fruit_sorbet_theme.dart @@ -1,7 +1,7 @@ import 'package:flutter/material.dart'; import 'package:stackwallet/utilities/theme/color_theme.dart'; -class LightColors extends StackColorTheme { +class FruitSorbetColors extends StackColorTheme { @override ThemeType get themeType => ThemeType.light; diff --git a/pubspec.yaml b/pubspec.yaml index 9d6923934..df7666791 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -338,6 +338,7 @@ flutter: - assets/svg/light-mode.svg - assets/svg/ocean-breeze-theme.svg - assets/svg/oled-black-theme.svg + - assets/svg/fruit-sorbet-theme.svg # light theme specific - assets/svg/light/tx-exchange-icon.svg From d25b757a22009330b165ec3e2160026f7c4be1df Mon Sep 17 00:00:00 2001 From: ryleedavis Date: Mon, 23 Jan 2023 11:00:46 -0700 Subject: [PATCH 06/21] add fruit sorbet to mobile + desktop appearance settings --- .../global_settings_view/appearance_settings_view.dart | 2 ++ .../settings/settings_menu/appearance_settings.dart | 2 ++ 2 files changed, 4 insertions(+) diff --git a/lib/pages/settings_views/global_settings_view/appearance_settings_view.dart b/lib/pages/settings_views/global_settings_view/appearance_settings_view.dart index 73da50719..b1d9844d6 100644 --- a/lib/pages/settings_views/global_settings_view/appearance_settings_view.dart +++ b/lib/pages/settings_views/global_settings_view/appearance_settings_view.dart @@ -31,6 +31,8 @@ class AppearanceSettingsView extends ConsumerWidget { return "Dark theme"; case ThemeType.oledBlack: return "Oled Black theme"; + case ThemeType.fruitSorbet: + return "Fruit Sorbet theme"; } } 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 f1bb52244..b754f5c28 100644 --- a/lib/pages_desktop_specific/settings/settings_menu/appearance_settings.dart +++ b/lib/pages_desktop_specific/settings/settings_menu/appearance_settings.dart @@ -169,6 +169,8 @@ class _ThemeToggle extends ConsumerState { return Assets.svg.themeOcean; case ThemeType.oledBlack: return Assets.svg.themeOledBlack; + case ThemeType.fruitSorbet: + return Assets.svg.themeFruit; } } From bd80ad4ef434d77b03eecb20793a2744e67e616c Mon Sep 17 00:00:00 2001 From: ryleedavis Date: Mon, 23 Jan 2023 11:16:28 -0700 Subject: [PATCH 07/21] add fruit theme button to appearance settings --- .../appearance_settings_view.dart | 82 +++++++++++++++++++ 1 file changed, 82 insertions(+) diff --git a/lib/pages/settings_views/global_settings_view/appearance_settings_view.dart b/lib/pages/settings_views/global_settings_view/appearance_settings_view.dart index b1d9844d6..e48a1bb01 100644 --- a/lib/pages/settings_views/global_settings_view/appearance_settings_view.dart +++ b/lib/pages/settings_views/global_settings_view/appearance_settings_view.dart @@ -7,6 +7,7 @@ import 'package:stackwallet/utilities/constants.dart'; import 'package:stackwallet/utilities/text_styles.dart'; import 'package:stackwallet/utilities/theme/color_theme.dart'; import 'package:stackwallet/utilities/theme/dark_colors.dart'; +import 'package:stackwallet/utilities/theme/fruit_sorbet_theme.dart'; import 'package:stackwallet/utilities/theme/light_colors.dart'; import 'package:stackwallet/utilities/theme/ocean_breeze_colors.dart'; import 'package:stackwallet/utilities/theme/oled_black_colors.dart'; @@ -516,6 +517,87 @@ class _ThemeOptionsView extends ConsumerState { ), ), ), + const SizedBox( + height: 10, + ), + MaterialButton( + splashColor: Colors.transparent, + hoverColor: Colors.transparent, + padding: const EdgeInsets.all(0), + materialTapTargetSize: MaterialTapTargetSize.shrinkWrap, + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.circular( + Constants.size.circularBorderRadius, + ), + ), + onPressed: () { + DB.instance.put( + boxName: DB.boxNameTheme, + key: "colorScheme", + value: ThemeType.fruitSorbet.name, + ); + ref.read(colorThemeProvider.state).state = + StackColors.fromStackColorTheme( + FruitSorbetColors(), + ); + + setState(() { + _selectedTheme = "fruitSorbet"; + }); + }, + child: SizedBox( + width: 200, + child: Column( + mainAxisSize: MainAxisSize.min, + children: [ + Row( + children: [ + SizedBox( + width: 10, + height: 10, + child: Radio( + activeColor: Theme.of(context) + .extension()! + .radioButtonIconEnabled, + value: "fruitSorbet", + groupValue: _selectedTheme, + onChanged: (newValue) { + if (newValue is String && newValue == "fruitSorbet") { + DB.instance.put( + boxName: DB.boxNameTheme, + key: "colorScheme", + value: ThemeType.fruitSorbet.name, + ); + ref.read(colorThemeProvider.state).state = + StackColors.fromStackColorTheme( + OledBlackColors(), + ); + + setState(() { + _selectedTheme = "fruitSorbet"; + }); + } + }, + ), + ), + const SizedBox( + width: 14, + ), + Text( + "Fruit Sorbet", + style: + STextStyles.desktopTextExtraSmall(context).copyWith( + color: Theme.of(context) + .extension()! + .textDark2, + ), + ), + ], + ), + ], + ), + ), + ), ], ); } From 90eb0b77c06d6ad3df0c9abfea39cb39489985f0 Mon Sep 17 00:00:00 2001 From: ryleedavis Date: Mon, 23 Jan 2023 15:36:13 -0700 Subject: [PATCH 08/21] WIP: fruit sorbet background --- assets/svg/fruitSorbet/bell-new.svg | 5 +++++ assets/svg/fruitSorbet/bg.svg | 9 +++++++++ assets/svg/fruitSorbet/buy-coins-icon.svg | 11 +++++++++++ assets/svg/fruitSorbet/exchange-2.svg | 4 ++++ assets/svg/fruitSorbet/stack-icon1.svg | 5 +++++ .../fruitSorbet/tx-exchange-icon-failed.svg | 7 +++++++ .../fruitSorbet/tx-exchange-icon-pending.svg | 6 ++++++ assets/svg/fruitSorbet/tx-exchange-icon.svg | 4 ++++ .../svg/fruitSorbet/tx-icon-receive-failed.svg | 7 +++++++ .../fruitSorbet/tx-icon-receive-pending.svg | 5 +++++ assets/svg/fruitSorbet/tx-icon-receive.svg | 4 ++++ assets/svg/fruitSorbet/tx-icon-send-failed.svg | 7 +++++++ .../svg/fruitSorbet/tx-icon-send-pending.svg | 6 ++++++ assets/svg/fruitSorbet/tx-icon-send.svg | 4 ++++ .../appearance_settings_view.dart | 4 ++-- lib/utilities/assets.dart | 1 + lib/utilities/theme/color_theme.dart | 2 +- ...bet_theme.dart => fruit_sorbet_colors.dart} | 5 ++--- lib/widgets/background.dart | 1 + pubspec.yaml | 18 +++++++++++++++++- 20 files changed, 108 insertions(+), 7 deletions(-) create mode 100644 assets/svg/fruitSorbet/bell-new.svg create mode 100644 assets/svg/fruitSorbet/bg.svg create mode 100644 assets/svg/fruitSorbet/buy-coins-icon.svg create mode 100644 assets/svg/fruitSorbet/exchange-2.svg create mode 100644 assets/svg/fruitSorbet/stack-icon1.svg create mode 100644 assets/svg/fruitSorbet/tx-exchange-icon-failed.svg create mode 100644 assets/svg/fruitSorbet/tx-exchange-icon-pending.svg create mode 100644 assets/svg/fruitSorbet/tx-exchange-icon.svg create mode 100644 assets/svg/fruitSorbet/tx-icon-receive-failed.svg create mode 100644 assets/svg/fruitSorbet/tx-icon-receive-pending.svg create mode 100644 assets/svg/fruitSorbet/tx-icon-receive.svg create mode 100644 assets/svg/fruitSorbet/tx-icon-send-failed.svg create mode 100644 assets/svg/fruitSorbet/tx-icon-send-pending.svg create mode 100644 assets/svg/fruitSorbet/tx-icon-send.svg rename lib/utilities/theme/{fruit_sorbet_theme.dart => fruit_sorbet_colors.dart} (98%) diff --git a/assets/svg/fruitSorbet/bell-new.svg b/assets/svg/fruitSorbet/bell-new.svg new file mode 100644 index 000000000..ffb3d630b --- /dev/null +++ b/assets/svg/fruitSorbet/bell-new.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/assets/svg/fruitSorbet/bg.svg b/assets/svg/fruitSorbet/bg.svg new file mode 100644 index 000000000..0a3be99a3 --- /dev/null +++ b/assets/svg/fruitSorbet/bg.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/assets/svg/fruitSorbet/buy-coins-icon.svg b/assets/svg/fruitSorbet/buy-coins-icon.svg new file mode 100644 index 000000000..5788e2bf0 --- /dev/null +++ b/assets/svg/fruitSorbet/buy-coins-icon.svg @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/assets/svg/fruitSorbet/exchange-2.svg b/assets/svg/fruitSorbet/exchange-2.svg new file mode 100644 index 000000000..11e246a3b --- /dev/null +++ b/assets/svg/fruitSorbet/exchange-2.svg @@ -0,0 +1,4 @@ + + + + diff --git a/assets/svg/fruitSorbet/stack-icon1.svg b/assets/svg/fruitSorbet/stack-icon1.svg new file mode 100644 index 000000000..f316012d7 --- /dev/null +++ b/assets/svg/fruitSorbet/stack-icon1.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/assets/svg/fruitSorbet/tx-exchange-icon-failed.svg b/assets/svg/fruitSorbet/tx-exchange-icon-failed.svg new file mode 100644 index 000000000..a54836bba --- /dev/null +++ b/assets/svg/fruitSorbet/tx-exchange-icon-failed.svg @@ -0,0 +1,7 @@ + + + + + + + diff --git a/assets/svg/fruitSorbet/tx-exchange-icon-pending.svg b/assets/svg/fruitSorbet/tx-exchange-icon-pending.svg new file mode 100644 index 000000000..5f9aa4256 --- /dev/null +++ b/assets/svg/fruitSorbet/tx-exchange-icon-pending.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/assets/svg/fruitSorbet/tx-exchange-icon.svg b/assets/svg/fruitSorbet/tx-exchange-icon.svg new file mode 100644 index 000000000..fcd3ef9dc --- /dev/null +++ b/assets/svg/fruitSorbet/tx-exchange-icon.svg @@ -0,0 +1,4 @@ + + + + diff --git a/assets/svg/fruitSorbet/tx-icon-receive-failed.svg b/assets/svg/fruitSorbet/tx-icon-receive-failed.svg new file mode 100644 index 000000000..189bd15c9 --- /dev/null +++ b/assets/svg/fruitSorbet/tx-icon-receive-failed.svg @@ -0,0 +1,7 @@ + + + + + + + diff --git a/assets/svg/fruitSorbet/tx-icon-receive-pending.svg b/assets/svg/fruitSorbet/tx-icon-receive-pending.svg new file mode 100644 index 000000000..64ea8da3d --- /dev/null +++ b/assets/svg/fruitSorbet/tx-icon-receive-pending.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/assets/svg/fruitSorbet/tx-icon-receive.svg b/assets/svg/fruitSorbet/tx-icon-receive.svg new file mode 100644 index 000000000..1076d8d57 --- /dev/null +++ b/assets/svg/fruitSorbet/tx-icon-receive.svg @@ -0,0 +1,4 @@ + + + + diff --git a/assets/svg/fruitSorbet/tx-icon-send-failed.svg b/assets/svg/fruitSorbet/tx-icon-send-failed.svg new file mode 100644 index 000000000..9751b61e8 --- /dev/null +++ b/assets/svg/fruitSorbet/tx-icon-send-failed.svg @@ -0,0 +1,7 @@ + + + + + + + diff --git a/assets/svg/fruitSorbet/tx-icon-send-pending.svg b/assets/svg/fruitSorbet/tx-icon-send-pending.svg new file mode 100644 index 000000000..e4ec777e3 --- /dev/null +++ b/assets/svg/fruitSorbet/tx-icon-send-pending.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/assets/svg/fruitSorbet/tx-icon-send.svg b/assets/svg/fruitSorbet/tx-icon-send.svg new file mode 100644 index 000000000..ee32aa6b4 --- /dev/null +++ b/assets/svg/fruitSorbet/tx-icon-send.svg @@ -0,0 +1,4 @@ + + + + diff --git a/lib/pages/settings_views/global_settings_view/appearance_settings_view.dart b/lib/pages/settings_views/global_settings_view/appearance_settings_view.dart index e48a1bb01..cefde08bb 100644 --- a/lib/pages/settings_views/global_settings_view/appearance_settings_view.dart +++ b/lib/pages/settings_views/global_settings_view/appearance_settings_view.dart @@ -7,7 +7,7 @@ import 'package:stackwallet/utilities/constants.dart'; import 'package:stackwallet/utilities/text_styles.dart'; import 'package:stackwallet/utilities/theme/color_theme.dart'; import 'package:stackwallet/utilities/theme/dark_colors.dart'; -import 'package:stackwallet/utilities/theme/fruit_sorbet_theme.dart'; +import 'package:stackwallet/utilities/theme/fruit_sorbet_colors.dart'; import 'package:stackwallet/utilities/theme/light_colors.dart'; import 'package:stackwallet/utilities/theme/ocean_breeze_colors.dart'; import 'package:stackwallet/utilities/theme/oled_black_colors.dart'; @@ -570,7 +570,7 @@ class _ThemeOptionsView extends ConsumerState { ); ref.read(colorThemeProvider.state).state = StackColors.fromStackColorTheme( - OledBlackColors(), + FruitSorbetColors(), ); setState(() { diff --git a/lib/utilities/assets.dart b/lib/utilities/assets.dart index e693b8595..3e5d24e39 100644 --- a/lib/utilities/assets.dart +++ b/lib/utilities/assets.dart @@ -37,6 +37,7 @@ class _SVG { return null; case ThemeType.oceanBreeze: + case ThemeType.fruitSorbet: return "assets/svg/${Theme.of(context).extension()!.themeType.name}/bg.svg"; } } diff --git a/lib/utilities/theme/color_theme.dart b/lib/utilities/theme/color_theme.dart index 0403589e4..d21b8a262 100644 --- a/lib/utilities/theme/color_theme.dart +++ b/lib/utilities/theme/color_theme.dart @@ -1,7 +1,7 @@ import 'package:flutter/material.dart'; import 'package:stackwallet/utilities/enums/coin_enum.dart'; import 'package:stackwallet/utilities/theme/dark_colors.dart'; -import 'package:stackwallet/utilities/theme/fruit_sorbet_theme.dart'; +import 'package:stackwallet/utilities/theme/fruit_sorbet_colors.dart'; import 'package:stackwallet/utilities/theme/light_colors.dart'; import 'package:stackwallet/utilities/theme/ocean_breeze_colors.dart'; import 'package:stackwallet/utilities/theme/oled_black_colors.dart'; diff --git a/lib/utilities/theme/fruit_sorbet_theme.dart b/lib/utilities/theme/fruit_sorbet_colors.dart similarity index 98% rename from lib/utilities/theme/fruit_sorbet_theme.dart rename to lib/utilities/theme/fruit_sorbet_colors.dart index 7956875d7..0b6122723 100644 --- a/lib/utilities/theme/fruit_sorbet_theme.dart +++ b/lib/utilities/theme/fruit_sorbet_colors.dart @@ -3,11 +3,10 @@ import 'package:stackwallet/utilities/theme/color_theme.dart'; class FruitSorbetColors extends StackColorTheme { @override - ThemeType get themeType => ThemeType.light; + ThemeType get themeType => ThemeType.fruitSorbet; @override - Color get background => - const Color(0xFFF7F7F7); //change this to background svg + Color get background => Colors.transparent; @override Color get backgroundAppBar => background; @override diff --git a/lib/widgets/background.dart b/lib/widgets/background.dart index 0a14e2df6..c966a5d98 100644 --- a/lib/widgets/background.dart +++ b/lib/widgets/background.dart @@ -24,6 +24,7 @@ class Background extends StatelessWidget { color = Theme.of(context).extension()!.background; break; case ThemeType.oceanBreeze: + case ThemeType.fruitSorbet: color = null; break; } diff --git a/pubspec.yaml b/pubspec.yaml index df7666791..3c9f26dbc 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -370,7 +370,7 @@ flutter: - assets/svg/dark/stack-icon1.svg - assets/svg/dark/buy-coins-icon.svg - # light theme specific + # ocean theme specific - assets/svg/oceanBreeze/tx-exchange-icon.svg - assets/svg/oceanBreeze/tx-exchange-icon-pending.svg - assets/svg/oceanBreeze/tx-exchange-icon-failed.svg @@ -401,6 +401,22 @@ flutter: - assets/svg/oledBlack/stack-icon1.svg - assets/svg/oledBlack/buy-coins-icon.svg + # fruit sorbet theme specific + - assets/svg/fruitSorbet/tx-exchange-icon.svg + - assets/svg/fruitSorbet/tx-exchange-icon-pending.svg + - assets/svg/fruitSorbet/tx-exchange-icon-failed.svg + - assets/svg/fruitSorbet/tx-icon-send.svg + - assets/svg/fruitSorbet/tx-icon-send-pending.svg + - assets/svg/fruitSorbet/tx-icon-send-failed.svg + - assets/svg/fruitSorbet/tx-icon-receive.svg + - assets/svg/fruitSorbet/tx-icon-receive-pending.svg + - assets/svg/fruitSorbet/tx-icon-receive-failed.svg + - assets/svg/fruitSorbet/exchange-2.svg + - assets/svg/fruitSorbet/bell-new.svg + - assets/svg/fruitSorbet/stack-icon1.svg + - assets/svg/fruitSorbet/buy-coins-icon.svg + - assets/svg/fruitSorbet/bg.svg + # An image asset can refer to one or more resolution-specific "variants", see # https://flutter.dev/assets-and-images/#resolution-aware. # For details regarding adding assets from package dependencies, see From f769ee16a71562f66b3be35a73357817e7c5514e Mon Sep 17 00:00:00 2001 From: ryleedavis Date: Mon, 23 Jan 2023 17:31:03 -0700 Subject: [PATCH 09/21] fruit sorbet bg --- assets/svg/fruitSorbet/bg.svg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/assets/svg/fruitSorbet/bg.svg b/assets/svg/fruitSorbet/bg.svg index 0a3be99a3..c8dcb78ec 100644 --- a/assets/svg/fruitSorbet/bg.svg +++ b/assets/svg/fruitSorbet/bg.svg @@ -1,9 +1,9 @@ - + From 9e24f2bdbcfad3db3fddac003d6e96a1dbf748bc Mon Sep 17 00:00:00 2001 From: julian Date: Tue, 24 Jan 2023 08:10:52 -0600 Subject: [PATCH 10/21] added missing text styles --- lib/utilities/text_styles.dart | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/lib/utilities/text_styles.dart b/lib/utilities/text_styles.dart index 514460f70..8b756e984 100644 --- a/lib/utilities/text_styles.dart +++ b/lib/utilities/text_styles.dart @@ -33,6 +33,12 @@ class STextStyles { fontWeight: FontWeight.w500, fontSize: 12, ); + case ThemeType.fruitSorbet: + return GoogleFonts.inter( + color: _theme(context).textDark3, + fontWeight: FontWeight.w500, + fontSize: 12, + ); } } @@ -952,6 +958,12 @@ class STextStyles { fontWeight: FontWeight.w500, fontSize: 12, ); + case ThemeType.fruitSorbet: + return GoogleFonts.inter( + color: _theme(context).textDark, + fontWeight: FontWeight.w500, + fontSize: 12, + ); } } @@ -1247,6 +1259,13 @@ class STextStyles { fontSize: 24, height: 24 / 24, ); + case ThemeType.fruitSorbet: + return GoogleFonts.inter( + color: _theme(context).textDark, + fontWeight: FontWeight.w500, + fontSize: 24, + height: 24 / 24, + ); } } From 7d10ae201198a2420973f8de4c7ca105c5954537 Mon Sep 17 00:00:00 2001 From: julian Date: Tue, 24 Jan 2023 10:16:44 -0600 Subject: [PATCH 11/21] go directly to wallet view on single wallet per coin on desktop and mobile --- .../sub_widgets/wallet_list_item.dart | 45 ++++++++++++++----- .../my_stack_view/wallet_summary_table.dart | 12 +++++ lib/widgets/expandable.dart | 4 +- lib/widgets/table_view/table_view_row.dart | 3 ++ 4 files changed, 52 insertions(+), 12 deletions(-) diff --git a/lib/pages/wallets_view/sub_widgets/wallet_list_item.dart b/lib/pages/wallets_view/sub_widgets/wallet_list_item.dart index e3fd5d614..7b9d0b53f 100644 --- a/lib/pages/wallets_view/sub_widgets/wallet_list_item.dart +++ b/lib/pages/wallets_view/sub_widgets/wallet_list_item.dart @@ -1,16 +1,19 @@ +import 'dart:async'; + import 'package:flutter/material.dart'; import 'package:flutter_riverpod/flutter_riverpod.dart'; import 'package:flutter_svg/svg.dart'; +import 'package:stackwallet/pages/wallet_view/wallet_view.dart'; import 'package:stackwallet/pages/wallets_sheet/wallets_sheet.dart'; import 'package:stackwallet/providers/providers.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/format.dart'; -import 'package:stackwallet/utilities/prefs.dart'; import 'package:stackwallet/utilities/text_styles.dart'; import 'package:stackwallet/utilities/theme/stack_colors.dart'; import 'package:stackwallet/widgets/rounded_white_container.dart'; +import 'package:tuple/tuple.dart'; class WalletListItem extends ConsumerWidget { const WalletListItem({ @@ -41,17 +44,37 @@ class WalletListItem extends ConsumerWidget { borderRadius: BorderRadius.circular(Constants.size.circularBorderRadius), ), - onPressed: () { - showModalBottomSheet( - backgroundColor: Colors.transparent, - context: context, - shape: const RoundedRectangleBorder( - borderRadius: BorderRadius.vertical( - top: Radius.circular(20), + onPressed: () async { + if (walletCount == 1) { + final providersByCoin = ref.watch(walletsChangeNotifierProvider + .select((value) => value.getManagerProvidersByCoin())); + final manager = ref.read(providersByCoin[coin]!.first); + if (coin == Coin.monero || coin == Coin.wownero) { + await manager.initializeExisting(); + } + unawaited( + Navigator.of(context).pushNamed( + WalletView.routeName, + arguments: Tuple2( + manager.walletId, + providersByCoin[coin]!.first, + ), ), - ), - builder: (_) => WalletsSheet(coin: coin), - ); + ); + } else { + unawaited( + showModalBottomSheet( + backgroundColor: Colors.transparent, + context: context, + shape: const RoundedRectangleBorder( + borderRadius: BorderRadius.vertical( + top: Radius.circular(20), + ), + ), + builder: (_) => WalletsSheet(coin: coin), + ), + ); + } }, child: Row( children: [ diff --git a/lib/pages_desktop_specific/my_stack_view/wallet_summary_table.dart b/lib/pages_desktop_specific/my_stack_view/wallet_summary_table.dart index d638b3d04..b638d72a1 100644 --- a/lib/pages_desktop_specific/my_stack_view/wallet_summary_table.dart +++ b/lib/pages_desktop_specific/my_stack_view/wallet_summary_table.dart @@ -2,6 +2,7 @@ import 'package:flutter/material.dart'; import 'package:flutter_riverpod/flutter_riverpod.dart'; import 'package:flutter_svg/svg.dart'; import 'package:stackwallet/pages_desktop_specific/my_stack_view/coin_wallets_table.dart'; +import 'package:stackwallet/pages_desktop_specific/my_stack_view/wallet_view/desktop_wallet_view.dart'; import 'package:stackwallet/providers/providers.dart'; import 'package:stackwallet/utilities/assets.dart'; import 'package:stackwallet/utilities/constants.dart'; @@ -43,7 +44,18 @@ class _WalletTableState extends ConsumerState { (value) => value .getManagerProvidersForCoin(providersByCoin[i].key))); + VoidCallback? expandOverride; + if (providers.length == 1) { + expandOverride = () { + Navigator.of(context).pushNamed( + DesktopWalletView.routeName, + arguments: ref.read(providers.first).walletId, + ); + }; + } + return TableViewRow( + expandOverride: expandOverride, padding: const EdgeInsets.symmetric( horizontal: 20, vertical: 16, diff --git a/lib/widgets/expandable.dart b/lib/widgets/expandable.dart index 737f4ce7d..b60226a50 100644 --- a/lib/widgets/expandable.dart +++ b/lib/widgets/expandable.dart @@ -20,6 +20,7 @@ class Expandable extends StatefulWidget { this.animationDurationMultiplier = 1.0, this.onExpandChanged, this.controller, + this.expandOverride, }) : super(key: key); final Widget header; @@ -29,6 +30,7 @@ class Expandable extends StatefulWidget { final double animationDurationMultiplier; final void Function(ExpandableState)? onExpandChanged; final ExpandableController? controller; + final VoidCallback? expandOverride; @override State createState() => _ExpandableState(); @@ -92,7 +94,7 @@ class _ExpandableState extends State with TickerProviderStateMixin { MouseRegion( cursor: SystemMouseCursors.click, child: GestureDetector( - onTap: toggle, + onTap: widget.expandOverride ?? toggle, child: Container( color: Colors.transparent, child: widget.header, diff --git a/lib/widgets/table_view/table_view_row.dart b/lib/widgets/table_view/table_view_row.dart index 2bfc9d0c2..57f5da638 100644 --- a/lib/widgets/table_view/table_view_row.dart +++ b/lib/widgets/table_view/table_view_row.dart @@ -10,6 +10,7 @@ class TableViewRow extends StatefulWidget { required this.expandingChild, this.decoration, this.onExpandChanged, + this.expandOverride, this.padding = const EdgeInsets.all(0), this.spacing = 0.0, this.crossAxisAlignment = CrossAxisAlignment.center, @@ -19,6 +20,7 @@ class TableViewRow extends StatefulWidget { final Widget? expandingChild; final BoxDecoration? decoration; final void Function(ExpandableState)? onExpandChanged; + final VoidCallback? expandOverride; final EdgeInsetsGeometry padding; final double spacing; final CrossAxisAlignment crossAxisAlignment; @@ -74,6 +76,7 @@ class _TableViewRowState extends State { ), ) : Expandable( + expandOverride: widget.expandOverride, onExpandChanged: widget.onExpandChanged, header: MouseRegion( onEnter: (_) { From e404de2116a5dc959220515b1c83194c9d681508 Mon Sep 17 00:00:00 2001 From: julian Date: Tue, 24 Jan 2023 10:30:00 -0600 Subject: [PATCH 12/21] force usage of adkVersion parameter --- .../stack_backup_views/create_auto_backup_view.dart | 2 +- .../stack_backup_views/edit_auto_backup_view.dart | 2 +- .../stack_backup_views/helpers/restore_create_backup.dart | 6 +++--- .../backup_and_restore/create_auto_backup.dart | 2 +- lib/services/auto_swb_service.dart | 3 +-- 5 files changed, 7 insertions(+), 8 deletions(-) diff --git a/lib/pages/settings_views/global_settings_view/stack_backup_views/create_auto_backup_view.dart b/lib/pages/settings_views/global_settings_view/stack_backup_views/create_auto_backup_view.dart index 8e8731105..e95424cc0 100644 --- a/lib/pages/settings_views/global_settings_view/stack_backup_views/create_auto_backup_view.dart +++ b/lib/pages/settings_views/global_settings_view/stack_backup_views/create_auto_backup_view.dart @@ -596,7 +596,7 @@ class _EnableAutoBackupViewState extends ConsumerState { fileToSave, adkString, jsonEncode(backup), - adkVersion: adkVersion, + adkVersion, ); // this future should already be complete unless there was an error encrypting diff --git a/lib/pages/settings_views/global_settings_view/stack_backup_views/edit_auto_backup_view.dart b/lib/pages/settings_views/global_settings_view/stack_backup_views/edit_auto_backup_view.dart index 0cc85d77c..69fc4ca48 100644 --- a/lib/pages/settings_views/global_settings_view/stack_backup_views/edit_auto_backup_view.dart +++ b/lib/pages/settings_views/global_settings_view/stack_backup_views/edit_auto_backup_view.dart @@ -187,7 +187,7 @@ class _EditAutoBackupViewState extends ConsumerState { fileToSave, adkString, jsonEncode(backup), - adkVersion: adkVersion, + adkVersion, ); // this future should already be complete unless there was an error encrypting diff --git a/lib/pages/settings_views/global_settings_view/stack_backup_views/helpers/restore_create_backup.dart b/lib/pages/settings_views/global_settings_view/stack_backup_views/helpers/restore_create_backup.dart index 62a8bf9cb..39bd4ac94 100644 --- a/lib/pages/settings_views/global_settings_view/stack_backup_views/helpers/restore_create_backup.dart +++ b/lib/pages/settings_views/global_settings_view/stack_backup_views/helpers/restore_create_backup.dart @@ -133,9 +133,9 @@ abstract class SWB { static Future encryptStackWalletWithADK( String fileToSave, String adk, - String plaintext, { - int? adkVersion, - }) async { + String plaintext, + int adkVersion, + ) async { try { File backupFile = File(fileToSave); if (!backupFile.existsSync()) { diff --git a/lib/pages_desktop_specific/settings/settings_menu/backup_and_restore/create_auto_backup.dart b/lib/pages_desktop_specific/settings/settings_menu/backup_and_restore/create_auto_backup.dart index df80da732..5b092834b 100644 --- a/lib/pages_desktop_specific/settings/settings_menu/backup_and_restore/create_auto_backup.dart +++ b/lib/pages_desktop_specific/settings/settings_menu/backup_and_restore/create_auto_backup.dart @@ -722,7 +722,7 @@ class _CreateAutoBackup extends ConsumerState { fileToSave, adkString, jsonEncode(backup), - adkVersion: adkVersion, + adkVersion, ); // this future should already be complete unless there was an error encrypting diff --git a/lib/services/auto_swb_service.dart b/lib/services/auto_swb_service.dart index f7efc994e..15b4b9f77 100644 --- a/lib/services/auto_swb_service.dart +++ b/lib/services/auto_swb_service.dart @@ -75,8 +75,7 @@ class AutoSWBService extends ChangeNotifier { createAutoBackupFilename(autoBackupDirectoryPath, now); final result = await SWB.encryptStackWalletWithADK( - fileToSave, adkString!, jsonString, - adkVersion: adkVersion); + fileToSave, adkString!, jsonString, adkVersion); if (!result) { throw Exception("stack auto backup service failed to create a backup"); From dbb5cc0d492bef1d7af0e8b1462c13f0de2205e9 Mon Sep 17 00:00:00 2001 From: ryleedavis Date: Tue, 24 Jan 2023 09:48:15 -0700 Subject: [PATCH 13/21] working fruit sorbet background --- assets/svg/fruitSorbet/bg.svg | 100 ++++++++++++++++++++++++++++++++-- 1 file changed, 94 insertions(+), 6 deletions(-) diff --git a/assets/svg/fruitSorbet/bg.svg b/assets/svg/fruitSorbet/bg.svg index c8dcb78ec..1c2942910 100644 --- a/assets/svg/fruitSorbet/bg.svg +++ b/assets/svg/fruitSorbet/bg.svg @@ -1,9 +1,97 @@ - + - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + + + + + + + + + + + + + + + + + + + From ecd5df1ca08bb6fc239a07926b919cbd4bb5de9f Mon Sep 17 00:00:00 2001 From: julian Date: Tue, 24 Jan 2023 11:13:20 -0600 Subject: [PATCH 14/21] update swb lib --- crypto_plugins/flutter_libmonero | 2 +- pubspec.lock | 4 ++-- pubspec.yaml | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/crypto_plugins/flutter_libmonero b/crypto_plugins/flutter_libmonero index f1031db5b..c1b403ccf 160000 --- a/crypto_plugins/flutter_libmonero +++ b/crypto_plugins/flutter_libmonero @@ -1 +1 @@ -Subproject commit f1031db5bb67b38d028187f0ead192acb3e9ba55 +Subproject commit c1b403ccf6f4fffc9f7c233038c3df40f997c2b3 diff --git a/pubspec.lock b/pubspec.lock index c6e2a2019..8364e6ec9 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -1408,8 +1408,8 @@ packages: dependency: "direct main" description: path: "." - ref: "011dc9ce3d29f5fdeeaf711d58b5122f055c146d" - resolved-ref: "011dc9ce3d29f5fdeeaf711d58b5122f055c146d" + ref: "6ada1204a4e0cf84d932b568e6150550478db69b" + resolved-ref: "6ada1204a4e0cf84d932b568e6150550478db69b" url: "https://github.com/cypherstack/stack_wallet_backup.git" source: git version: "0.0.1" diff --git a/pubspec.yaml b/pubspec.yaml index 70c99e14a..058021b9f 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -54,7 +54,7 @@ dependencies: stack_wallet_backup: git: url: https://github.com/cypherstack/stack_wallet_backup.git - ref: 011dc9ce3d29f5fdeeaf711d58b5122f055c146d + ref: 6ada1204a4e0cf84d932b568e6150550478db69b bip47: git: From a0bb793eff6c2ea04d6df9f885cc518e6d4302a4 Mon Sep 17 00:00:00 2001 From: julian Date: Tue, 24 Jan 2023 12:17:36 -0600 Subject: [PATCH 15/21] only pad on oceanBreeze theme --- lib/widgets/background.dart | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/lib/widgets/background.dart b/lib/widgets/background.dart index c966a5d98..353e3d138 100644 --- a/lib/widgets/background.dart +++ b/lib/widgets/background.dart @@ -17,6 +17,8 @@ class Background extends StatelessWidget { Widget build(BuildContext context) { Color? color; + bool shouldPad = false; + switch (Theme.of(context).extension()!.themeType) { case ThemeType.light: case ThemeType.dark: @@ -24,6 +26,9 @@ class Background extends StatelessWidget { color = Theme.of(context).extension()!.background; break; case ThemeType.oceanBreeze: + shouldPad = true; + color = null; + break; case ThemeType.fruitSorbet: color = null; break; @@ -43,10 +48,12 @@ class Background extends StatelessWidget { children: [ Positioned.fill( child: Padding( - padding: EdgeInsets.only( - top: MediaQuery.of(context).size.height * (1 / 8), - bottom: MediaQuery.of(context).size.height * (1 / 12), - ), + padding: shouldPad + ? EdgeInsets.only( + top: MediaQuery.of(context).size.height * (1 / 8), + bottom: MediaQuery.of(context).size.height * (1 / 12), + ) + : const EdgeInsets.all(0), child: SvgPicture.asset( bgAsset!, fit: BoxFit.fill, From b8be066acb38b24d86eafa57eae908d7d916b559 Mon Sep 17 00:00:00 2001 From: julian Date: Tue, 24 Jan 2023 12:42:41 -0600 Subject: [PATCH 16/21] add per theme box shadow and per theme homeview button bar shadow --- lib/pages/home_view/home_view.dart | 15 ++++++++++----- lib/utilities/theme/color_theme.dart | 3 +++ lib/utilities/theme/dark_colors.dart | 14 ++++++++++++++ lib/utilities/theme/fruit_sorbet_colors.dart | 10 ++++++++++ lib/utilities/theme/light_colors.dart | 14 ++++++++++++++ lib/utilities/theme/ocean_breeze_colors.dart | 14 ++++++++++++++ lib/utilities/theme/oled_black_colors.dart | 14 ++++++++++++++ lib/utilities/theme/stack_colors.dart | 20 ++++++++++++++------ 8 files changed, 93 insertions(+), 11 deletions(-) diff --git a/lib/pages/home_view/home_view.dart b/lib/pages/home_view/home_view.dart index 7d394d7ce..49317193e 100644 --- a/lib/pages/home_view/home_view.dart +++ b/lib/pages/home_view/home_view.dart @@ -275,11 +275,16 @@ class _HomeViewState extends ConsumerState { color: Theme.of(context) .extension()! .backgroundAppBar, - boxShadow: [ - Theme.of(context) - .extension()! - .standardBoxShadow, - ], + boxShadow: Theme.of(context) + .extension()! + .homeViewButtonBarBoxShadow != + null + ? [ + Theme.of(context) + .extension()! + .homeViewButtonBarBoxShadow!, + ] + : null, ), child: const Padding( padding: EdgeInsets.only( diff --git a/lib/utilities/theme/color_theme.dart b/lib/utilities/theme/color_theme.dart index d21b8a262..1d2772815 100644 --- a/lib/utilities/theme/color_theme.dart +++ b/lib/utilities/theme/color_theme.dart @@ -217,6 +217,9 @@ abstract class StackColorTheme { Color get myStackContactIconBG; Color get textConfirmTotalAmount; Color get textSelectedWordTableItem; + + BoxShadow get standardBoxShadow; + BoxShadow? get homeViewButtonBarBoxShadow; } class CoinThemeColor { diff --git a/lib/utilities/theme/dark_colors.dart b/lib/utilities/theme/dark_colors.dart index 9e3a625c1..b5938066c 100644 --- a/lib/utilities/theme/dark_colors.dart +++ b/lib/utilities/theme/dark_colors.dart @@ -314,4 +314,18 @@ class DarkColors extends StackColorTheme { Color get textConfirmTotalAmount => const Color(0xFF003921); @override Color get textSelectedWordTableItem => const Color(0xFF00297A); + + @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/lib/utilities/theme/fruit_sorbet_colors.dart b/lib/utilities/theme/fruit_sorbet_colors.dart index 0b6122723..6853c9bca 100644 --- a/lib/utilities/theme/fruit_sorbet_colors.dart +++ b/lib/utilities/theme/fruit_sorbet_colors.dart @@ -314,4 +314,14 @@ class FruitSorbetColors extends StackColorTheme { Color get textConfirmTotalAmount => const Color(0xFF232323); @override Color get textSelectedWordTableItem => const Color(0xFF232323); + + @override + BoxShadow get standardBoxShadow => BoxShadow( + color: shadow, + spreadRadius: 3, + blurRadius: 4, + ); + + @override + BoxShadow? get homeViewButtonBarBoxShadow => null; } diff --git a/lib/utilities/theme/light_colors.dart b/lib/utilities/theme/light_colors.dart index ef59ed622..57c02fc3c 100644 --- a/lib/utilities/theme/light_colors.dart +++ b/lib/utilities/theme/light_colors.dart @@ -314,4 +314,18 @@ class LightColors extends StackColorTheme { Color get textConfirmTotalAmount => const Color(0xFF232323); @override Color get textSelectedWordTableItem => const Color(0xFF232323); + + @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/lib/utilities/theme/ocean_breeze_colors.dart b/lib/utilities/theme/ocean_breeze_colors.dart index 8bc9dab52..4efa85d49 100644 --- a/lib/utilities/theme/ocean_breeze_colors.dart +++ b/lib/utilities/theme/ocean_breeze_colors.dart @@ -321,4 +321,18 @@ class OceanBreezeColors extends StackColorTheme { Color get textConfirmTotalAmount => const Color(0xFF232323); @override Color get textSelectedWordTableItem => const Color(0xFF232323); + + @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/lib/utilities/theme/oled_black_colors.dart b/lib/utilities/theme/oled_black_colors.dart index 5a878d7c6..e012f2c78 100644 --- a/lib/utilities/theme/oled_black_colors.dart +++ b/lib/utilities/theme/oled_black_colors.dart @@ -316,4 +316,18 @@ class OledBlackColors extends StackColorTheme { Color get textConfirmTotalAmount => const Color(0xFF144D35); @override Color get textSelectedWordTableItem => const Color(0xFF143D8E); + + @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/lib/utilities/theme/stack_colors.dart b/lib/utilities/theme/stack_colors.dart index b47e93128..9b0de36f5 100644 --- a/lib/utilities/theme/stack_colors.dart +++ b/lib/utilities/theme/stack_colors.dart @@ -176,6 +176,9 @@ class StackColors extends ThemeExtension { final Color textConfirmTotalAmount; final Color textSelectedWordTableItem; + final BoxShadow standardBoxShadow; + final BoxShadow? homeViewButtonBarBoxShadow; + StackColors({ required this.themeType, required this.background, @@ -312,6 +315,8 @@ class StackColors extends ThemeExtension { required this.myStackContactIconBG, required this.textConfirmTotalAmount, required this.textSelectedWordTableItem, + required this.standardBoxShadow, + required this.homeViewButtonBarBoxShadow, }); factory StackColors.fromStackColorTheme(StackColorTheme colorTheme) { @@ -453,6 +458,8 @@ class StackColors extends ThemeExtension { myStackContactIconBG: colorTheme.myStackContactIconBG, textConfirmTotalAmount: colorTheme.textConfirmTotalAmount, textSelectedWordTableItem: colorTheme.textSelectedWordTableItem, + homeViewButtonBarBoxShadow: colorTheme.homeViewButtonBarBoxShadow, + standardBoxShadow: colorTheme.standardBoxShadow, ); } @@ -593,6 +600,8 @@ class StackColors extends ThemeExtension { Color? myStackContactIconBG, Color? textConfirmTotalAmount, Color? textSelectedWordTableItem, + BoxShadow? homeViewButtonBarBoxShadow, + BoxShadow? standardBoxShadow, }) { return StackColors( themeType: themeType ?? this.themeType, @@ -768,6 +777,9 @@ class StackColors extends ThemeExtension { textConfirmTotalAmount ?? this.textConfirmTotalAmount, textSelectedWordTableItem: textSelectedWordTableItem ?? this.textSelectedWordTableItem, + homeViewButtonBarBoxShadow: + homeViewButtonBarBoxShadow ?? this.homeViewButtonBarBoxShadow, + standardBoxShadow: standardBoxShadow ?? this.standardBoxShadow, ); } @@ -783,6 +795,8 @@ class StackColors extends ThemeExtension { return StackColors( themeType: other.themeType, gradientBackground: other.gradientBackground, + homeViewButtonBarBoxShadow: other.homeViewButtonBarBoxShadow, + standardBoxShadow: other.standardBoxShadow, background: Color.lerp( background, other.background, @@ -1481,12 +1495,6 @@ class StackColors extends ThemeExtension { static const _coin = CoinThemeColor(); - BoxShadow get standardBoxShadow => BoxShadow( - color: shadow, - spreadRadius: 3, - blurRadius: 4, - ); - Color colorForStatus(String status) { switch (status) { case "New": From 94896ea19f019d88f62dae5d0de81bca6c961ee0 Mon Sep 17 00:00:00 2001 From: ryleedavis Date: Tue, 24 Jan 2023 11:48:07 -0700 Subject: [PATCH 17/21] notification icon + fruit theme added to main --- assets/svg/fruitSorbet/bell-new.svg | 8 ++++---- lib/main.dart | 6 +++++- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/assets/svg/fruitSorbet/bell-new.svg b/assets/svg/fruitSorbet/bell-new.svg index ffb3d630b..6131bc550 100644 --- a/assets/svg/fruitSorbet/bell-new.svg +++ b/assets/svg/fruitSorbet/bell-new.svg @@ -1,5 +1,5 @@ - - - - + + + + diff --git a/lib/main.dart b/lib/main.dart index ba6757259..b2f75705d 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -57,6 +57,7 @@ import 'package:stackwallet/utilities/logger.dart'; import 'package:stackwallet/utilities/stack_file_system.dart'; import 'package:stackwallet/utilities/theme/color_theme.dart'; import 'package:stackwallet/utilities/theme/dark_colors.dart'; +import 'package:stackwallet/utilities/theme/fruit_sorbet_colors.dart'; import 'package:stackwallet/utilities/theme/light_colors.dart'; import 'package:stackwallet/utilities/theme/ocean_breeze_colors.dart'; import 'package:stackwallet/utilities/theme/oled_black_colors.dart'; @@ -334,8 +335,11 @@ class _MaterialAppWithThemeState extends ConsumerState colorTheme = OceanBreezeColors(); break; case "light": - default: colorTheme = LightColors(); + break; + case "fruitSorbet": + default: + colorTheme = FruitSorbetColors(); } loadingCompleter = Completer(); WidgetsBinding.instance.addObserver(this); From 9c0992ffbf535ce1190111d67bfda6ad16b75241 Mon Sep 17 00:00:00 2001 From: julian Date: Tue, 24 Jan 2023 13:03:00 -0600 Subject: [PATCH 18/21] home view button bar secondary color --- lib/pages/home_view/sub_widgets/home_view_button_bar.dart | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/pages/home_view/sub_widgets/home_view_button_bar.dart b/lib/pages/home_view/sub_widgets/home_view_button_bar.dart index 83a445cbf..b995a9503 100644 --- a/lib/pages/home_view/sub_widgets/home_view_button_bar.dart +++ b/lib/pages/home_view/sub_widgets/home_view_button_bar.dart @@ -71,7 +71,9 @@ class _HomeViewButtonBarState extends ConsumerState { ? Theme.of(context) .extension()! .buttonTextPrimary - : Theme.of(context).extension()!.textDark, + : Theme.of(context) + .extension()! + .buttonTextSecondary, ), ), ), @@ -118,7 +120,9 @@ class _HomeViewButtonBarState extends ConsumerState { ? Theme.of(context) .extension()! .buttonTextPrimary - : Theme.of(context).extension()!.textDark, + : Theme.of(context) + .extension()! + .buttonTextSecondary, ), ), ), From 028b261deee429d1a6e4b28d73e353231186c5ac Mon Sep 17 00:00:00 2001 From: julian Date: Tue, 24 Jan 2023 13:29:12 -0600 Subject: [PATCH 19/21] refactor button style getter names --- .../sub_widgets/next_button.dart | 4 ++-- .../create_wallet_button_group.dart | 4 ++-- .../name_your_wallet_view.dart | 4 ++-- .../new_wallet_recovery_phrase_view.dart | 2 +- ...w_wallet_recovery_phrase_warning_view.dart | 4 ++-- .../restore_options_next_button.dart | 4 ++-- .../sub_widgets/restore_failed_dialog.dart | 2 +- .../sub_widgets/restore_succeeded_dialog.dart | 2 +- .../sub_widgets/restoring_dialog.dart | 2 +- .../verify_recovery_phrase_view.dart | 4 ++-- .../subviews/contact_details_view.dart | 6 +++--- .../subviews/contact_popup.dart | 2 +- .../confirm_change_now_send.dart | 2 +- .../exchange_view/edit_trade_note_view.dart | 2 +- lib/pages/exchange_view/exchange_form.dart | 5 ++--- .../exchange_loading_overlay.dart | 2 +- .../exchange_step_views/step_1_view.dart | 2 +- .../exchange_step_views/step_2_view.dart | 2 +- .../exchange_step_views/step_3_view.dart | 4 ++-- .../exchange_step_views/step_4_view.dart | 8 ++++---- lib/pages/exchange_view/send_from_view.dart | 2 +- .../exchange_view/trade_details_view.dart | 2 +- .../sub_widgets/home_view_button_bar.dart | 8 ++++---- lib/pages/intro_view.dart | 4 ++-- .../generate_receiving_uri_qr_code_view.dart | 2 +- lib/pages/receive_view/receive_view.dart | 2 +- .../send_view/confirm_transaction_view.dart | 2 +- lib/pages/send_view/send_view.dart | 10 +++++----- .../building_transaction_dialog.dart | 2 +- .../advanced_views/debug_view.dart | 4 ++-- .../delete_account_view.dart | 9 ++++----- .../add_edit_node_view.dart | 6 +++--- .../stack_backup_views/auto_backup_view.dart | 8 ++++---- .../create_auto_backup_view.dart | 4 ++-- .../create_backup_information_view.dart | 2 +- .../create_backup_view.dart | 4 ++-- .../dialogs/cancel_stack_restore_dialog.dart | 4 ++-- .../edit_auto_backup_view.dart | 4 ++-- .../restore_from_encrypted_string_view.dart | 4 ++-- .../restore_from_file_view.dart | 4 ++-- .../stack_restore_progress_view.dart | 2 +- .../wallet_backup_view.dart | 4 ++-- .../sub_widgets/confirm_full_rescan.dart | 4 ++-- .../wallet_network_settings_view.dart | 4 ++-- .../wallet_settings_view.dart | 2 +- .../delete_wallet_recovery_phrase_view.dart | 6 +++--- .../delete_wallet_warning_view.dart | 4 ++-- .../rename_wallet_view.dart | 2 +- .../wallet_settings_wallet_settings_view.dart | 4 ++-- .../transaction_views/edit_note_view.dart | 2 +- .../transaction_details_view.dart | 2 +- lib/pages/wallet_view/wallet_view.dart | 4 ++-- .../sub_widgets/empty_wallets.dart | 2 +- .../desktop_menu_item.dart | 4 ++-- .../exit_to_my_stack_button.dart | 2 +- .../password/create_password_view.dart | 4 ++-- .../backup_and_restore_settings.dart | 4 ++-- .../settings/settings_menu_item.dart | 4 ++-- lib/utilities/theme/stack_colors.dart | 20 +++++++++---------- lib/widgets/desktop/delete_button.dart | 4 ++-- lib/widgets/desktop/primary_button.dart | 4 ++-- lib/widgets/desktop/secondary_button.dart | 4 ++-- lib/widgets/node_options_sheet.dart | 6 +++--- lib/widgets/stack_dialog.dart | 2 +- 64 files changed, 126 insertions(+), 128 deletions(-) diff --git a/lib/pages/add_wallet_views/add_wallet_view/sub_widgets/next_button.dart b/lib/pages/add_wallet_views/add_wallet_view/sub_widgets/next_button.dart index 9cc91cb45..939f16a31 100644 --- a/lib/pages/add_wallet_views/add_wallet_view/sub_widgets/next_button.dart +++ b/lib/pages/add_wallet_views/add_wallet_view/sub_widgets/next_button.dart @@ -38,10 +38,10 @@ class AddWalletNextButton extends ConsumerWidget { style: enabled ? Theme.of(context) .extension()! - .getPrimaryEnabledButtonColor(context) + .getPrimaryEnabledButtonStyle(context) : Theme.of(context) .extension()! - .getPrimaryDisabledButtonColor(context), + .getPrimaryDisabledButtonStyle(context), child: Text( "Next", style: isDesktop diff --git a/lib/pages/add_wallet_views/create_or_restore_wallet_view/sub_widgets/create_wallet_button_group.dart b/lib/pages/add_wallet_views/create_or_restore_wallet_view/sub_widgets/create_wallet_button_group.dart index 4a7661892..fff984b59 100644 --- a/lib/pages/add_wallet_views/create_or_restore_wallet_view/sub_widgets/create_wallet_button_group.dart +++ b/lib/pages/add_wallet_views/create_or_restore_wallet_view/sub_widgets/create_wallet_button_group.dart @@ -30,7 +30,7 @@ class CreateWalletButtonGroup extends StatelessWidget { child: TextButton( style: Theme.of(context) .extension()! - .getPrimaryEnabledButtonColor(context), + .getPrimaryEnabledButtonStyle(context), onPressed: () { Navigator.of(context).pushNamed( NameYourWalletView.routeName, @@ -59,7 +59,7 @@ class CreateWalletButtonGroup extends StatelessWidget { child: TextButton( style: Theme.of(context) .extension()! - .getSecondaryEnabledButtonColor(context), + .getSecondaryEnabledButtonStyle(context), onPressed: () { Navigator.of(context).pushNamed( NameYourWalletView.routeName, diff --git a/lib/pages/add_wallet_views/name_your_wallet_view/name_your_wallet_view.dart b/lib/pages/add_wallet_views/name_your_wallet_view/name_your_wallet_view.dart index 71faf92e4..1718e554a 100644 --- a/lib/pages/add_wallet_views/name_your_wallet_view/name_your_wallet_view.dart +++ b/lib/pages/add_wallet_views/name_your_wallet_view/name_your_wallet_view.dart @@ -364,10 +364,10 @@ class _NameYourWalletViewState extends ConsumerState { style: _nextEnabled ? Theme.of(context) .extension()! - .getPrimaryEnabledButtonColor(context) + .getPrimaryEnabledButtonStyle(context) : Theme.of(context) .extension()! - .getPrimaryDisabledButtonColor(context), + .getPrimaryDisabledButtonStyle(context), child: Text( "Next", style: isDesktop diff --git a/lib/pages/add_wallet_views/new_wallet_recovery_phrase_view/new_wallet_recovery_phrase_view.dart b/lib/pages/add_wallet_views/new_wallet_recovery_phrase_view/new_wallet_recovery_phrase_view.dart index 6fca0774c..0b358753d 100644 --- a/lib/pages/add_wallet_views/new_wallet_recovery_phrase_view/new_wallet_recovery_phrase_view.dart +++ b/lib/pages/add_wallet_views/new_wallet_recovery_phrase_view/new_wallet_recovery_phrase_view.dart @@ -298,7 +298,7 @@ class _NewWalletRecoveryPhraseViewState }, style: Theme.of(context) .extension()! - .getPrimaryEnabledButtonColor(context), + .getPrimaryEnabledButtonStyle(context), child: Text( "I saved my recovery phrase", style: isDesktop diff --git a/lib/pages/add_wallet_views/new_wallet_recovery_phrase_warning_view/new_wallet_recovery_phrase_warning_view.dart b/lib/pages/add_wallet_views/new_wallet_recovery_phrase_warning_view/new_wallet_recovery_phrase_warning_view.dart index 97dc91361..262d882d4 100644 --- a/lib/pages/add_wallet_views/new_wallet_recovery_phrase_warning_view/new_wallet_recovery_phrase_warning_view.dart +++ b/lib/pages/add_wallet_views/new_wallet_recovery_phrase_warning_view/new_wallet_recovery_phrase_warning_view.dart @@ -512,10 +512,10 @@ class _NewWalletRecoveryPhraseWarningViewState style: ref.read(checkBoxStateProvider.state).state ? Theme.of(context) .extension()! - .getPrimaryEnabledButtonColor(context) + .getPrimaryEnabledButtonStyle(context) : Theme.of(context) .extension()! - .getPrimaryDisabledButtonColor(context), + .getPrimaryDisabledButtonStyle(context), child: Text( "View recovery phrase", style: isDesktop diff --git a/lib/pages/add_wallet_views/restore_wallet_view/restore_options_view/sub_widgets/restore_options_next_button.dart b/lib/pages/add_wallet_views/restore_wallet_view/restore_options_view/sub_widgets/restore_options_next_button.dart index 502502f94..4fe96a7e2 100644 --- a/lib/pages/add_wallet_views/restore_wallet_view/restore_options_view/sub_widgets/restore_options_next_button.dart +++ b/lib/pages/add_wallet_views/restore_wallet_view/restore_options_view/sub_widgets/restore_options_next_button.dart @@ -23,10 +23,10 @@ class RestoreOptionsNextButton extends StatelessWidget { style: onPressed != null ? Theme.of(context) .extension()! - .getPrimaryEnabledButtonColor(context) + .getPrimaryEnabledButtonStyle(context) : Theme.of(context) .extension()! - .getPrimaryDisabledButtonColor(context), + .getPrimaryDisabledButtonStyle(context), child: Text( "Next", style: STextStyles.button(context), diff --git a/lib/pages/add_wallet_views/restore_wallet_view/sub_widgets/restore_failed_dialog.dart b/lib/pages/add_wallet_views/restore_wallet_view/sub_widgets/restore_failed_dialog.dart index daf5cf1fc..b3cb957c3 100644 --- a/lib/pages/add_wallet_views/restore_wallet_view/sub_widgets/restore_failed_dialog.dart +++ b/lib/pages/add_wallet_views/restore_wallet_view/sub_widgets/restore_failed_dialog.dart @@ -47,7 +47,7 @@ class _RestoreFailedDialogState extends ConsumerState { rightButton: TextButton( style: Theme.of(context) .extension()! - .getSecondaryEnabledButtonColor(context), + .getSecondaryEnabledButtonStyle(context), child: Text( "Ok", style: STextStyles.itemSubtitle12(context), diff --git a/lib/pages/add_wallet_views/restore_wallet_view/sub_widgets/restore_succeeded_dialog.dart b/lib/pages/add_wallet_views/restore_wallet_view/sub_widgets/restore_succeeded_dialog.dart index 51bb8f2d7..a763b3501 100644 --- a/lib/pages/add_wallet_views/restore_wallet_view/sub_widgets/restore_succeeded_dialog.dart +++ b/lib/pages/add_wallet_views/restore_wallet_view/sub_widgets/restore_succeeded_dialog.dart @@ -80,7 +80,7 @@ class RestoreSucceededDialog extends StatelessWidget { rightButton: TextButton( style: Theme.of(context) .extension()! - .getSecondaryEnabledButtonColor(context), + .getSecondaryEnabledButtonStyle(context), child: Text( "Ok", style: STextStyles.itemSubtitle12(context), diff --git a/lib/pages/add_wallet_views/restore_wallet_view/sub_widgets/restoring_dialog.dart b/lib/pages/add_wallet_views/restore_wallet_view/sub_widgets/restoring_dialog.dart index 001fff6c0..e3630b922 100644 --- a/lib/pages/add_wallet_views/restore_wallet_view/sub_widgets/restoring_dialog.dart +++ b/lib/pages/add_wallet_views/restore_wallet_view/sub_widgets/restoring_dialog.dart @@ -139,7 +139,7 @@ class _RestoringDialogState extends State rightButton: TextButton( style: Theme.of(context) .extension()! - .getSecondaryEnabledButtonColor(context), + .getSecondaryEnabledButtonStyle(context), child: Text( "Cancel", style: STextStyles.itemSubtitle12(context), diff --git a/lib/pages/add_wallet_views/verify_recovery_phrase_view/verify_recovery_phrase_view.dart b/lib/pages/add_wallet_views/verify_recovery_phrase_view/verify_recovery_phrase_view.dart index 2c3c3af83..643783369 100644 --- a/lib/pages/add_wallet_views/verify_recovery_phrase_view/verify_recovery_phrase_view.dart +++ b/lib/pages/add_wallet_views/verify_recovery_phrase_view/verify_recovery_phrase_view.dart @@ -331,10 +331,10 @@ class _VerifyRecoveryPhraseViewState style: selectedWord.isNotEmpty ? Theme.of(context) .extension()! - .getPrimaryEnabledButtonColor(context) + .getPrimaryEnabledButtonStyle(context) : Theme.of(context) .extension()! - .getPrimaryDisabledButtonColor(context), + .getPrimaryDisabledButtonStyle(context), child: isDesktop ? Text( "Verify", diff --git a/lib/pages/address_book_views/subviews/contact_details_view.dart b/lib/pages/address_book_views/subviews/contact_details_view.dart index b95818a97..ff15420ca 100644 --- a/lib/pages/address_book_views/subviews/contact_details_view.dart +++ b/lib/pages/address_book_views/subviews/contact_details_view.dart @@ -177,7 +177,7 @@ class _ContactDetailsViewState extends ConsumerState { leftButton: TextButton( style: Theme.of(context) .extension()! - .getSecondaryEnabledButtonColor(context), + .getSecondaryEnabledButtonStyle(context), child: Text( "Cancel", style: STextStyles.itemSubtitle12(context), @@ -189,7 +189,7 @@ class _ContactDetailsViewState extends ConsumerState { rightButton: TextButton( style: Theme.of(context) .extension()! - .getPrimaryEnabledButtonColor(context), + .getPrimaryEnabledButtonStyle(context), child: Text( "Delete", style: STextStyles.button(context), @@ -273,7 +273,7 @@ class _ContactDetailsViewState extends ConsumerState { }, style: Theme.of(context) .extension()! - .getSecondaryEnabledButtonColor(context)! + .getSecondaryEnabledButtonStyle(context)! .copyWith( minimumSize: MaterialStateProperty.all( const Size(46, 32)), diff --git a/lib/pages/address_book_views/subviews/contact_popup.dart b/lib/pages/address_book_views/subviews/contact_popup.dart index 67ab32cda..e9dca9385 100644 --- a/lib/pages/address_book_views/subviews/contact_popup.dart +++ b/lib/pages/address_book_views/subviews/contact_popup.dart @@ -148,7 +148,7 @@ class ContactPopUp extends ConsumerWidget { }, style: Theme.of(context) .extension()! - .getSecondaryEnabledButtonColor( + .getSecondaryEnabledButtonStyle( context)! .copyWith( minimumSize: diff --git a/lib/pages/exchange_view/confirm_change_now_send.dart b/lib/pages/exchange_view/confirm_change_now_send.dart index 86599f2e5..2abe0d347 100644 --- a/lib/pages/exchange_view/confirm_change_now_send.dart +++ b/lib/pages/exchange_view/confirm_change_now_send.dart @@ -135,7 +135,7 @@ class _ConfirmChangeNowSendViewState rightButton: TextButton( style: Theme.of(context) .extension()! - .getSecondaryEnabledButtonColor(context), + .getSecondaryEnabledButtonStyle(context), child: Text( "Ok", style: STextStyles.button(context).copyWith( diff --git a/lib/pages/exchange_view/edit_trade_note_view.dart b/lib/pages/exchange_view/edit_trade_note_view.dart index 19804b7c5..85e6fad2b 100644 --- a/lib/pages/exchange_view/edit_trade_note_view.dart +++ b/lib/pages/exchange_view/edit_trade_note_view.dart @@ -136,7 +136,7 @@ class _EditNoteViewState extends ConsumerState { }, style: Theme.of(context) .extension()! - .getPrimaryEnabledButtonColor(context), + .getPrimaryEnabledButtonStyle(context), child: Text( "Save", style: STextStyles.button(context), diff --git a/lib/pages/exchange_view/exchange_form.dart b/lib/pages/exchange_view/exchange_form.dart index 0366b8da3..87acb68c7 100644 --- a/lib/pages/exchange_view/exchange_form.dart +++ b/lib/pages/exchange_view/exchange_form.dart @@ -144,7 +144,6 @@ class _ExchangeFormState extends ConsumerState { await Future.delayed(const Duration(milliseconds: 300)); Navigator.of(context, rootNavigator: true).pop(); - } else { final toTicker = ref.read(exchangeFormStateProvider).toTicker ?? ""; final fromTicker = ref.read(exchangeFormStateProvider).fromTicker ?? ""; @@ -1017,7 +1016,7 @@ class _ExchangeFormState extends ConsumerState { leftButton: TextButton( style: Theme.of(context) .extension()! - .getSecondaryEnabledButtonColor(context), + .getSecondaryEnabledButtonStyle(context), child: Text( "Cancel", style: STextStyles.itemSubtitle12(context), @@ -1030,7 +1029,7 @@ class _ExchangeFormState extends ConsumerState { rightButton: TextButton( style: Theme.of(context) .extension()! - .getPrimaryEnabledButtonColor(context), + .getPrimaryEnabledButtonStyle(context), child: Text( "Attempt", style: STextStyles.button(context), diff --git a/lib/pages/exchange_view/exchange_loading_overlay.dart b/lib/pages/exchange_view/exchange_loading_overlay.dart index 15d8dccec..383d5391c 100644 --- a/lib/pages/exchange_view/exchange_loading_overlay.dart +++ b/lib/pages/exchange_view/exchange_loading_overlay.dart @@ -91,7 +91,7 @@ class _ExchangeLoadingOverlayViewState rightButton: TextButton( style: Theme.of(context) .extension()! - .getSecondaryEnabledButtonColor(context), + .getSecondaryEnabledButtonStyle(context), child: Text( "OK", style: STextStyles.button(context).copyWith( diff --git a/lib/pages/exchange_view/exchange_step_views/step_1_view.dart b/lib/pages/exchange_view/exchange_step_views/step_1_view.dart index b51bccc55..8733be77c 100644 --- a/lib/pages/exchange_view/exchange_step_views/step_1_view.dart +++ b/lib/pages/exchange_view/exchange_step_views/step_1_view.dart @@ -188,7 +188,7 @@ class _Step1ViewState extends State { }, style: Theme.of(context) .extension()! - .getPrimaryEnabledButtonColor(context), + .getPrimaryEnabledButtonStyle(context), child: Text( "Next", style: STextStyles.button(context), diff --git a/lib/pages/exchange_view/exchange_step_views/step_2_view.dart b/lib/pages/exchange_view/exchange_step_views/step_2_view.dart index d943adcfa..238499c5f 100644 --- a/lib/pages/exchange_view/exchange_step_views/step_2_view.dart +++ b/lib/pages/exchange_view/exchange_step_views/step_2_view.dart @@ -698,7 +698,7 @@ class _Step2ViewState extends ConsumerState { }, style: Theme.of(context) .extension()! - .getSecondaryEnabledButtonColor(context), + .getSecondaryEnabledButtonStyle(context), child: Text( "Back", style: STextStyles.button(context).copyWith( diff --git a/lib/pages/exchange_view/exchange_step_views/step_3_view.dart b/lib/pages/exchange_view/exchange_step_views/step_3_view.dart index 467a3b9e7..650d238e6 100644 --- a/lib/pages/exchange_view/exchange_step_views/step_3_view.dart +++ b/lib/pages/exchange_view/exchange_step_views/step_3_view.dart @@ -208,7 +208,7 @@ class _Step3ViewState extends ConsumerState { }, style: Theme.of(context) .extension()! - .getSecondaryEnabledButtonColor(context), + .getSecondaryEnabledButtonStyle(context), child: Text( "Back", style: STextStyles.button(context).copyWith( @@ -322,7 +322,7 @@ class _Step3ViewState extends ConsumerState { }, style: Theme.of(context) .extension()! - .getPrimaryEnabledButtonColor(context), + .getPrimaryEnabledButtonStyle(context), child: Text( "Next", style: STextStyles.button(context), diff --git a/lib/pages/exchange_view/exchange_step_views/step_4_view.dart b/lib/pages/exchange_view/exchange_step_views/step_4_view.dart index 101ac637f..d5f1339d0 100644 --- a/lib/pages/exchange_view/exchange_step_views/step_4_view.dart +++ b/lib/pages/exchange_view/exchange_step_views/step_4_view.dart @@ -426,7 +426,7 @@ class _Step4ViewState extends ConsumerState { Navigator.of(context).pop(), style: Theme.of(context) .extension()! - .getSecondaryEnabledButtonColor( + .getSecondaryEnabledButtonStyle( context), child: Text( "Cancel", @@ -451,7 +451,7 @@ class _Step4ViewState extends ConsumerState { }, style: Theme.of(context) .extension()! - .getPrimaryEnabledButtonColor(context), + .getPrimaryEnabledButtonStyle(context), child: Text( "Show QR Code", style: STextStyles.button(context), @@ -578,7 +578,7 @@ class _Step4ViewState extends ConsumerState { style: Theme.of(context) .extension< StackColors>()! - .getSecondaryEnabledButtonColor( + .getSecondaryEnabledButtonStyle( context), child: Text( "Ok", @@ -628,7 +628,7 @@ class _Step4ViewState extends ConsumerState { }, style: Theme.of(context) .extension()! - .getSecondaryEnabledButtonColor(context), + .getSecondaryEnabledButtonStyle(context), child: Text( buttonTitle, style: STextStyles.button(context).copyWith( diff --git a/lib/pages/exchange_view/send_from_view.dart b/lib/pages/exchange_view/send_from_view.dart index a1e242eba..41df723da 100644 --- a/lib/pages/exchange_view/send_from_view.dart +++ b/lib/pages/exchange_view/send_from_view.dart @@ -338,7 +338,7 @@ class _SendFromCardState extends ConsumerState { rightButton: TextButton( style: Theme.of(context) .extension()! - .getSecondaryEnabledButtonColor(context), + .getSecondaryEnabledButtonStyle(context), child: Text( "Ok", style: STextStyles.button(context).copyWith( diff --git a/lib/pages/exchange_view/trade_details_view.dart b/lib/pages/exchange_view/trade_details_view.dart index b5f2bda6e..9d8a1d223 100644 --- a/lib/pages/exchange_view/trade_details_view.dart +++ b/lib/pages/exchange_view/trade_details_view.dart @@ -713,7 +713,7 @@ class _TradeDetailsViewState extends ConsumerState { }, style: Theme.of(context) .extension()! - .getSecondaryEnabledButtonColor( + .getSecondaryEnabledButtonStyle( context), child: Text( "Cancel", diff --git a/lib/pages/home_view/sub_widgets/home_view_button_bar.dart b/lib/pages/home_view/sub_widgets/home_view_button_bar.dart index b995a9503..79328a29e 100644 --- a/lib/pages/home_view/sub_widgets/home_view_button_bar.dart +++ b/lib/pages/home_view/sub_widgets/home_view_button_bar.dart @@ -45,14 +45,14 @@ class _HomeViewButtonBarState extends ConsumerState { style: selectedIndex == 0 ? Theme.of(context) .extension()! - .getPrimaryEnabledButtonColor(context)! + .getPrimaryEnabledButtonStyle(context)! .copyWith( minimumSize: MaterialStateProperty.all(const Size(46, 36)), ) : Theme.of(context) .extension()! - .getSecondaryEnabledButtonColor(context)! + .getSecondaryEnabledButtonStyle(context)! .copyWith( minimumSize: MaterialStateProperty.all(const Size(46, 36)), @@ -86,14 +86,14 @@ class _HomeViewButtonBarState extends ConsumerState { style: selectedIndex == 1 ? Theme.of(context) .extension()! - .getPrimaryEnabledButtonColor(context)! + .getPrimaryEnabledButtonStyle(context)! .copyWith( minimumSize: MaterialStateProperty.all(const Size(46, 36)), ) : Theme.of(context) .extension()! - .getSecondaryEnabledButtonColor(context)! + .getSecondaryEnabledButtonStyle(context)! .copyWith( minimumSize: MaterialStateProperty.all(const Size(46, 36)), diff --git a/lib/pages/intro_view.dart b/lib/pages/intro_view.dart index 9218c0610..b90eb0ab1 100644 --- a/lib/pages/intro_view.dart +++ b/lib/pages/intro_view.dart @@ -259,7 +259,7 @@ class GetStartedButton extends StatelessWidget { ? TextButton( style: Theme.of(context) .extension()! - .getPrimaryEnabledButtonColor(context), + .getPrimaryEnabledButtonStyle(context), onPressed: () { Prefs.instance.externalCalls = true; Navigator.of(context).pushNamed( @@ -278,7 +278,7 @@ class GetStartedButton extends StatelessWidget { child: TextButton( style: Theme.of(context) .extension()! - .getPrimaryEnabledButtonColor(context), + .getPrimaryEnabledButtonStyle(context), onPressed: () { Navigator.of(context).pushNamed( StackPrivacyCalls.routeName, diff --git a/lib/pages/receive_view/generate_receiving_uri_qr_code_view.dart b/lib/pages/receive_view/generate_receiving_uri_qr_code_view.dart index 3c61681f0..ca219b92e 100644 --- a/lib/pages/receive_view/generate_receiving_uri_qr_code_view.dart +++ b/lib/pages/receive_view/generate_receiving_uri_qr_code_view.dart @@ -225,7 +225,7 @@ class _GenerateUriQrCodeViewState extends State { }, style: Theme.of(context) .extension()! - .getSecondaryEnabledButtonColor(context), + .getSecondaryEnabledButtonStyle(context), child: Row( mainAxisAlignment: MainAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.center, diff --git a/lib/pages/receive_view/receive_view.dart b/lib/pages/receive_view/receive_view.dart index 1ba00f8ee..c43964779 100644 --- a/lib/pages/receive_view/receive_view.dart +++ b/lib/pages/receive_view/receive_view.dart @@ -206,7 +206,7 @@ class _ReceiveViewState extends ConsumerState { onPressed: generateNewAddress, style: Theme.of(context) .extension()! - .getSecondaryEnabledButtonColor(context), + .getSecondaryEnabledButtonStyle(context), child: Text( "Generate new address", style: STextStyles.button(context).copyWith( diff --git a/lib/pages/send_view/confirm_transaction_view.dart b/lib/pages/send_view/confirm_transaction_view.dart index 1164e0418..24bce86e5 100644 --- a/lib/pages/send_view/confirm_transaction_view.dart +++ b/lib/pages/send_view/confirm_transaction_view.dart @@ -196,7 +196,7 @@ class _ConfirmTransactionViewState rightButton: TextButton( style: Theme.of(context) .extension()! - .getSecondaryEnabledButtonColor(context), + .getSecondaryEnabledButtonStyle(context), child: Text( "Ok", style: STextStyles.button(context).copyWith( diff --git a/lib/pages/send_view/send_view.dart b/lib/pages/send_view/send_view.dart index 7f9c82423..f687ab9a6 100644 --- a/lib/pages/send_view/send_view.dart +++ b/lib/pages/send_view/send_view.dart @@ -1608,7 +1608,7 @@ class _SendViewState extends ConsumerState { leftButton: TextButton( style: Theme.of(context) .extension()! - .getSecondaryEnabledButtonColor( + .getSecondaryEnabledButtonStyle( context), child: Text( "Cancel", @@ -1628,7 +1628,7 @@ class _SendViewState extends ConsumerState { rightButton: TextButton( style: Theme.of(context) .extension()! - .getPrimaryEnabledButtonColor( + .getPrimaryEnabledButtonStyle( context), child: Text( "Yes", @@ -1738,7 +1738,7 @@ class _SendViewState extends ConsumerState { rightButton: TextButton( style: Theme.of(context) .extension()! - .getSecondaryEnabledButtonColor( + .getSecondaryEnabledButtonStyle( context), child: Text( "Ok", @@ -1767,10 +1767,10 @@ class _SendViewState extends ConsumerState { .state ? Theme.of(context) .extension()! - .getPrimaryEnabledButtonColor(context) + .getPrimaryEnabledButtonStyle(context) : Theme.of(context) .extension()! - .getPrimaryDisabledButtonColor(context), + .getPrimaryDisabledButtonStyle(context), child: Text( "Preview", style: STextStyles.button(context), diff --git a/lib/pages/send_view/sub_widgets/building_transaction_dialog.dart b/lib/pages/send_view/sub_widgets/building_transaction_dialog.dart index 1f6c95df6..6750e1b4c 100644 --- a/lib/pages/send_view/sub_widgets/building_transaction_dialog.dart +++ b/lib/pages/send_view/sub_widgets/building_transaction_dialog.dart @@ -107,7 +107,7 @@ class _RestoringDialogState extends State rightButton: TextButton( style: Theme.of(context) .extension()! - .getSecondaryEnabledButtonColor(context), + .getSecondaryEnabledButtonStyle(context), child: Text( "Cancel", style: STextStyles.itemSubtitle12(context), diff --git a/lib/pages/settings_views/global_settings_view/advanced_views/debug_view.dart b/lib/pages/settings_views/global_settings_view/advanced_views/debug_view.dart index 442ad5d2a..5c12fb1ad 100644 --- a/lib/pages/settings_views/global_settings_view/advanced_views/debug_view.dart +++ b/lib/pages/settings_views/global_settings_view/advanced_views/debug_view.dart @@ -144,7 +144,7 @@ class _DebugViewState extends ConsumerState { leftButton: TextButton( style: Theme.of(context) .extension()! - .getSecondaryEnabledButtonColor(context), + .getSecondaryEnabledButtonStyle(context), child: Text( "Cancel", style: STextStyles.itemSubtitle12(context), @@ -156,7 +156,7 @@ class _DebugViewState extends ConsumerState { rightButton: TextButton( style: Theme.of(context) .extension()! - .getPrimaryEnabledButtonColor(context), + .getPrimaryEnabledButtonStyle(context), child: Text( "Delete logs", style: STextStyles.button(context), diff --git a/lib/pages/settings_views/global_settings_view/delete_account_view.dart b/lib/pages/settings_views/global_settings_view/delete_account_view.dart index e9cc819dc..d69a0feac 100644 --- a/lib/pages/settings_views/global_settings_view/delete_account_view.dart +++ b/lib/pages/settings_views/global_settings_view/delete_account_view.dart @@ -1,16 +1,15 @@ import 'package:flutter/material.dart'; import 'package:stackwallet/pages/intro_view.dart'; +import 'package:stackwallet/utilities/delete_everything.dart'; import 'package:stackwallet/utilities/text_styles.dart'; +import 'package:stackwallet/utilities/theme/stack_colors.dart'; import 'package:stackwallet/utilities/util.dart'; import 'package:stackwallet/widgets/custom_buttons/app_bar_icon_button.dart'; import 'package:stackwallet/widgets/desktop/desktop_app_bar.dart'; import 'package:stackwallet/widgets/desktop/desktop_scaffold.dart'; import 'package:stackwallet/widgets/desktop/primary_button.dart'; import 'package:stackwallet/widgets/rounded_white_container.dart'; - import 'package:stackwallet/widgets/stack_dialog.dart'; -import 'package:stackwallet/utilities/delete_everything.dart'; -import 'package:stackwallet/utilities/theme/stack_colors.dart'; class DeleteAccountView extends StatefulWidget { const DeleteAccountView({Key? key}) : super(key: key); @@ -35,7 +34,7 @@ class _DeleteAccountViewState extends State { leftButton: TextButton( style: Theme.of(context) .extension()! - .getSecondaryEnabledButtonColor(context), + .getSecondaryEnabledButtonStyle(context), onPressed: () { Navigator.pop(context); }, @@ -50,7 +49,7 @@ class _DeleteAccountViewState extends State { rightButton: TextButton( style: Theme.of(context) .extension()! - .getPrimaryEnabledButtonColor(context), + .getPrimaryEnabledButtonStyle(context), onPressed: () async { await deleteEverything(); diff --git a/lib/pages/settings_views/global_settings_view/manage_nodes_views/add_edit_node_view.dart b/lib/pages/settings_views/global_settings_view/manage_nodes_views/add_edit_node_view.dart index 70e208ed5..7e308c61f 100644 --- a/lib/pages/settings_views/global_settings_view/manage_nodes_views/add_edit_node_view.dart +++ b/lib/pages/settings_views/global_settings_view/manage_nodes_views/add_edit_node_view.dart @@ -284,7 +284,7 @@ class _AddEditNodeViewState extends ConsumerState { }, style: Theme.of(context) .extension()! - .getPrimaryEnabledButtonColor(context), + .getPrimaryEnabledButtonStyle(context), child: Text( "Save", style: STextStyles.button(context), @@ -603,10 +603,10 @@ class _AddEditNodeViewState extends ConsumerState { style: saveEnabled ? Theme.of(context) .extension()! - .getPrimaryEnabledButtonColor(context) + .getPrimaryEnabledButtonStyle(context) : Theme.of(context) .extension()! - .getPrimaryDisabledButtonColor(context), + .getPrimaryDisabledButtonStyle(context), onPressed: saveEnabled ? attemptSave : null, child: Text( "Save", diff --git a/lib/pages/settings_views/global_settings_view/stack_backup_views/auto_backup_view.dart b/lib/pages/settings_views/global_settings_view/stack_backup_views/auto_backup_view.dart index 15b5a12fa..85fd9c1e9 100644 --- a/lib/pages/settings_views/global_settings_view/stack_backup_views/auto_backup_view.dart +++ b/lib/pages/settings_views/global_settings_view/stack_backup_views/auto_backup_view.dart @@ -85,7 +85,7 @@ class _AutoBackupViewState extends ConsumerState { leftButton: TextButton( style: Theme.of(context) .extension()! - .getSecondaryEnabledButtonColor(context), + .getSecondaryEnabledButtonStyle(context), child: Text( "Back", style: STextStyles.button(context).copyWith( @@ -100,7 +100,7 @@ class _AutoBackupViewState extends ConsumerState { rightButton: TextButton( style: Theme.of(context) .extension()! - .getPrimaryEnabledButtonColor(context), + .getPrimaryEnabledButtonStyle(context), child: Text( "Continue", style: STextStyles.button(context), @@ -142,7 +142,7 @@ class _AutoBackupViewState extends ConsumerState { leftButton: TextButton( style: Theme.of(context) .extension()! - .getSecondaryEnabledButtonColor(context), + .getSecondaryEnabledButtonStyle(context), child: Text( "Back", style: STextStyles.button(context).copyWith( @@ -157,7 +157,7 @@ class _AutoBackupViewState extends ConsumerState { rightButton: TextButton( style: Theme.of(context) .extension()! - .getPrimaryEnabledButtonColor(context), + .getPrimaryEnabledButtonStyle(context), child: Text( "Disable", style: STextStyles.button(context), diff --git a/lib/pages/settings_views/global_settings_view/stack_backup_views/create_auto_backup_view.dart b/lib/pages/settings_views/global_settings_view/stack_backup_views/create_auto_backup_view.dart index e95424cc0..a6103710f 100644 --- a/lib/pages/settings_views/global_settings_view/stack_backup_views/create_auto_backup_view.dart +++ b/lib/pages/settings_views/global_settings_view/stack_backup_views/create_auto_backup_view.dart @@ -483,10 +483,10 @@ class _EnableAutoBackupViewState extends ConsumerState { style: shouldEnableCreate ? Theme.of(context) .extension()! - .getPrimaryEnabledButtonColor(context) + .getPrimaryEnabledButtonStyle(context) : Theme.of(context) .extension()! - .getPrimaryDisabledButtonColor(context), + .getPrimaryDisabledButtonStyle(context), onPressed: !shouldEnableCreate ? null : () async { diff --git a/lib/pages/settings_views/global_settings_view/stack_backup_views/create_backup_information_view.dart b/lib/pages/settings_views/global_settings_view/stack_backup_views/create_backup_information_view.dart index 012477a5b..1b740c32b 100644 --- a/lib/pages/settings_views/global_settings_view/stack_backup_views/create_backup_information_view.dart +++ b/lib/pages/settings_views/global_settings_view/stack_backup_views/create_backup_information_view.dart @@ -67,7 +67,7 @@ class CreateBackupInfoView extends StatelessWidget { TextButton( style: Theme.of(context) .extension()! - .getPrimaryEnabledButtonColor(context), + .getPrimaryEnabledButtonStyle(context), onPressed: () { Navigator.of(context) .pushNamed(CreateBackupView.routeName); diff --git a/lib/pages/settings_views/global_settings_view/stack_backup_views/create_backup_view.dart b/lib/pages/settings_views/global_settings_view/stack_backup_views/create_backup_view.dart index 4d69ce4e9..b7cbf20a5 100644 --- a/lib/pages/settings_views/global_settings_view/stack_backup_views/create_backup_view.dart +++ b/lib/pages/settings_views/global_settings_view/stack_backup_views/create_backup_view.dart @@ -454,10 +454,10 @@ class _RestoreFromFileViewState extends State { style: shouldEnableCreate ? Theme.of(context) .extension()! - .getPrimaryEnabledButtonColor(context) + .getPrimaryEnabledButtonStyle(context) : Theme.of(context) .extension()! - .getPrimaryDisabledButtonColor(context), + .getPrimaryDisabledButtonStyle(context), onPressed: !shouldEnableCreate ? null : () async { diff --git a/lib/pages/settings_views/global_settings_view/stack_backup_views/dialogs/cancel_stack_restore_dialog.dart b/lib/pages/settings_views/global_settings_view/stack_backup_views/dialogs/cancel_stack_restore_dialog.dart index 905cdea72..62e15a82b 100644 --- a/lib/pages/settings_views/global_settings_view/stack_backup_views/dialogs/cancel_stack_restore_dialog.dart +++ b/lib/pages/settings_views/global_settings_view/stack_backup_views/dialogs/cancel_stack_restore_dialog.dart @@ -27,7 +27,7 @@ class CancelStackRestoreDialog extends StatelessWidget { leftButton: TextButton( style: Theme.of(context) .extension()! - .getSecondaryEnabledButtonColor(context), + .getSecondaryEnabledButtonStyle(context), child: Text( "Back", style: STextStyles.itemSubtitle12(context), @@ -39,7 +39,7 @@ class CancelStackRestoreDialog extends StatelessWidget { rightButton: TextButton( style: Theme.of(context) .extension()! - .getPrimaryEnabledButtonColor(context), + .getPrimaryEnabledButtonStyle(context), child: Text( "Yes, cancel", style: STextStyles.itemSubtitle12(context).copyWith( diff --git a/lib/pages/settings_views/global_settings_view/stack_backup_views/edit_auto_backup_view.dart b/lib/pages/settings_views/global_settings_view/stack_backup_views/edit_auto_backup_view.dart index 69fc4ca48..7a156e6ba 100644 --- a/lib/pages/settings_views/global_settings_view/stack_backup_views/edit_auto_backup_view.dart +++ b/lib/pages/settings_views/global_settings_view/stack_backup_views/edit_auto_backup_view.dart @@ -781,10 +781,10 @@ class _EditAutoBackupViewState extends ConsumerState { style: shouldEnableCreate ? Theme.of(context) .extension()! - .getPrimaryEnabledButtonColor(context) + .getPrimaryEnabledButtonStyle(context) : Theme.of(context) .extension()! - .getPrimaryDisabledButtonColor(context), + .getPrimaryDisabledButtonStyle(context), onPressed: !shouldEnableCreate ? null : onSavePressed, child: Text( "Save", diff --git a/lib/pages/settings_views/global_settings_view/stack_backup_views/restore_from_encrypted_string_view.dart b/lib/pages/settings_views/global_settings_view/stack_backup_views/restore_from_encrypted_string_view.dart index 14a262d99..f5a94ef19 100644 --- a/lib/pages/settings_views/global_settings_view/stack_backup_views/restore_from_encrypted_string_view.dart +++ b/lib/pages/settings_views/global_settings_view/stack_backup_views/restore_from_encrypted_string_view.dart @@ -158,10 +158,10 @@ class _RestoreFromEncryptedStringViewState style: passwordController.text.isEmpty ? Theme.of(context) .extension()! - .getPrimaryEnabledButtonColor(context) + .getPrimaryEnabledButtonStyle(context) : Theme.of(context) .extension()! - .getPrimaryDisabledButtonColor(context), + .getPrimaryDisabledButtonStyle(context), onPressed: passwordController.text.isEmpty ? null : () async { diff --git a/lib/pages/settings_views/global_settings_view/stack_backup_views/restore_from_file_view.dart b/lib/pages/settings_views/global_settings_view/stack_backup_views/restore_from_file_view.dart index 4b0d1e044..230904fd0 100644 --- a/lib/pages/settings_views/global_settings_view/stack_backup_views/restore_from_file_view.dart +++ b/lib/pages/settings_views/global_settings_view/stack_backup_views/restore_from_file_view.dart @@ -280,10 +280,10 @@ class _RestoreFromFileViewState extends ConsumerState { fileLocationController.text.isEmpty ? Theme.of(context) .extension()! - .getPrimaryDisabledButtonColor(context) + .getPrimaryDisabledButtonStyle(context) : Theme.of(context) .extension()! - .getPrimaryEnabledButtonColor(context), + .getPrimaryEnabledButtonStyle(context), onPressed: passwordController.text.isEmpty || fileLocationController.text.isEmpty ? null diff --git a/lib/pages/settings_views/global_settings_view/stack_backup_views/sub_views/stack_restore_progress_view.dart b/lib/pages/settings_views/global_settings_view/stack_backup_views/sub_views/stack_restore_progress_view.dart index 40a0b0f9f..5172144be 100644 --- a/lib/pages/settings_views/global_settings_view/stack_backup_views/sub_views/stack_restore_progress_view.dart +++ b/lib/pages/settings_views/global_settings_view/stack_backup_views/sub_views/stack_restore_progress_view.dart @@ -669,7 +669,7 @@ class _StackRestoreProgressViewState }, style: Theme.of(context) .extension()! - .getPrimaryEnabledButtonColor(context), + .getPrimaryEnabledButtonStyle(context), child: Text( _success ? "OK" : "Cancel restore process", style: STextStyles.button(context).copyWith( diff --git a/lib/pages/settings_views/wallet_settings_view/wallet_backup_views/wallet_backup_view.dart b/lib/pages/settings_views/wallet_settings_view/wallet_backup_views/wallet_backup_view.dart index a9235172f..33cf445b6 100644 --- a/lib/pages/settings_views/wallet_settings_view/wallet_backup_views/wallet_backup_view.dart +++ b/lib/pages/settings_views/wallet_settings_view/wallet_backup_views/wallet_backup_view.dart @@ -140,7 +140,7 @@ class WalletBackupView extends ConsumerWidget { TextButton( style: Theme.of(context) .extension()! - .getPrimaryEnabledButtonColor(context), + .getPrimaryEnabledButtonStyle(context), onPressed: () { String data = AddressUtils.encodeQRSeedData(mnemonic); @@ -194,7 +194,7 @@ class WalletBackupView extends ConsumerWidget { }, style: Theme.of(context) .extension()! - .getSecondaryEnabledButtonColor(context), + .getSecondaryEnabledButtonStyle(context), child: Text( "Cancel", style: STextStyles.button(context).copyWith( diff --git a/lib/pages/settings_views/wallet_settings_view/wallet_network_settings_view/sub_widgets/confirm_full_rescan.dart b/lib/pages/settings_views/wallet_settings_view/wallet_network_settings_view/sub_widgets/confirm_full_rescan.dart index 150af6ac5..009d1312b 100644 --- a/lib/pages/settings_views/wallet_settings_view/wallet_network_settings_view/sub_widgets/confirm_full_rescan.dart +++ b/lib/pages/settings_views/wallet_settings_view/wallet_network_settings_view/sub_widgets/confirm_full_rescan.dart @@ -96,7 +96,7 @@ class ConfirmFullRescanDialog extends StatelessWidget { leftButton: TextButton( style: Theme.of(context) .extension()! - .getSecondaryEnabledButtonColor(context), + .getSecondaryEnabledButtonStyle(context), child: Text( "Cancel", style: STextStyles.itemSubtitle12(context), @@ -108,7 +108,7 @@ class ConfirmFullRescanDialog extends StatelessWidget { rightButton: TextButton( style: Theme.of(context) .extension()! - .getPrimaryEnabledButtonColor(context), + .getPrimaryEnabledButtonStyle(context), child: Text( "Rescan", style: STextStyles.button(context), diff --git a/lib/pages/settings_views/wallet_settings_view/wallet_network_settings_view/wallet_network_settings_view.dart b/lib/pages/settings_views/wallet_settings_view/wallet_network_settings_view/wallet_network_settings_view.dart index 84cda95fc..cc552279c 100644 --- a/lib/pages/settings_views/wallet_settings_view/wallet_network_settings_view/wallet_network_settings_view.dart +++ b/lib/pages/settings_views/wallet_settings_view/wallet_network_settings_view/wallet_network_settings_view.dart @@ -126,7 +126,7 @@ class _WalletNetworkSettingsViewState rightButton: TextButton( style: Theme.of(context) .extension()! - .getSecondaryEnabledButtonColor(context), + .getSecondaryEnabledButtonStyle(context), child: Text( "Ok", style: STextStyles.itemSubtitle12(context), @@ -156,7 +156,7 @@ class _WalletNetworkSettingsViewState rightButton: TextButton( style: Theme.of(context) .extension()! - .getSecondaryEnabledButtonColor(context), + .getSecondaryEnabledButtonStyle(context), child: Text( "Ok", style: STextStyles.itemSubtitle12(context), diff --git a/lib/pages/settings_views/wallet_settings_view/wallet_settings_view.dart b/lib/pages/settings_views/wallet_settings_view/wallet_settings_view.dart index f27f57312..e96258f3f 100644 --- a/lib/pages/settings_views/wallet_settings_view/wallet_settings_view.dart +++ b/lib/pages/settings_views/wallet_settings_view/wallet_settings_view.dart @@ -306,7 +306,7 @@ class _WalletSettingsViewState extends State { }, style: Theme.of(context) .extension()! - .getSecondaryEnabledButtonColor(context), + .getSecondaryEnabledButtonStyle(context), child: Text( "Log out", style: STextStyles.button(context).copyWith( diff --git a/lib/pages/settings_views/wallet_settings_view/wallet_settings_wallet_settings/delete_wallet_recovery_phrase_view.dart b/lib/pages/settings_views/wallet_settings_view/wallet_settings_wallet_settings/delete_wallet_recovery_phrase_view.dart index 5543bf1c0..16602cc7e 100644 --- a/lib/pages/settings_views/wallet_settings_view/wallet_settings_wallet_settings/delete_wallet_recovery_phrase_view.dart +++ b/lib/pages/settings_views/wallet_settings_view/wallet_settings_wallet_settings/delete_wallet_recovery_phrase_view.dart @@ -156,7 +156,7 @@ class _DeleteWalletRecoveryPhraseViewState TextButton( style: Theme.of(context) .extension()! - .getPrimaryEnabledButtonColor(context), + .getPrimaryEnabledButtonStyle(context), onPressed: () { showDialog( barrierDismissible: true, @@ -166,7 +166,7 @@ class _DeleteWalletRecoveryPhraseViewState leftButton: TextButton( style: Theme.of(context) .extension()! - .getSecondaryEnabledButtonColor(context), + .getSecondaryEnabledButtonStyle(context), onPressed: () { Navigator.pop(context); }, @@ -181,7 +181,7 @@ class _DeleteWalletRecoveryPhraseViewState rightButton: TextButton( style: Theme.of(context) .extension()! - .getPrimaryEnabledButtonColor(context), + .getPrimaryEnabledButtonStyle(context), onPressed: () async { final walletId = _manager.walletId; final walletsInstance = diff --git a/lib/pages/settings_views/wallet_settings_view/wallet_settings_wallet_settings/delete_wallet_warning_view.dart b/lib/pages/settings_views/wallet_settings_view/wallet_settings_wallet_settings/delete_wallet_warning_view.dart index f953a975a..7cf07b061 100644 --- a/lib/pages/settings_views/wallet_settings_view/wallet_settings_wallet_settings/delete_wallet_warning_view.dart +++ b/lib/pages/settings_views/wallet_settings_view/wallet_settings_wallet_settings/delete_wallet_warning_view.dart @@ -69,7 +69,7 @@ class DeleteWalletWarningView extends ConsumerWidget { TextButton( style: Theme.of(context) .extension()! - .getSecondaryEnabledButtonColor(context), + .getSecondaryEnabledButtonStyle(context), onPressed: () { Navigator.pop(context); }, @@ -87,7 +87,7 @@ class DeleteWalletWarningView extends ConsumerWidget { TextButton( style: Theme.of(context) .extension()! - .getPrimaryEnabledButtonColor(context), + .getPrimaryEnabledButtonStyle(context), onPressed: () async { final manager = ref .read(walletsChangeNotifierProvider) diff --git a/lib/pages/settings_views/wallet_settings_view/wallet_settings_wallet_settings/rename_wallet_view.dart b/lib/pages/settings_views/wallet_settings_view/wallet_settings_wallet_settings/rename_wallet_view.dart index f76422750..3fb319211 100644 --- a/lib/pages/settings_views/wallet_settings_view/wallet_settings_wallet_settings/rename_wallet_view.dart +++ b/lib/pages/settings_views/wallet_settings_view/wallet_settings_wallet_settings/rename_wallet_view.dart @@ -114,7 +114,7 @@ class _RenameWalletViewState extends ConsumerState { TextButton( style: Theme.of(context) .extension()! - .getPrimaryEnabledButtonColor(context), + .getPrimaryEnabledButtonStyle(context), onPressed: () async { final newName = _controller.text; final success = await ref diff --git a/lib/pages/settings_views/wallet_settings_view/wallet_settings_wallet_settings/wallet_settings_wallet_settings_view.dart b/lib/pages/settings_views/wallet_settings_view/wallet_settings_wallet_settings/wallet_settings_wallet_settings_view.dart index a9c0f92af..d26bc9508 100644 --- a/lib/pages/settings_views/wallet_settings_view/wallet_settings_wallet_settings/wallet_settings_wallet_settings_view.dart +++ b/lib/pages/settings_views/wallet_settings_view/wallet_settings_wallet_settings/wallet_settings_wallet_settings_view.dart @@ -105,7 +105,7 @@ class WalletSettingsWalletSettingsView extends ConsumerWidget { leftButton: TextButton( style: Theme.of(context) .extension()! - .getSecondaryEnabledButtonColor(context), + .getSecondaryEnabledButtonStyle(context), onPressed: () { Navigator.pop(context); }, @@ -120,7 +120,7 @@ class WalletSettingsWalletSettingsView extends ConsumerWidget { rightButton: TextButton( style: Theme.of(context) .extension()! - .getPrimaryEnabledButtonColor(context), + .getPrimaryEnabledButtonStyle(context), onPressed: () { Navigator.pop(context); Navigator.push( diff --git a/lib/pages/wallet_view/transaction_views/edit_note_view.dart b/lib/pages/wallet_view/transaction_views/edit_note_view.dart index e8d7b05f9..c7b717337 100644 --- a/lib/pages/wallet_view/transaction_views/edit_note_view.dart +++ b/lib/pages/wallet_view/transaction_views/edit_note_view.dart @@ -204,7 +204,7 @@ class _EditNoteViewState extends ConsumerState { }, style: Theme.of(context) .extension()! - .getPrimaryEnabledButtonColor(context), + .getPrimaryEnabledButtonStyle(context), child: Text( "Save", style: STextStyles.button(context), diff --git a/lib/pages/wallet_view/transaction_views/transaction_details_view.dart b/lib/pages/wallet_view/transaction_views/transaction_details_view.dart index 4a2e9e758..f2755f547 100644 --- a/lib/pages/wallet_view/transaction_views/transaction_details_view.dart +++ b/lib/pages/wallet_view/transaction_views/transaction_details_view.dart @@ -202,7 +202,7 @@ class _TransactionDetailsViewState rightButton: TextButton( style: Theme.of(context) .extension()! - .getPrimaryEnabledButtonColor(context), + .getPrimaryEnabledButtonStyle(context), onPressed: () { Navigator.of(context).pop(true); }, diff --git a/lib/pages/wallet_view/wallet_view.dart b/lib/pages/wallet_view/wallet_view.dart index 6d44e226e..7416e349d 100644 --- a/lib/pages/wallet_view/wallet_view.dart +++ b/lib/pages/wallet_view/wallet_view.dart @@ -579,7 +579,7 @@ class _WalletViewState extends ConsumerState { child: TextButton( style: Theme.of(context) .extension()! - .getSecondaryEnabledButtonColor(context), + .getSecondaryEnabledButtonStyle(context), onPressed: () async { await showDialog( context: context, @@ -609,7 +609,7 @@ class _WalletViewState extends ConsumerState { }, style: Theme.of(context) .extension()! - .getPrimaryEnabledButtonColor( + .getPrimaryEnabledButtonStyle( context), child: Text( "Continue", diff --git a/lib/pages/wallets_view/sub_widgets/empty_wallets.dart b/lib/pages/wallets_view/sub_widgets/empty_wallets.dart index 8691b7d84..2ba548957 100644 --- a/lib/pages/wallets_view/sub_widgets/empty_wallets.dart +++ b/lib/pages/wallets_view/sub_widgets/empty_wallets.dart @@ -94,7 +94,7 @@ class AddWalletButton extends StatelessWidget { return TextButton( style: Theme.of(context) .extension()! - .getPrimaryEnabledButtonColor(context), + .getPrimaryEnabledButtonStyle(context), onPressed: () { if (isDesktop) { Navigator.of( diff --git a/lib/pages_desktop_specific/desktop_menu_item.dart b/lib/pages_desktop_specific/desktop_menu_item.dart index e75f3410f..804268797 100644 --- a/lib/pages_desktop_specific/desktop_menu_item.dart +++ b/lib/pages_desktop_specific/desktop_menu_item.dart @@ -262,10 +262,10 @@ class _DesktopMenuItemState extends ConsumerState> style: value == group ? Theme.of(context) .extension()! - .getDesktopMenuButtonColorSelected(context) + .getDesktopMenuButtonStyleSelected(context) : Theme.of(context) .extension()! - .getDesktopMenuButtonColor(context), + .getDesktopMenuButtonStyle(context), onPressed: () { onChanged(value); }, diff --git a/lib/pages_desktop_specific/my_stack_view/exit_to_my_stack_button.dart b/lib/pages_desktop_specific/my_stack_view/exit_to_my_stack_button.dart index d09bc6310..250bd7299 100644 --- a/lib/pages_desktop_specific/my_stack_view/exit_to_my_stack_button.dart +++ b/lib/pages_desktop_specific/my_stack_view/exit_to_my_stack_button.dart @@ -22,7 +22,7 @@ class ExitToMyStackButton extends StatelessWidget { child: TextButton( style: Theme.of(context) .extension()! - .getSmallSecondaryEnabledButtonColor(context), + .getSmallSecondaryEnabledButtonStyle(context), onPressed: onPressed ?? () { Navigator.of(context).popUntil( diff --git a/lib/pages_desktop_specific/password/create_password_view.dart b/lib/pages_desktop_specific/password/create_password_view.dart index 2f440ec92..ded1f1e30 100644 --- a/lib/pages_desktop_specific/password/create_password_view.dart +++ b/lib/pages_desktop_specific/password/create_password_view.dart @@ -425,10 +425,10 @@ class _CreatePasswordViewState extends ConsumerState { style: nextEnabled ? Theme.of(context) .extension()! - .getPrimaryEnabledButtonColor(context) + .getPrimaryEnabledButtonStyle(context) : Theme.of(context) .extension()! - .getPrimaryDisabledButtonColor(context), + .getPrimaryDisabledButtonStyle(context), onPressed: nextEnabled ? onNextPressed : null, child: Text( "Next", diff --git a/lib/pages_desktop_specific/settings/settings_menu/backup_and_restore/backup_and_restore_settings.dart b/lib/pages_desktop_specific/settings/settings_menu/backup_and_restore/backup_and_restore_settings.dart index de9a68418..37b40b004 100644 --- a/lib/pages_desktop_specific/settings/settings_menu/backup_and_restore/backup_and_restore_settings.dart +++ b/lib/pages_desktop_specific/settings/settings_menu/backup_and_restore/backup_and_restore_settings.dart @@ -159,7 +159,7 @@ class _BackupRestoreSettings extends ConsumerState { leftButton: TextButton( style: Theme.of(context) .extension()! - .getSecondaryEnabledButtonColor(context), + .getSecondaryEnabledButtonStyle(context), child: Text( "Back", style: STextStyles.button(context).copyWith( @@ -175,7 +175,7 @@ class _BackupRestoreSettings extends ConsumerState { rightButton: TextButton( style: Theme.of(context) .extension()! - .getPrimaryEnabledButtonColor(context), + .getPrimaryEnabledButtonStyle(context), child: Text( "Disable", style: STextStyles.button(context), diff --git a/lib/pages_desktop_specific/settings/settings_menu_item.dart b/lib/pages_desktop_specific/settings/settings_menu_item.dart index 28ddffb50..59cc7b62c 100644 --- a/lib/pages_desktop_specific/settings/settings_menu_item.dart +++ b/lib/pages_desktop_specific/settings/settings_menu_item.dart @@ -25,10 +25,10 @@ class SettingsMenuItem extends StatelessWidget { style: value == group ? Theme.of(context) .extension()! - .getDesktopSettingsButtonColor(context) + .getDesktopSettingsButtonStyle(context) : Theme.of(context) .extension()! - .getDesktopSettingsButtonColor(context), + .getDesktopSettingsButtonStyle(context), onPressed: () { onChanged(value); }, diff --git a/lib/utilities/theme/stack_colors.dart b/lib/utilities/theme/stack_colors.dart index 9b0de36f5..06acdbe7b 100644 --- a/lib/utilities/theme/stack_colors.dart +++ b/lib/utilities/theme/stack_colors.dart @@ -1526,70 +1526,70 @@ class StackColors extends ThemeExtension { } } - ButtonStyle? getDeleteEnabledButtonColor(BuildContext context) => + ButtonStyle? getDeleteEnabledButtonStyle(BuildContext context) => Theme.of(context).textButtonTheme.style?.copyWith( backgroundColor: MaterialStateProperty.all( textFieldErrorBG, ), ); - ButtonStyle? getDeleteDisabledButtonColor(BuildContext context) => + ButtonStyle? getDeleteDisabledButtonStyle(BuildContext context) => Theme.of(context).textButtonTheme.style?.copyWith( backgroundColor: MaterialStateProperty.all( buttonBackSecondaryDisabled, ), ); - ButtonStyle? getPrimaryEnabledButtonColor(BuildContext context) => + ButtonStyle? getPrimaryEnabledButtonStyle(BuildContext context) => Theme.of(context).textButtonTheme.style?.copyWith( backgroundColor: MaterialStateProperty.all( buttonBackPrimary, ), ); - ButtonStyle? getPrimaryDisabledButtonColor(BuildContext context) => + ButtonStyle? getPrimaryDisabledButtonStyle(BuildContext context) => Theme.of(context).textButtonTheme.style?.copyWith( backgroundColor: MaterialStateProperty.all( buttonBackPrimaryDisabled, ), ); - ButtonStyle? getSecondaryEnabledButtonColor(BuildContext context) => + ButtonStyle? getSecondaryEnabledButtonStyle(BuildContext context) => Theme.of(context).textButtonTheme.style?.copyWith( backgroundColor: MaterialStateProperty.all( buttonBackSecondary, ), ); - ButtonStyle? getSecondaryDisabledButtonColor(BuildContext context) => + ButtonStyle? getSecondaryDisabledButtonStyle(BuildContext context) => Theme.of(context).textButtonTheme.style?.copyWith( backgroundColor: MaterialStateProperty.all( buttonBackSecondaryDisabled, ), ); - ButtonStyle? getSmallSecondaryEnabledButtonColor(BuildContext context) => + ButtonStyle? getSmallSecondaryEnabledButtonStyle(BuildContext context) => Theme.of(context).textButtonTheme.style?.copyWith( backgroundColor: MaterialStateProperty.all( textFieldDefaultBG, ), ); - ButtonStyle? getDesktopMenuButtonColor(BuildContext context) => + ButtonStyle? getDesktopMenuButtonStyle(BuildContext context) => Theme.of(context).textButtonTheme.style?.copyWith( backgroundColor: MaterialStateProperty.all( popupBG, ), ); - ButtonStyle? getDesktopMenuButtonColorSelected(BuildContext context) => + ButtonStyle? getDesktopMenuButtonStyleSelected(BuildContext context) => Theme.of(context).textButtonTheme.style?.copyWith( backgroundColor: MaterialStateProperty.all( textFieldDefaultBG, ), ); - ButtonStyle? getDesktopSettingsButtonColor(BuildContext context) => + ButtonStyle? getDesktopSettingsButtonStyle(BuildContext context) => Theme.of(context).textButtonTheme.style?.copyWith( backgroundColor: MaterialStateProperty.all( background, diff --git a/lib/widgets/desktop/delete_button.dart b/lib/widgets/desktop/delete_button.dart index e64c85f34..cb255ebd2 100644 --- a/lib/widgets/desktop/delete_button.dart +++ b/lib/widgets/desktop/delete_button.dart @@ -64,10 +64,10 @@ class DeleteButton extends StatelessWidget { style: enabled ? Theme.of(context) .extension()! - .getDeleteEnabledButtonColor(context) + .getDeleteEnabledButtonStyle(context) : Theme.of(context) .extension()! - .getDeleteDisabledButtonColor(context), + .getDeleteDisabledButtonStyle(context), child: Row( mainAxisAlignment: MainAxisAlignment.center, children: [ diff --git a/lib/widgets/desktop/primary_button.dart b/lib/widgets/desktop/primary_button.dart index a4fb4c35c..a275bd570 100644 --- a/lib/widgets/desktop/primary_button.dart +++ b/lib/widgets/desktop/primary_button.dart @@ -136,10 +136,10 @@ class PrimaryButton extends StatelessWidget { style: enabled ? Theme.of(context) .extension()! - .getPrimaryEnabledButtonColor(context) + .getPrimaryEnabledButtonStyle(context) : Theme.of(context) .extension()! - .getPrimaryDisabledButtonColor(context), + .getPrimaryDisabledButtonStyle(context), child: Row( mainAxisAlignment: MainAxisAlignment.center, children: [ diff --git a/lib/widgets/desktop/secondary_button.dart b/lib/widgets/desktop/secondary_button.dart index 244ee356a..6dba6fdd8 100644 --- a/lib/widgets/desktop/secondary_button.dart +++ b/lib/widgets/desktop/secondary_button.dart @@ -139,10 +139,10 @@ class SecondaryButton extends StatelessWidget { style: enabled ? Theme.of(context) .extension()! - .getSecondaryEnabledButtonColor(context) + .getSecondaryEnabledButtonStyle(context) : Theme.of(context) .extension()! - .getSecondaryDisabledButtonColor(context), + .getSecondaryDisabledButtonStyle(context), child: Row( mainAxisAlignment: MainAxisAlignment.center, children: [ diff --git a/lib/widgets/node_options_sheet.dart b/lib/widgets/node_options_sheet.dart index 80ce2f5be..7542a42a6 100644 --- a/lib/widgets/node_options_sheet.dart +++ b/lib/widgets/node_options_sheet.dart @@ -307,7 +307,7 @@ class NodeOptionsSheet extends ConsumerWidget { child: TextButton( style: Theme.of(context) .extension()! - .getSecondaryEnabledButtonColor(context), + .getSecondaryEnabledButtonStyle(context), onPressed: () { Navigator.pop(context); Navigator.of(context).pushNamed( @@ -337,10 +337,10 @@ class NodeOptionsSheet extends ConsumerWidget { style: status == "Connected" ? Theme.of(context) .extension()! - .getPrimaryDisabledButtonColor(context) + .getPrimaryDisabledButtonStyle(context) : Theme.of(context) .extension()! - .getPrimaryEnabledButtonColor(context), + .getPrimaryEnabledButtonStyle(context), onPressed: status == "Connected" ? null : () async { diff --git a/lib/widgets/stack_dialog.dart b/lib/widgets/stack_dialog.dart index ea2638264..f9b156831 100644 --- a/lib/widgets/stack_dialog.dart +++ b/lib/widgets/stack_dialog.dart @@ -193,7 +193,7 @@ class StackOkDialog extends StatelessWidget { }, style: Theme.of(context) .extension()! - .getPrimaryEnabledButtonColor(context), + .getPrimaryEnabledButtonStyle(context), child: Text( "Ok", style: STextStyles.button(context), From 914e0e9034cb29a913361790e14c8b73263ef425 Mon Sep 17 00:00:00 2001 From: ryleedavis Date: Tue, 24 Jan 2023 12:29:14 -0700 Subject: [PATCH 20/21] buttonBackBorderSecondary + disabled colors added --- lib/utilities/theme/color_theme.dart | 2 ++ lib/utilities/theme/dark_colors.dart | 4 ++++ lib/utilities/theme/fruit_sorbet_colors.dart | 4 ++++ lib/utilities/theme/light_colors.dart | 4 ++++ lib/utilities/theme/ocean_breeze_colors.dart | 4 ++++ lib/utilities/theme/oled_black_colors.dart | 4 ++++ lib/utilities/theme/stack_colors.dart | 23 ++++++++++++++++++++ 7 files changed, 45 insertions(+) diff --git a/lib/utilities/theme/color_theme.dart b/lib/utilities/theme/color_theme.dart index 1d2772815..2eea34806 100644 --- a/lib/utilities/theme/color_theme.dart +++ b/lib/utilities/theme/color_theme.dart @@ -82,6 +82,8 @@ abstract class StackColorTheme { Color get buttonBackSecondaryDisabled; Color get buttonBackBorder; Color get buttonBackBorderDisabled; + Color get buttonBackBorderSecondary; + Color get buttonBackBorderSecondaryDisabled; Color get numberBackDefault; Color get numpadBackDefault; Color get bottomNavBack; diff --git a/lib/utilities/theme/dark_colors.dart b/lib/utilities/theme/dark_colors.dart index b5938066c..298d8c86d 100644 --- a/lib/utilities/theme/dark_colors.dart +++ b/lib/utilities/theme/dark_colors.dart @@ -71,6 +71,10 @@ class DarkColors extends StackColorTheme { Color get buttonBackBorder => const Color(0xFF4C86E9); @override Color get buttonBackBorderDisabled => const Color(0xFF314265); + @override + Color get buttonBackBorderSecondary => buttonBackSecondary; + @override + Color get buttonBackBorderSecondaryDisabled => buttonBackSecondaryDisabled; @override Color get numberBackDefault => const Color(0xFF484B51); diff --git a/lib/utilities/theme/fruit_sorbet_colors.dart b/lib/utilities/theme/fruit_sorbet_colors.dart index 6853c9bca..12ae33e7b 100644 --- a/lib/utilities/theme/fruit_sorbet_colors.dart +++ b/lib/utilities/theme/fruit_sorbet_colors.dart @@ -71,6 +71,10 @@ class FruitSorbetColors extends StackColorTheme { Color get buttonBackBorder => const Color(0xFFF95369); @override Color get buttonBackBorderDisabled => const Color(0xFFFCA7B3); + @override + Color get buttonBackBorderSecondary => buttonBackBorder; + @override + Color get buttonBackBorderSecondaryDisabled => buttonBackSecondaryDisabled; @override Color get numberBackDefault => const Color(0xFFFFF8EE); diff --git a/lib/utilities/theme/light_colors.dart b/lib/utilities/theme/light_colors.dart index 57c02fc3c..fc825747c 100644 --- a/lib/utilities/theme/light_colors.dart +++ b/lib/utilities/theme/light_colors.dart @@ -71,6 +71,10 @@ class LightColors extends StackColorTheme { Color get buttonBackBorder => const Color(0xFF232323); @override Color get buttonBackBorderDisabled => const Color(0xFFB6B6B6); + @override + Color get buttonBackBorderSecondary => buttonBackSecondary; + @override + Color get buttonBackBorderSecondaryDisabled => buttonBackSecondaryDisabled; @override Color get numberBackDefault => const Color(0xFFFFFFFF); diff --git a/lib/utilities/theme/ocean_breeze_colors.dart b/lib/utilities/theme/ocean_breeze_colors.dart index 4efa85d49..e907fd2cf 100644 --- a/lib/utilities/theme/ocean_breeze_colors.dart +++ b/lib/utilities/theme/ocean_breeze_colors.dart @@ -78,6 +78,10 @@ class OceanBreezeColors extends StackColorTheme { Color get buttonBackBorder => const Color(0xFF227386); @override Color get buttonBackBorderDisabled => const Color(0xFFBDD5DB); + @override + Color get buttonBackBorderSecondary => buttonBackSecondary; + @override + Color get buttonBackBorderSecondaryDisabled => buttonBackSecondaryDisabled; @override Color get numberBackDefault => const Color(0xFFFFFFFF); diff --git a/lib/utilities/theme/oled_black_colors.dart b/lib/utilities/theme/oled_black_colors.dart index e012f2c78..1d9f2c61f 100644 --- a/lib/utilities/theme/oled_black_colors.dart +++ b/lib/utilities/theme/oled_black_colors.dart @@ -72,6 +72,10 @@ class OledBlackColors extends StackColorTheme { Color get buttonBackBorder => const Color(0xFF6F9CE9); @override Color get buttonBackBorderDisabled => const Color(0xFF212F46); + @override + Color get buttonBackBorderSecondary => buttonBackSecondary; + @override + Color get buttonBackBorderSecondaryDisabled => buttonBackSecondaryDisabled; @override Color get numberBackDefault => const Color(0xFF242424); diff --git a/lib/utilities/theme/stack_colors.dart b/lib/utilities/theme/stack_colors.dart index 9b0de36f5..458672827 100644 --- a/lib/utilities/theme/stack_colors.dart +++ b/lib/utilities/theme/stack_colors.dart @@ -41,6 +41,8 @@ class StackColors extends ThemeExtension { final Color buttonBackSecondaryDisabled; final Color buttonBackBorder; final Color buttonBackBorderDisabled; + final Color buttonBackBorderSecondary; + final Color buttonBackBorderSecondaryDisabled; final Color numberBackDefault; final Color numpadBackDefault; final Color bottomNavBack; @@ -211,6 +213,8 @@ class StackColors extends ThemeExtension { required this.buttonBackSecondaryDisabled, required this.buttonBackBorder, required this.buttonBackBorderDisabled, + required this.buttonBackBorderSecondary, + required this.buttonBackBorderSecondaryDisabled, required this.numberBackDefault, required this.numpadBackDefault, required this.bottomNavBack, @@ -352,6 +356,9 @@ class StackColors extends ThemeExtension { buttonBackSecondaryDisabled: colorTheme.buttonBackSecondaryDisabled, buttonBackBorder: colorTheme.buttonBackBorder, buttonBackBorderDisabled: colorTheme.buttonBackBorderDisabled, + buttonBackBorderSecondary: colorTheme.buttonBackBorderSecondary, + buttonBackBorderSecondaryDisabled: + colorTheme.buttonBackBorderSecondaryDisabled, numberBackDefault: colorTheme.numberBackDefault, numpadBackDefault: colorTheme.numpadBackDefault, bottomNavBack: colorTheme.bottomNavBack, @@ -496,6 +503,8 @@ class StackColors extends ThemeExtension { Color? buttonBackSecondaryDisabled, Color? buttonBackBorder, Color? buttonBackBorderDisabled, + Color? buttonBackBorderSecondary, + Color? buttonBackBorderSecondaryDisabled, Color? numberBackDefault, Color? numpadBackDefault, Color? bottomNavBack, @@ -638,6 +647,10 @@ class StackColors extends ThemeExtension { buttonBackBorder: buttonBackBorder ?? this.buttonBackBorder, buttonBackBorderDisabled: buttonBackBorderDisabled ?? this.buttonBackBorderDisabled, + buttonBackBorderSecondary: + buttonBackBorderSecondary ?? this.buttonBackBorderSecondary, + buttonBackBorderSecondaryDisabled: buttonBackBorderSecondaryDisabled ?? + this.buttonBackBorderSecondaryDisabled, numberBackDefault: numberBackDefault ?? this.numberBackDefault, numpadBackDefault: numpadBackDefault ?? this.numpadBackDefault, bottomNavBack: bottomNavBack ?? this.bottomNavBack, @@ -942,6 +955,16 @@ class StackColors extends ThemeExtension { other.buttonBackBorderDisabled, t, )!, + buttonBackBorderSecondary: Color.lerp( + buttonBackBorderSecondary, + other.buttonBackBorderSecondary, + t, + )!, + buttonBackBorderSecondaryDisabled: Color.lerp( + buttonBackBorderSecondaryDisabled, + other.buttonBackBorderSecondaryDisabled, + t, + )!, numberBackDefault: Color.lerp( numberBackDefault, other.numberBackDefault, From aced68aa3208ea395c56418ba44d0f9266ca915a Mon Sep 17 00:00:00 2001 From: julian Date: Tue, 24 Jan 2023 13:30:00 -0600 Subject: [PATCH 21/21] add border to secondary buttons based on theme --- lib/utilities/theme/stack_colors.dart | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/lib/utilities/theme/stack_colors.dart b/lib/utilities/theme/stack_colors.dart index 06acdbe7b..5175bef91 100644 --- a/lib/utilities/theme/stack_colors.dart +++ b/lib/utilities/theme/stack_colors.dart @@ -1559,6 +1559,15 @@ class StackColors extends ThemeExtension { backgroundColor: MaterialStateProperty.all( buttonBackSecondary, ), + shape: MaterialStateProperty.all( + RoundedRectangleBorder( + side: BorderSide( + color: buttonBackBorder, + width: 1, + ), + borderRadius: BorderRadius.circular(10000), + ), + ), ); ButtonStyle? getSecondaryDisabledButtonStyle(BuildContext context) => @@ -1566,6 +1575,15 @@ class StackColors extends ThemeExtension { backgroundColor: MaterialStateProperty.all( buttonBackSecondaryDisabled, ), + shape: MaterialStateProperty.all( + RoundedRectangleBorder( + side: BorderSide( + color: buttonBackBorder, + width: 1, + ), + borderRadius: BorderRadius.circular(10000), + ), + ), ); ButtonStyle? getSmallSecondaryEnabledButtonStyle(BuildContext context) => @@ -1573,6 +1591,15 @@ class StackColors extends ThemeExtension { backgroundColor: MaterialStateProperty.all( textFieldDefaultBG, ), + shape: MaterialStateProperty.all( + RoundedRectangleBorder( + side: BorderSide( + color: buttonBackBorder, + width: 1, + ), + borderRadius: BorderRadius.circular(10000), + ), + ), ); ButtonStyle? getDesktopMenuButtonStyle(BuildContext context) =>