UI updates (#2368)

* Add Black theme * Fix black theme * Add WixMadefor Font * feat: Enhance theme setup This change: - Adds support for custom themes - Updates theme retrieval logic to ensure the right theme is used based on user preferences(especially for custom themes). * Add black custom colors * Add custom accent colors * feat: Restructure custom colors handling for themes * feat: Integrate new custom colors structure across various components - WIP * feat: Integrate new custom colors structure across various components, black theme now ready for tests * feat: Add new accent color themes and update theme selection UI - Enhanced theme selection UI in display settings to support accent color choices. - Updated theme handling logic to accommodate new accent color variants. * Minor updates to display_settings_page.dart * Update settings_theme_choice.dart * Revert accidental change in display_settings_page.dart * Revert WixMadeFor font, fix SVG colors for CakeImageWidget, and test some color changes * Update Monero Orange * fix: Remove unused custom colors * Test outline * Test spacing and colors * Add padding * Remove outline * Add other accent colors * Update display_settings_view_model.dart * Update names and fix switch case * Add outline and update dark_theme.dart colors * Add gradient to option_tile.dart * Update icons * Update some colors * Switch option_tile.dart to TextButton * Add updated icons * Fix icon resolution * Cleanup old icons + Update pubspec_base.yaml * Remove unused fonts * Update more icons * Update image paths * Remove more icons + update some component colors * Add back DAI icon * Fix errors * feat: Implement OLED mode for BlackTheme * feat: Add OLED mode for BlackTheme and localizations * feat: Implement OLED mode for Black Theme * refactor: Remove unused theme parameters and set up easy access to toggleKnob custom colors * fix: Cleanup UI and overflows * feat: Persist black theme selection if OS theme mode while app is in system mode * fix: OS theme change when app is in background restrict pin screen from proceed * Fix theme picker sizing * Update lib/src/screens/dashboard/desktop_widgets/desktop_wallet_selection_dropdown.dart Co-authored-by: Omar Hatem <omarh.ismail1@gmail.com> * refactor: Enhance theme access by introducing ThemeX extension for easier retrieval of current theme and custom colors * refactor: Remove currentTheme parameter from GradientBackground widget and adjust across affected widgets * refactor: Remove currentTheme parameter from StandardSwitch and SettingsSwitcherCell, using ThemeX extension for theme access * refactor: Remove currentTheme parameter from various widgets dependent on SettingsSwitcherCell and StandardxSwitcher, using ThemeX extension for theme access * refactor: Remove currentTheme in bottomsheets and related widgets, switching to theme extension * refactor: Remove constructor theme access in OptionTile and related widgets, switching to theme extension * refactor: Switch bottomsheet related widgets to use theme extension instead of constructor access * refactor: Migrate currentTheme access from constructor based to extension base * refactor: Switch theme access from constructor base to extension base [skip ci] * refactor: Migrate more widgets to use extension based theme access and clean up code * refactor: Update theme access across multiple widgets to use the new theme extension * refactor: Clean up theme access in various widgets, moving to extension-based theme usage * refactor: Make theme picker preview responsive * fix: Persist saved black theme accent when app is put in background and brought back * remove unused variables [skip ci] --------- Co-authored-by: Blazebrain <davidadegoke16@gmail.com> Co-authored-by: Omar Hatem <omarh.ismail1@gmail.com>

tuxsudo committed Oct 10, 2025 at 09:00 UTC c746b85a4bb186b13ce057fde3c931e720128673
329 files changed +2145 -1332
assets/images/2.0x/Twitter.png
Binary files a/assets/images/2.0x/Twitter.png and /dev/null differ
assets/images/2.0x/back_arrow.png
Binary files a/assets/images/2.0x/back_arrow.png and /dev/null differ
assets/images/2.0x/back_arrow_dark_theme.png
Binary files a/assets/images/2.0x/back_arrow_dark_theme.png and /dev/null differ
assets/images/2.0x/back_vector.png
Binary files a/assets/images/2.0x/back_vector.png and /dev/null differ
assets/images/2.0x/backup.png
Binary files a/assets/images/2.0x/backup.png and /dev/null differ
assets/images/2.0x/bitcoin.png
Binary files a/assets/images/2.0x/bitcoin.png and /dev/null differ
assets/images/2.0x/bitcoin_menu.png
Binary files a/assets/images/2.0x/bitcoin_menu.png and /dev/null differ
assets/images/2.0x/bitmap.png
Binary files a/assets/images/2.0x/bitmap.png and /dev/null differ
assets/images/2.0x/cake_arrow.png
Binary files a/assets/images/2.0x/cake_arrow.png and /dev/null differ
assets/images/2.0x/cake_logo.png
Binary files a/assets/images/2.0x/cake_logo.png and /dev/null differ
assets/images/2.0x/china.png
Binary files a/assets/images/2.0x/china.png and /dev/null differ
assets/images/2.0x/coins.png
Binary files a/assets/images/2.0x/coins.png and /dev/null differ
assets/images/2.0x/crypto_lock.png
Binary files a/assets/images/2.0x/crypto_lock.png and /dev/null differ
assets/images/2.0x/crypto_lock_light.png
Binary files a/assets/images/2.0x/crypto_lock_light.png and /dev/null differ
assets/images/2.0x/decred.png
Binary files a/assets/images/2.0x/decred.png and /dev/null differ
assets/images/2.0x/germany.png
Binary files a/assets/images/2.0x/germany.png and /dev/null differ
assets/images/2.0x/holland.png
Binary files a/assets/images/2.0x/holland.png and /dev/null differ
assets/images/2.0x/india.png
Binary files a/assets/images/2.0x/india.png and /dev/null differ
assets/images/2.0x/japan.png
Binary files a/assets/images/2.0x/japan.png and /dev/null differ
assets/images/2.0x/keysIco.png
Binary files a/assets/images/2.0x/keysIco.png and /dev/null differ
assets/images/2.0x/litecoin.png
Binary files a/assets/images/2.0x/litecoin.png and /dev/null differ
assets/images/2.0x/menu_button.png
Binary files a/assets/images/2.0x/menu_button.png and /dev/null differ
assets/images/2.0x/monero.png
Binary files a/assets/images/2.0x/monero.png and /dev/null differ
assets/images/2.0x/monero_menu.png
Binary files a/assets/images/2.0x/monero_menu.png and /dev/null differ
assets/images/2.0x/poland.png
Binary files a/assets/images/2.0x/poland.png and /dev/null differ
assets/images/2.0x/portugal.png
Binary files a/assets/images/2.0x/portugal.png and /dev/null differ
assets/images/2.0x/pre_seed_dark.png
Binary files a/assets/images/2.0x/pre_seed_dark.png and /dev/null differ
assets/images/2.0x/pre_seed_light.png
Binary files a/assets/images/2.0x/pre_seed_light.png and /dev/null differ
assets/images/2.0x/restoreSeed.png
Binary files a/assets/images/2.0x/restoreSeed.png and /dev/null differ
assets/images/2.0x/restore_keys.png
Binary files a/assets/images/2.0x/restore_keys.png and /dev/null differ
assets/images/2.0x/restore_seed.png
Binary files a/assets/images/2.0x/restore_seed.png and /dev/null differ
assets/images/2.0x/restore_wallet_image.png
Binary files a/assets/images/2.0x/restore_wallet_image.png and /dev/null differ
assets/images/2.0x/russia.png
Binary files a/assets/images/2.0x/russia.png and /dev/null differ
assets/images/2.0x/seedIco.png
Binary files a/assets/images/2.0x/seedIco.png and /dev/null differ
assets/images/2.0x/seedKeys.png
Binary files a/assets/images/2.0x/seedKeys.png and /dev/null differ
assets/images/2.0x/seed_image.png
Binary files a/assets/images/2.0x/seed_image.png and /dev/null differ
assets/images/2.0x/south_korea.png
Binary files a/assets/images/2.0x/south_korea.png and /dev/null differ
assets/images/2.0x/spain.png
Binary files a/assets/images/2.0x/spain.png and /dev/null differ
assets/images/2.0x/usa.png
Binary files a/assets/images/2.0x/usa.png and /dev/null differ
assets/images/2.0x/wallet_name.png
Binary files a/assets/images/2.0x/wallet_name.png and /dev/null differ
assets/images/2.0x/wallet_name_light.png
Binary files a/assets/images/2.0x/wallet_name_light.png and /dev/null differ
assets/images/2.0x/wallet_type.png
Binary files a/assets/images/2.0x/wallet_type.png and /dev/null differ
assets/images/2.0x/wallet_type_light.png
Binary files a/assets/images/2.0x/wallet_type_light.png and /dev/null differ
assets/images/2.0x/welcome.png
Binary files a/assets/images/2.0x/welcome.png and /dev/null differ
assets/images/2.0x/welcomeImg.png
Binary files a/assets/images/2.0x/welcomeImg.png and /dev/null differ
assets/images/2.0x/welcome_light.png
Binary files a/assets/images/2.0x/welcome_light.png and /dev/null differ
assets/images/3.0x/Twitter.png
Binary files a/assets/images/3.0x/Twitter.png and /dev/null differ
assets/images/3.0x/back_arrow.png
Binary files a/assets/images/3.0x/back_arrow.png and /dev/null differ
assets/images/3.0x/back_arrow_dark_theme.png
Binary files a/assets/images/3.0x/back_arrow_dark_theme.png and /dev/null differ
assets/images/3.0x/back_vector.png
Binary files a/assets/images/3.0x/back_vector.png and /dev/null differ
assets/images/3.0x/backup.png
Binary files a/assets/images/3.0x/backup.png and /dev/null differ
assets/images/3.0x/bitcoin.png
Binary files a/assets/images/3.0x/bitcoin.png and /dev/null differ
assets/images/3.0x/bitcoin_menu.png
Binary files a/assets/images/3.0x/bitcoin_menu.png and /dev/null differ
assets/images/3.0x/bitmap.png
Binary files a/assets/images/3.0x/bitmap.png and /dev/null differ
assets/images/3.0x/cake_arrow.png
Binary files a/assets/images/3.0x/cake_arrow.png and /dev/null differ
assets/images/3.0x/cake_logo.png
Binary files a/assets/images/3.0x/cake_logo.png and /dev/null differ
assets/images/3.0x/china.png
Binary files a/assets/images/3.0x/china.png and /dev/null differ
assets/images/3.0x/coins.png
Binary files a/assets/images/3.0x/coins.png and /dev/null differ
assets/images/3.0x/crypto_lock.png
Binary files a/assets/images/3.0x/crypto_lock.png and /dev/null differ
assets/images/3.0x/crypto_lock_light.png
Binary files a/assets/images/3.0x/crypto_lock_light.png and /dev/null differ
assets/images/3.0x/decred.png
Binary files a/assets/images/3.0x/decred.png and /dev/null differ
assets/images/3.0x/decred_menu.png
Binary files a/assets/images/3.0x/decred_menu.png and /dev/null differ
assets/images/3.0x/germany.png
Binary files a/assets/images/3.0x/germany.png and /dev/null differ
assets/images/3.0x/header.png
Binary files a/assets/images/3.0x/header.png and /dev/null differ
assets/images/3.0x/holland.png
Binary files a/assets/images/3.0x/holland.png and /dev/null differ
assets/images/3.0x/india.png
Binary files a/assets/images/3.0x/india.png and /dev/null differ
assets/images/3.0x/japan.png
Binary files a/assets/images/3.0x/japan.png and /dev/null differ
assets/images/3.0x/keysIco.png
Binary files a/assets/images/3.0x/keysIco.png and /dev/null differ
assets/images/3.0x/litecoin.png
Binary files a/assets/images/3.0x/litecoin.png and /dev/null differ
assets/images/3.0x/menu_button.png
Binary files a/assets/images/3.0x/menu_button.png and /dev/null differ
assets/images/3.0x/monero.png
Binary files a/assets/images/3.0x/monero.png and /dev/null differ
assets/images/3.0x/monero_menu.png
Binary files a/assets/images/3.0x/monero_menu.png and /dev/null differ
assets/images/3.0x/poland.png
Binary files a/assets/images/3.0x/poland.png and /dev/null differ
assets/images/3.0x/portugal.png
Binary files a/assets/images/3.0x/portugal.png and /dev/null differ
assets/images/3.0x/pre_seed_dark.png
Binary files a/assets/images/3.0x/pre_seed_dark.png and /dev/null differ
assets/images/3.0x/pre_seed_light.png
Binary files a/assets/images/3.0x/pre_seed_light.png and /dev/null differ
assets/images/3.0x/restoreSeed.png
Binary files a/assets/images/3.0x/restoreSeed.png and /dev/null differ
assets/images/3.0x/restore_keys.png
Binary files a/assets/images/3.0x/restore_keys.png and /dev/null differ
assets/images/3.0x/restore_seed.png
Binary files a/assets/images/3.0x/restore_seed.png and /dev/null differ
assets/images/3.0x/restore_wallet_image.png
Binary files a/assets/images/3.0x/restore_wallet_image.png and /dev/null differ
assets/images/3.0x/russia.png
Binary files a/assets/images/3.0x/russia.png and /dev/null differ
assets/images/3.0x/seedIco.png
Binary files a/assets/images/3.0x/seedIco.png and /dev/null differ
assets/images/3.0x/seedKeys.png
Binary files a/assets/images/3.0x/seedKeys.png and /dev/null differ
assets/images/3.0x/seed_image.png
Binary files a/assets/images/3.0x/seed_image.png and /dev/null differ
assets/images/3.0x/south_korea.png
Binary files a/assets/images/3.0x/south_korea.png and /dev/null differ
assets/images/3.0x/spain.png
Binary files a/assets/images/3.0x/spain.png and /dev/null differ
assets/images/3.0x/usa.png
Binary files a/assets/images/3.0x/usa.png and /dev/null differ
assets/images/3.0x/wallet_name.png
Binary files a/assets/images/3.0x/wallet_name.png and /dev/null differ
assets/images/3.0x/wallet_name_light.png
Binary files a/assets/images/3.0x/wallet_name_light.png and /dev/null differ
assets/images/3.0x/wallet_type.png
Binary files a/assets/images/3.0x/wallet_type.png and /dev/null differ
assets/images/3.0x/wallet_type_light.png
Binary files a/assets/images/3.0x/wallet_type_light.png and /dev/null differ
assets/images/3.0x/welcome.png
Binary files a/assets/images/3.0x/welcome.png and /dev/null differ
assets/images/3.0x/welcomeImg.png
Binary files a/assets/images/3.0x/welcomeImg.png and /dev/null differ
assets/images/3.0x/welcome_light.png
Binary files a/assets/images/3.0x/welcome_light.png and /dev/null differ
assets/images/Twitter.png
Binary files a/assets/images/Twitter.png and /dev/null differ
assets/images/back_arrow.png
Binary files a/assets/images/back_arrow.png and /dev/null differ
assets/images/back_arrow_dark_theme.png
Binary files a/assets/images/back_arrow_dark_theme.png and /dev/null differ
assets/images/back_vector.png
Binary files a/assets/images/back_vector.png and /dev/null differ
assets/images/backup.png
Binary files a/assets/images/backup.png and /dev/null differ
assets/images/bch.png
Binary files a/assets/images/bch.png and /dev/null differ
assets/images/bch_icon.png
Binary files a/assets/images/bch_icon.png and /dev/null differ
assets/images/bitcoin.png
Binary files a/assets/images/bitcoin.png and /dev/null differ
assets/images/bitcoin_icon.png
Binary files a/assets/images/bitcoin_icon.png and /dev/null differ
assets/images/bitcoin_menu.png
Binary files a/assets/images/bitcoin_menu.png and /dev/null differ
assets/images/bitmap.png
Binary files a/assets/images/bitmap.png and /dev/null differ
assets/images/black_accent.svg new
+13
@@ -0,0 +1,13 @@
1 +<svg width="92" height="173" viewBox="0 0 92 173" fill="none" xmlns="http://www.w3.org/2000/svg">
2 +<rect width="92" height="173" rx="10" fill="#131314"/>
3 +<rect x="16" y="8" width="59" height="9" rx="4.5" fill="#211F20"/>
4 +<rect x="8" y="152" width="75" height="14" rx="7" fill="#211F20"/>
5 +<rect x="8" y="37" width="75" height="30" rx="4" fill="#211F20"/>
6 +<rect x="10" y="31" width="16" height="3" fill="#B4B4B4"/>
7 +<rect x="12" y="41" width="34" height="3" fill="#B4B4B4"/>
8 +<rect x="12" y="46" width="34" height="3" fill="#B4B4B4"/>
9 +<rect x="12" y="51" width="26" height="3" fill="#B4B4B4"/>
10 +<rect x="12" y="56" width="26" height="3" fill="#B4B4B4"/>
11 +<rect x="71" y="54" width="8" height="3" fill="#B4B4B4"/>
12 +<rect x="71" y="44" width="8" height="8" rx="4" fill="#52B6F0"/>
13 +</svg>
assets/images/bnb.png
Binary files a/assets/images/bnb.png and /dev/null differ
assets/images/btc.png
Binary files a/assets/images/btc.png and /dev/null differ
assets/images/cake_arrow.png
Binary files a/assets/images/cake_arrow.png and /dev/null differ
assets/images/cakepay.png
Binary files /dev/null and b/assets/images/cakepay.png differ
assets/images/crypto/bitcoin-cash.png
Binary files /dev/null and b/assets/images/crypto/bitcoin-cash.png differ
assets/images/crypto/bitcoin.png
Binary files /dev/null and b/assets/images/crypto/bitcoin.png differ
assets/images/crypto/dai.png
Binary files /dev/null and b/assets/images/crypto/dai.png differ
assets/images/crypto/decred.png
Binary files /dev/null and b/assets/images/crypto/decred.png differ
assets/images/crypto/deuro.png
Binary files /dev/null and b/assets/images/crypto/deuro.png differ
assets/images/crypto/dogecoin.png
Binary files /dev/null and b/assets/images/crypto/dogecoin.png differ
assets/images/crypto/ethereum.png
Binary files /dev/null and b/assets/images/crypto/ethereum.png differ
assets/images/crypto/litecoin.png
Binary files /dev/null and b/assets/images/crypto/litecoin.png differ
assets/images/crypto/monero.png
Binary files /dev/null and b/assets/images/crypto/monero.png differ
assets/images/crypto/nano.png
Binary files /dev/null and b/assets/images/crypto/nano.png differ
assets/images/crypto/polygon.png
Binary files /dev/null and b/assets/images/crypto/polygon.png differ
assets/images/crypto/solana.png
Binary files /dev/null and b/assets/images/crypto/solana.png differ
assets/images/crypto/tether.png
Binary files /dev/null and b/assets/images/crypto/tether.png differ
assets/images/crypto/tron.png
Binary files /dev/null and b/assets/images/crypto/tron.png differ
assets/images/crypto/usdc.png
Binary files /dev/null and b/assets/images/crypto/usdc.png differ
assets/images/crypto/wbtc.png
Binary files /dev/null and b/assets/images/crypto/wbtc.png differ
assets/images/crypto/wownero.png
Binary files /dev/null and b/assets/images/crypto/wownero.png differ
assets/images/crypto/zano.png
Binary files /dev/null and b/assets/images/crypto/zano.png differ
assets/images/crypto_lock.png
Binary files a/assets/images/crypto_lock.png and /dev/null differ
assets/images/dai.png
Binary files a/assets/images/dai.png and /dev/null differ
assets/images/dai_icon.png
Binary files a/assets/images/dai_icon.png and b/assets/images/dai_icon.png differ
assets/images/dark.svg new
+13
@@ -0,0 +1,13 @@
1 +<svg width="92" height="173" viewBox="0 0 92 173" fill="none" xmlns="http://www.w3.org/2000/svg">
2 +<rect width="92" height="173" rx="10" fill="#1B284A"/>
3 +<rect x="16" y="8" width="59" height="9" rx="4.5" fill="#233461"/>
4 +<rect x="8" y="152" width="75" height="14" rx="7" fill="#233461"/>
5 +<rect x="8" y="37" width="75" height="30" rx="4" fill="#233461"/>
6 +<rect x="10" y="31" width="16" height="3" fill="#8C9FBB"/>
7 +<rect x="12" y="41" width="34" height="3" fill="#8C9FBB"/>
8 +<rect x="12" y="46" width="34" height="3" fill="#8C9FBB"/>
9 +<rect x="12" y="51" width="26" height="3" fill="#8C9FBB"/>
10 +<rect x="12" y="56" width="26" height="3" fill="#8C9FBB"/>
11 +<rect x="71" y="54" width="8" height="3" fill="#8C9FBB"/>
12 +<rect x="71" y="44" width="8" height="8" rx="4" fill="#91B0FF"/>
13 +</svg>
assets/images/dash.png
Binary files a/assets/images/dash.png and /dev/null differ
assets/images/dcr_icon.png
Binary files a/assets/images/dcr_icon.png and /dev/null differ
assets/images/decred.png
Binary files a/assets/images/decred.png and /dev/null differ
assets/images/decred_icon.png
Binary files a/assets/images/decred_icon.png and /dev/null differ
assets/images/decred_menu.png
Binary files a/assets/images/decred_menu.png and /dev/null differ
assets/images/doge_icon.png
Binary files a/assets/images/doge_icon.png and /dev/null differ
assets/images/eth_icon.png
Binary files a/assets/images/eth_icon.png and /dev/null differ
assets/images/header.png
Binary files a/assets/images/header.png and /dev/null differ
assets/images/light.svg new
+13
@@ -0,0 +1,13 @@
1 +<svg width="92" height="173" viewBox="0 0 92 173" fill="none" xmlns="http://www.w3.org/2000/svg">
2 +<rect width="92" height="173" rx="10" fill="#EFEFF8"/>
3 +<rect x="16" y="8" width="59" height="9" rx="4.5" fill="#FBFBFD"/>
4 +<rect x="8" y="152" width="75" height="14" rx="7" fill="#FBFBFD"/>
5 +<rect x="8" y="37" width="75" height="30" rx="4" fill="#FBFBFD"/>
6 +<rect x="10" y="31" width="16" height="3" fill="#6C6772"/>
7 +<rect x="12" y="41" width="34" height="3" fill="#6C6772"/>
8 +<rect x="12" y="46" width="34" height="3" fill="#6C6772"/>
9 +<rect x="12" y="51" width="26" height="3" fill="#6C6772"/>
10 +<rect x="12" y="56" width="26" height="3" fill="#6C6772"/>
11 +<rect x="71" y="54" width="8" height="3" fill="#6C6772"/>
12 +<rect x="71" y="44" width="8" height="8" rx="4" fill="#4EBEFF"/>
13 +</svg>
assets/images/litecoin-ltc_icon.png
Binary files a/assets/images/litecoin-ltc_icon.png and /dev/null differ
assets/images/litecoin.png
Binary files a/assets/images/litecoin.png and /dev/null differ
assets/images/litecoin_icon.png
Binary files a/assets/images/litecoin_icon.png and /dev/null differ
assets/images/litecoin_img.png
Binary files a/assets/images/litecoin_img.png and /dev/null differ
assets/images/live_support.png
Binary files a/assets/images/live_support.png and /dev/null differ
assets/images/matic_icon.png
Binary files a/assets/images/matic_icon.png and /dev/null differ
assets/images/monero_icon.png
Binary files a/assets/images/monero_icon.png and /dev/null differ
assets/images/monero_logo.png
Binary files a/assets/images/monero_logo.png and /dev/null differ
assets/images/monero_menu.png
Binary files a/assets/images/monero_menu.png and /dev/null differ
assets/images/more_links.png
Binary files a/assets/images/more_links.png and /dev/null differ
assets/images/nano_icon.png
Binary files a/assets/images/nano_icon.png and b/assets/images/nano_icon.png differ
assets/images/nanogpt.png
Binary files a/assets/images/nanogpt.png and b/assets/images/nanogpt.png differ
assets/images/pre_seed_dark.png
Binary files a/assets/images/pre_seed_dark.png and /dev/null differ
assets/images/pre_seed_light.png
Binary files a/assets/images/pre_seed_light.png and /dev/null differ
assets/images/receive_icon.png
Binary files a/assets/images/receive_icon.png and /dev/null differ
assets/images/receive_icon_raw.png
Binary files a/assets/images/receive_icon_raw.png and /dev/null differ
assets/images/red_badge_discount.png
Binary files a/assets/images/red_badge_discount.png and /dev/null differ
assets/images/restoreSeed.png
Binary files a/assets/images/restoreSeed.png and /dev/null differ
assets/images/restore_keys.png
Binary files a/assets/images/restore_keys.png and /dev/null differ
assets/images/restore_seed.png
Binary files a/assets/images/restore_seed.png and /dev/null differ
assets/images/restore_seeds.png
Binary files /dev/null and b/assets/images/restore_seeds.png differ
assets/images/restore_wallet_image.png
Binary files a/assets/images/restore_wallet_image.png and /dev/null differ
assets/images/seedIco.png
Binary files a/assets/images/seedIco.png and /dev/null differ
assets/images/seedKeys.png
Binary files a/assets/images/seedKeys.png and /dev/null differ
assets/images/seed_verified.png
Binary files a/assets/images/seed_verified.png and /dev/null differ
assets/images/setup_2fa_img.png
Binary files a/assets/images/setup_2fa_img.png and /dev/null differ
assets/images/sol_icon.png
Binary files a/assets/images/sol_icon.png and /dev/null differ
assets/images/trx_icon.png
Binary files a/assets/images/trx_icon.png and /dev/null differ
assets/images/usdc_icon.png
Binary files a/assets/images/usdc_icon.png and b/assets/images/usdc_icon.png differ
assets/images/usdt.png
Binary files a/assets/images/usdt.png and /dev/null differ
assets/images/usdt_icon.png
Binary files a/assets/images/usdt_icon.png and /dev/null differ
assets/images/usdtbsc_icon.png
Binary files a/assets/images/usdtbsc_icon.png and /dev/null differ
assets/images/usdterc.png
Binary files a/assets/images/usdterc.png and /dev/null differ
assets/images/usdterc20_icon.png
Binary files a/assets/images/usdterc20_icon.png and b/assets/images/usdterc20_icon.png differ
assets/images/usdterc_icon.png
Binary files a/assets/images/usdterc_icon.png and b/assets/images/usdterc_icon.png differ
assets/images/usdttrc20_icon.png
Binary files a/assets/images/usdttrc20_icon.png and /dev/null differ
assets/images/wallet_guides.png
Binary files a/assets/images/wallet_guides.png and /dev/null differ
assets/images/wbtc_icon.png
Binary files a/assets/images/wbtc_icon.png and b/assets/images/wbtc_icon.png differ
assets/images/wownero_icon.png
Binary files a/assets/images/wownero_icon.png and /dev/null differ
assets/images/wownero_menu.png
Binary files a/assets/images/wownero_menu.png and /dev/null differ
assets/images/xmr_btc.png
Binary files a/assets/images/xmr_btc.png and /dev/null differ
assets/images/zano_bg_icon.png
Binary files a/assets/images/zano_bg_icon.png and /dev/null differ
assets/images/zano_icon.png
Binary files a/assets/images/zano_icon.png and /dev/null differ
cw_core/lib/crypto_currency.dart
+28 -28
@@ -134,20 +134,20 @@ class CryptoCurrency extends EnumerableItem<int> with Serializable<int> implemen
134 ];
135
136 // title, tag (if applicable), fullName (if unique), raw, name, iconPath
137 - static const xmr = CryptoCurrency(title: 'XMR', fullName: 'Monero', raw: 0, name: 'xmr', iconPath: 'assets/images/monero_icon.png', decimals: 12);
137 + static const xmr = CryptoCurrency(title: 'XMR', fullName: 'Monero', raw: 0, name: 'xmr', iconPath: 'assets/images/crypto/monero.png', decimals: 12);
138 static const ada = CryptoCurrency(title: 'ADA', fullName: 'Cardano', raw: 1, name: 'ada', iconPath: 'assets/images/ada_icon.png', decimals: 6);
139 - static const bch = CryptoCurrency(title: 'BCH', fullName: 'Bitcoin Cash', raw: 2, name: 'bch', iconPath: 'assets/images/bch_icon.png', decimals: 8);
139 + static const bch = CryptoCurrency(title: 'BCH', fullName: 'Bitcoin Cash', raw: 2, name: 'bch', iconPath: 'assets/images/crypto/bitcoin-cash.png', decimals: 8);
140 static const bnb = CryptoCurrency(title: 'BNB', tag: 'BSC', fullName: 'Binance Coin', raw: 3, name: 'bnb', iconPath: 'assets/images/bnb_icon.png', decimals: 8);
141 - static const btc = CryptoCurrency(title: 'BTC', fullName: 'Bitcoin', raw: 4, name: 'btc', iconPath: 'assets/images/btc.png', decimals: 8);
142 - static const dai = CryptoCurrency(title: 'DAI', tag: 'ETH', fullName: 'Dai', raw: 5, name: 'dai', iconPath: 'assets/images/dai_icon.png', decimals: 18);
141 + static const btc = CryptoCurrency(title: 'BTC', fullName: 'Bitcoin', raw: 4, name: 'btc', iconPath: 'assets/images/crypto/bitcoin.png', decimals: 8);
142 + static const dai = CryptoCurrency(title: 'DAI', tag: 'ETH', fullName: 'Dai', raw: 5, name: 'dai', iconPath: 'assets/images/crypto/dai.png', decimals: 18);
143 static const dash = CryptoCurrency(title: 'DASH', fullName: 'Dash', raw: 6, name: 'dash', iconPath: 'assets/images/dash_icon.png', decimals: 8);
144 static const eos = CryptoCurrency(title: 'EOS', fullName: 'EOS', raw: 7, name: 'eos', iconPath: 'assets/images/eos_icon.png', decimals: 4);
145 - static const eth = CryptoCurrency(title: 'ETH', fullName: 'Ethereum', raw: 8, name: 'eth', iconPath: 'assets/images/eth_icon.png', decimals: 18);
146 - static const ltc = CryptoCurrency(title: 'LTC', fullName: 'Litecoin', raw: 9, name: 'ltc', iconPath: 'assets/images/litecoin-ltc_icon.png', decimals: 8);
147 - static const nano = CryptoCurrency(title: 'XNO', fullName: 'Nano', raw: 10, name: 'xno', iconPath: 'assets/images/nano_icon.png', decimals: 30);
148 - static const trx = CryptoCurrency(title: 'TRX', fullName: 'TRON', raw: 11, name: 'trx', iconPath: 'assets/images/trx_icon.png', decimals: 6);
149 - static const usdt = CryptoCurrency(title: 'USDT', tag: 'OMNI', fullName: 'USDT Tether', raw: 12, name: 'usdt', iconPath: 'assets/images/usdt_icon.png', decimals: 6);
150 - static const usdterc20 = CryptoCurrency(title: 'USDT', tag: 'ETH', fullName: 'USDT Tether', raw: 13, name: 'usdterc20', iconPath: 'assets/images/usdterc20_icon.png', decimals: 6);
145 + static const eth = CryptoCurrency(title: 'ETH', fullName: 'Ethereum', raw: 8, name: 'eth', iconPath: 'assets/images/crypto/ethereum.png', decimals: 18);
146 + static const ltc = CryptoCurrency(title: 'LTC', fullName: 'Litecoin', raw: 9, name: 'ltc', iconPath: 'assets/images/crypto/litecoin.png', decimals: 8);
147 + static const nano = CryptoCurrency(title: 'XNO', fullName: 'Nano', raw: 10, name: 'xno', iconPath: 'assets/images/crypto/nano.png', decimals: 30);
148 + static const trx = CryptoCurrency(title: 'TRX', fullName: 'TRON', raw: 11, name: 'trx', iconPath: 'assets/images/crypto/tron.png', decimals: 6);
149 + static const usdt = CryptoCurrency(title: 'USDT', tag: 'OMNI', fullName: 'USDT Tether', raw: 12, name: 'usdt', iconPath: 'assets/images/crypto/tether.png', decimals: 6);
150 + static const usdterc20 = CryptoCurrency(title: 'USDT', tag: 'ETH', fullName: 'USDT Tether', raw: 13, name: 'usdterc20', iconPath: 'assets/images/crypto/tether.png', decimals: 6);
151 static const xlm = CryptoCurrency(title: 'XLM', fullName: 'Stellar', raw: 14, name: 'xlm', iconPath: 'assets/images/xlm_icon.png', decimals: 7);
152 static const xrp = CryptoCurrency(title: 'XRP', fullName: 'Ripple', raw: 15, name: 'xrp', iconPath: 'assets/images/xrp_icon.png', decimals: 6);
153 static const xhv = CryptoCurrency(title: 'XHV', fullName: 'Haven Protocol', raw: 16, name: 'xhv', iconPath: 'assets/images/xhv_logo.png', decimals: 12);
@@ -170,25 +170,25 @@ class CryptoCurrency extends EnumerableItem<int> with Serializable<int> implemen
170 static const avaxc = CryptoCurrency(title: 'AVAX', tag: 'AVAXC', fullName: 'Avalanche', raw: 31, name: 'avaxc', iconPath: 'assets/images/avaxc_icon.png', decimals: 9);
171 static const btt = CryptoCurrency(title: 'BTT', tag: 'ETH', fullName: 'BitTorrent', raw: 32, name: 'btt', iconPath: 'assets/images/btt_icon.png', decimals: 18);
172 static const bttc = CryptoCurrency(title: 'BTTC', tag: 'TRX', fullName: 'BitTorrent-NEW', raw: 33, name: 'bttc', iconPath: 'assets/images/btt_icon.png', decimals: 18);
173 - static const doge = CryptoCurrency(title: 'DOGE', fullName: 'Dogecoin', raw: 34, name: 'doge', iconPath: 'assets/images/doge_icon.png', decimals: 8);
173 + static const doge = CryptoCurrency(title: 'DOGE', fullName: 'Dogecoin', raw: 34, name: 'doge', iconPath: 'assets/images/crypto/dogecoin.png', decimals: 8);
174 static const firo = CryptoCurrency(title: 'FIRO', raw: 35, name: 'firo', iconPath: 'assets/images/firo_icon.png', decimals: 8);
175 - static const usdttrc20 = CryptoCurrency(title: 'USDT', tag: 'TRX', fullName: 'USDT Tether', raw: 36, name: 'usdttrc20', iconPath: 'assets/images/usdttrc20_icon.png', decimals: 6);
175 + static const usdttrc20 = CryptoCurrency(title: 'USDT', tag: 'TRX', fullName: 'USDT Tether', raw: 36, name: 'usdttrc20', iconPath: 'assets/images/crypto/tether.png', decimals: 6);
176 static const hbar = CryptoCurrency(title: 'HBAR', fullName: 'Hedera', raw: 37, name: 'hbar', iconPath: 'assets/images/hbar_icon.png', decimals: 8);
177 static const sc = CryptoCurrency(title: 'SC', fullName: 'Siacoin', raw: 38, name: 'sc', iconPath: 'assets/images/sc_icon.png', decimals: 16);
178 - static const sol = CryptoCurrency(title: 'SOL', fullName: 'Solana', raw: 39, name: 'sol', iconPath: 'assets/images/sol_icon.png', decimals: 9);
179 - static const usdc = CryptoCurrency(title: 'USDC', tag: 'ETH', fullName: 'USD Coin', raw: 40, name: 'usdc', iconPath: 'assets/images/usdc_icon.png', decimals: 6);
180 - static const usdcsol = CryptoCurrency(title: 'USDC', tag: 'SOL', fullName: 'USDC Coin', raw: 41, name: 'usdcsol', iconPath: 'assets/images/usdc_icon.png', decimals: 6);
178 + static const sol = CryptoCurrency(title: 'SOL', fullName: 'Solana', raw: 39, name: 'sol', iconPath: 'assets/images/crypto/solana.png', decimals: 9);
179 + static const usdc = CryptoCurrency(title: 'USDC', tag: 'ETH', fullName: 'USD Coin', raw: 40, name: 'usdc', iconPath: 'assets/images/crypto/usdc.png', decimals: 6);
180 + static const usdcsol = CryptoCurrency(title: 'USDC', tag: 'SOL', fullName: 'USDC Coin', raw: 41, name: 'usdcsol', iconPath: 'assets/images/crypto/usdc.png', decimals: 6);
181 static const zaddr = CryptoCurrency(title: 'ZZEC', tag: 'ZEC', fullName: 'Shielded Zcash', raw: 42, name: 'zaddr', iconPath: 'assets/images/zec_icon.png', decimals: 8);
182 static const zec = CryptoCurrency(title: 'TZEC', tag: 'ZEC', fullName: 'Transparent Zcash', raw: 43, name: 'zec', iconPath: 'assets/images/zec_icon.png', decimals: 8);
183 static const zen = CryptoCurrency(title: 'ZEN', fullName: 'Horizen', raw: 44, name: 'zen', iconPath: 'assets/images/zen_icon.png', decimals: 8);
184 static const xvg = CryptoCurrency(title: 'XVG', fullName: 'Verge', raw: 45, name: 'xvg', iconPath: 'assets/images/xvg_icon.png', decimals: 8);
185
186 - static const usdcpoly = CryptoCurrency(title: 'USDC', tag: 'POL', fullName: 'USD Coin', raw: 46, name: 'usdcpoly', iconPath: 'assets/images/usdc_icon.png', decimals: 6);
187 - static const dcr = CryptoCurrency(title: 'DCR', fullName: 'Decred', raw: 47, name: 'dcr', iconPath: 'assets/images/dcr_icon.png', decimals: 8);
186 + static const usdcpoly = CryptoCurrency(title: 'USDC', tag: 'POL', fullName: 'USD Coin', raw: 46, name: 'usdcpoly', iconPath: 'assets/images/crypto/usdc.png', decimals: 6);
187 + static const dcr = CryptoCurrency(title: 'DCR', fullName: 'Decred', raw: 47, name: 'dcr', iconPath: 'assets/images/crypto/decred.png', decimals: 8);
188 static const kmd = CryptoCurrency(title: 'KMD', fullName: 'Komodo', raw: 48, name: 'kmd', iconPath: 'assets/images/kmd_icon.png', decimals: 8);
189 static const mana = CryptoCurrency(title: 'MANA', tag: 'ETH', fullName: 'Decentraland', raw: 49, name: 'mana', iconPath: 'assets/images/mana_icon.png', decimals: 18);
190 - static const maticpoly = CryptoCurrency(title: 'POL', tag: 'POL', fullName: 'Polygon', raw: 50, name: 'maticpoly', iconPath: 'assets/images/matic_icon.png', decimals: 18);
191 - static const matic = CryptoCurrency(title: 'MATIC', tag: 'ETH', fullName: 'Polygon', raw: 51, name: 'matic', iconPath: 'assets/images/matic_icon.png', decimals: 18);
190 + static const maticpoly = CryptoCurrency(title: 'POL', tag: 'POL', fullName: 'Polygon', raw: 50, name: 'maticpoly', iconPath: 'assets/images/crypto/polygon.png', decimals: 18);
191 + static const matic = CryptoCurrency(title: 'MATIC', tag: 'ETH', fullName: 'Polygon', raw: 51, name: 'matic', iconPath: 'assets/images/crypto/polygon.png', decimals: 18);
192 static const mkr = CryptoCurrency(title: 'MKR', tag: 'ETH', fullName: 'Maker', raw: 52, name: 'mkr', iconPath: 'assets/images/mkr_icon.png', decimals: 18);
193 static const near = CryptoCurrency(title: 'NEAR', fullName: 'NEAR Protocol', raw: 53, name: 'near', iconPath: 'assets/images/near_icon.png', decimals: 24);
194 static const oxt = CryptoCurrency(title: 'OXT', tag: 'ETH', fullName: 'Orchid', raw: 54, name: 'oxt', iconPath: 'assets/images/oxt_icon.png', decimals: 18);
@@ -199,7 +199,7 @@ class CryptoCurrency extends EnumerableItem<int> with Serializable<int> implemen
199 static const scrt = CryptoCurrency(title: 'SCRT', fullName: 'Secret Network', raw: 59, name: 'scrt', iconPath: 'assets/images/scrt_icon.png', decimals: 6);
200 static const uni = CryptoCurrency(title: 'UNI', tag: 'ETH', fullName: 'Uniswap', raw: 60, name: 'uni', iconPath: 'assets/images/uni_icon.png', decimals: 18);
201 static const stx = CryptoCurrency(title: 'STX', fullName: 'Stacks', raw: 61, name: 'stx', iconPath: 'assets/images/stx_icon.png', decimals: 8);
202 - static const btcln = CryptoCurrency(title: 'BTC', tag: 'LN', fullName: 'Bitcoin Lightning Network', raw: 62, name: 'btcln', iconPath: 'assets/images/btc.png', decimals: 8);
202 + static const btcln = CryptoCurrency(title: 'BTC', tag: 'LN', fullName: 'Bitcoin Lightning Network', raw: 62, name: 'btcln', iconPath: 'assets/images/crypto/bitcoin.png', decimals: 8);
203 static const shib = CryptoCurrency(title: 'SHIB', tag: 'ETH', fullName: 'Shiba Inu', raw: 63, name: 'shib', iconPath: 'assets/images/shib_icon.png', decimals: 18);
204 static const aave = CryptoCurrency(title: 'AAVE', tag: 'ETH', fullName: 'Aave', raw: 64, name: 'aave', iconPath: 'assets/images/aave_icon.png', decimals: 18);
205 static const arb = CryptoCurrency(title: 'ARB', fullName: 'Arbitrum', raw: 65, name: 'arb', iconPath: 'assets/images/arb_icon.png', decimals: 18);
@@ -218,25 +218,25 @@ class CryptoCurrency extends EnumerableItem<int> with Serializable<int> implemen
218 static const pepe = CryptoCurrency(title: 'PEPE', tag: 'ETH', fullName: 'Pepe', raw: 78, name: 'pepe', iconPath: 'assets/images/pepe_icon.png', decimals: 18);
219 static const storj = CryptoCurrency(title: 'STORJ', tag: 'ETH', fullName: 'Storj', raw: 79, name: 'storj', iconPath: 'assets/images/storj_icon.png', decimals: 8);
220 static const tusd = CryptoCurrency(title: 'TUSD', tag: 'ETH', fullName: 'TrueUSD', raw: 80, name: 'tusd', iconPath: 'assets/images/tusd_icon.png', decimals: 18);
221 - static const wbtc = CryptoCurrency(title: 'WBTC', tag: 'ETH', fullName: 'Wrapped Bitcoin', raw: 81, name: 'wbtc', iconPath: 'assets/images/wbtc_icon.png', decimals: 8);
221 + static const wbtc = CryptoCurrency(title: 'WBTC', tag: 'ETH', fullName: 'Wrapped Bitcoin', raw: 81, name: 'wbtc', iconPath: 'assets/images/crypto/wbtc.png', decimals: 8);
222 static const weth = CryptoCurrency(title: 'WETH', tag: 'ETH', fullName: 'Wrapped Ethereum', raw: 82, name: 'weth', iconPath: 'assets/images/weth_icon.png', decimals: 18);
223 static const zrx = CryptoCurrency(title: 'ZRX', tag: 'ETH', fullName: '0x Protocol', raw: 83, name: 'zrx', iconPath: 'assets/images/zrx_icon.png', decimals: 18);
224 static const dydx = CryptoCurrency(title: 'DYDX', tag: 'ETH', fullName: 'dYdX', raw: 84, name: 'dydx', iconPath: 'assets/images/dydx_icon.png', decimals: 18);
225 static const steth = CryptoCurrency(title: 'STETH', tag: 'ETH', fullName: 'Lido Staked Ethereum', raw: 85, name: 'steth', iconPath: 'assets/images/steth_icon.png', decimals: 18);
226 static const banano = CryptoCurrency(title: 'BAN', fullName: 'Banano', raw: 86, name: 'banano', iconPath: 'assets/images/nano_icon.png', decimals: 29);
227 - static const usdtPoly = CryptoCurrency(title: 'USDT', tag: 'POL', fullName: 'Tether USD (PoS)', raw: 87, name: 'usdtpoly', iconPath: 'assets/images/usdt_icon.png', decimals: 6);
228 - static const usdcEPoly = CryptoCurrency(title: 'USDC.E', tag: 'POL', fullName: 'USD Coin (PoS)', raw: 88, name: 'usdcepoly', iconPath: 'assets/images/usdc_icon.png', decimals: 6);
227 + static const usdtPoly = CryptoCurrency(title: 'USDT', tag: 'POL', fullName: 'Tether USD (PoS)', raw: 87, name: 'usdtpoly', iconPath: 'assets/images/crypto/tether.png', decimals: 6);
228 + static const usdcEPoly = CryptoCurrency(title: 'USDC.E', tag: 'POL', fullName: 'USD Coin (PoS)', raw: 88, name: 'usdcepoly', iconPath: 'assets/images/crypto/usdc.png', decimals: 6);
229 static const kaspa = CryptoCurrency(title: 'KAS', fullName: 'Kaspa', raw: 89, name: 'kas', iconPath: 'assets/images/kaspa_icon.png', decimals: 8);
230 static const digibyte = CryptoCurrency(title: 'DGB', fullName: 'DigiByte', raw: 90, name: 'dgb', iconPath: 'assets/images/digibyte.png', decimals: 8);
231 - static const usdtSol = CryptoCurrency(title: 'USDT', tag: 'SOL', fullName: 'USDT Tether', raw: 91, name: 'usdtsol', iconPath: 'assets/images/usdt_icon.png', decimals: 6);
232 - static const usdcTrc20 = CryptoCurrency(title: 'USDC', tag: 'TRX', fullName: 'USDC Coin', raw: 92, name: 'usdctrc20', iconPath: 'assets/images/usdc_icon.png', decimals: 6);
231 + static const usdtSol = CryptoCurrency(title: 'USDT', tag: 'SOL', fullName: 'USDT Tether', raw: 91, name: 'usdtsol', iconPath: 'assets/images/crypto/tether.png', decimals: 6);
232 + static const usdcTrc20 = CryptoCurrency(title: 'USDC', tag: 'TRX', fullName: 'USDC Coin', raw: 92, name: 'usdctrc20', iconPath: 'assets/images/crypto/usdc.png', decimals: 6);
233 static const tbtc = CryptoCurrency(title: 'tBTC', fullName: 'Testnet Bitcoin', raw: 93, name: 'tbtc', iconPath: 'assets/images/tbtc.png', decimals: 8);
234 - static const wow = CryptoCurrency(title: 'WOW', fullName: 'Wownero', raw: 94, name: 'wow', iconPath: 'assets/images/wownero_icon.png', decimals: 11);
234 + static const wow = CryptoCurrency(title: 'WOW', fullName: 'Wownero', raw: 94, name: 'wow', iconPath: 'assets/images/crypto/wownero.png', decimals: 11);
235 static const ton = CryptoCurrency(title: 'TON', fullName: 'Toncoin', raw: 95, name: 'ton', iconPath: 'assets/images/ton_icon.png', decimals: 8);
236 - static const zano = CryptoCurrency(title: 'ZANO', tag: 'ZANO', fullName: 'Zano', raw: 96, name: 'zano', iconPath: 'assets/images/zano_icon.png', decimals: 12);
236 + static const zano = CryptoCurrency(title: 'ZANO', tag: 'ZANO', fullName: 'Zano', raw: 96, name: 'zano', iconPath: 'assets/images/crypto/zano.png', decimals: 12);
237 static const flip = CryptoCurrency(title: 'FLIP', tag: 'ETH', fullName: 'Chainflip', raw: 97, name: 'flip', iconPath: 'assets/images/flip_icon.png', decimals: 18);
238 static const deuro = CryptoCurrency(title: 'DEURO', tag: 'ETH', fullName: 'Decentralized Euro', raw: 98, name: 'deuro', iconPath: 'assets/images/deuro_icon.png', decimals: 18);
239 - static const usdtbsc = CryptoCurrency(title: 'USDT', tag: 'BSC', fullName: 'USDT Binance coin', raw: 99, name: 'usdtbsc', iconPath: 'assets/images/usdtbsc_icon.png', decimals: 18);
239 + static const usdtbsc = CryptoCurrency(title: 'USDT', tag: 'BSC', fullName: 'USDT Binance coin', raw: 99, name: 'usdtbsc', iconPath: 'assets/images/crypto/tether.png', decimals: 18);
240 static const ndeps = CryptoCurrency(title: 'NDEPS', tag: 'ETH', fullName: 'Native Decentralized Euro Protocol Share', raw: 100, name: 'ndeps', iconPath: 'assets/images/ndeps_icon.png', decimals: 18);
241 static const deps = CryptoCurrency(title: 'DEPS', tag: 'ETH', fullName: 'Decentralized Euro Protocol Share', raw: 101, name: 'deps', iconPath: 'assets/images/deps_icon.png', decimals: 18);
242 static const kbtc = CryptoCurrency(title: 'KBTC', tag: 'ETH', fullName: 'Kraken Wrapped Bitcoin', raw: 102, name: 'kbtc', iconPath: 'assets/images/kbtc_icon.png', decimals: 8);
lib/cake_pay/src/cards/cake_pay_buy_card_page.dart
+9 -13
@@ -39,9 +39,8 @@ import 'package:keyboard_actions/keyboard_actions.dart';
39 import 'package:mobx/mobx.dart';
40
41 class CakePayBuyCardPage extends BasePage {
42 - CakePayBuyCardPage(
43 - this.cakePayBuyCardViewModel
44 - ) : _sendViewModel = cakePayBuyCardViewModel.sendViewModel,
42 + CakePayBuyCardPage(this.cakePayBuyCardViewModel)
43 + : _sendViewModel = cakePayBuyCardViewModel.sendViewModel,
44 _amountFieldFocus = FocusNode(),
45 _amountController = TextEditingController(),
46 _quantityFieldFocus = FocusNode(),
@@ -303,7 +302,8 @@ class CakePayBuyCardPage extends BasePage {
302 methods.length <= 1 || selected == null
303 ? const SizedBox.shrink()
304 : _buildPaymentMethodWidget(methods, selected),
306 - if (_sendViewModel.walletType == WalletType.litecoin && _sendViewModel.isMwebEnabled)
305 + if (_sendViewModel.walletType == WalletType.litecoin &&
306 + _sendViewModel.isMwebEnabled)
307 Observer(
308 builder: (_) => Padding(
309 padding: EdgeInsets.only(top: 10, bottom: 0, right: 20, left: 20),
@@ -323,8 +323,7 @@ class CakePayBuyCardPage extends BasePage {
323 captionColor: Theme.of(context).colorScheme.onSurfaceVariant,
324 borderColor: Theme.of(context).colorScheme.primary,
325 iconColor: Theme.of(context).colorScheme.primary,
326 - value:
327 - _sendViewModel.coinTypeToSpendFrom == UnspentCoinType.any,
326 + value: _sendViewModel.coinTypeToSpendFrom == UnspentCoinType.any,
327 onChanged: (bool? value) {
328 _sendViewModel.setAllowMwebCoins(value ?? false);
329 },
@@ -351,9 +350,8 @@ class CakePayBuyCardPage extends BasePage {
350 text: '(Dev) Simulate Purchasing Gift Card',
351 isDisabled: !cakePayBuyCardViewModel.isAmountSufficient ||
352 cakePayBuyCardViewModel.isPurchasing,
354 - isLoading:
355 - _sendViewModel.state is IsExecutingState ||
356 - cakePayBuyCardViewModel.isPurchasing,
353 + isLoading: _sendViewModel.state is IsExecutingState ||
354 + cakePayBuyCardViewModel.isPurchasing,
355 color: Theme.of(context).colorScheme.primary,
356 textColor: Theme.of(context).colorScheme.onPrimary,
357 ),
@@ -600,7 +598,7 @@ class CakePayBuyCardPage extends BasePage {
598 profileName: order?.cards.first.cardName ?? 'Cake Pay',
599 profileImageUrl: order?.cards.first.cardImagePath ?? '',
600 ),
603 - fiatAmount: '${order?.totalReceiveAmount}',
601 + fiatAmount: '${order?.totalReceiveAmount}',
602 ))
603 .toList();
604
@@ -613,7 +611,6 @@ class CakePayBuyCardPage extends BasePage {
611 return ConfirmSendingBottomSheet(
612 key: ValueKey('cake_pay_buy_page_confirm_sending_dialog_key'),
613 titleText: S.of(bottomSheetContext).confirm_transaction,
616 - currentTheme: currentTheme,
614 cakePayBuyCardViewModel: cakePayBuyCardViewModel,
615 paymentId: S.of(bottomSheetContext).payment_id,
616 paymentIdValue: cakePayBuyCardViewModel.order?.orderId,
@@ -627,7 +624,7 @@ class CakePayBuyCardPage extends BasePage {
624 fiatAmountValue: _sendViewModel.pendingTransactionFiatAmountFormatted,
625 fee: S.of(bottomSheetContext).send_fee,
626 feeValue: _sendViewModel.pendingTransaction!.feeFormatted,
630 - feeFiatAmount:_sendViewModel.pendingTransactionFeeFiatAmountFormatted,
627 + feeFiatAmount: _sendViewModel.pendingTransactionFeeFiatAmountFormatted,
628 outputs: displayingOutputs,
629 footerType: FooterType.slideActionButton,
630 slideActionButtonText:
@@ -732,7 +729,6 @@ class CakePayBuyCardPage extends BasePage {
729 context: context,
730 isDismissible: false,
731 builder: (BuildContext bottomSheetContext) => InfoBottomSheet(
735 - currentTheme: currentTheme,
732 footerType: FooterType.singleActionButton,
733 titleText: S.of(bottomSheetContext).proceed_on_device,
734 contentImage: 'assets/images/hardware_wallet/ledger_nano_x.png',
lib/cake_pay/src/cards/cake_pay_cards_page.dart
+15 -27
@@ -10,13 +10,10 @@ import 'package:cake_wallet/cake_pay/src/widgets/card_item.dart';
10 import 'package:cake_wallet/src/screens/dashboard/widgets/filter_widget.dart';
11 import 'package:cake_wallet/src/widgets/bottom_sheet/base_bottom_sheet_widget.dart';
12 import 'package:cake_wallet/src/widgets/bottom_sheet/cake_pay_card_info_bottom_sheet_widget.dart';
13 -import 'package:cake_wallet/src/widgets/cake_scrollbar.dart';
13 import 'package:cake_wallet/src/widgets/gradient_background.dart';
14 import 'package:cake_wallet/src/widgets/picker.dart';
15 import 'package:cake_wallet/src/widgets/tab_view_wrapper_widget.dart';
17 -import 'package:cake_wallet/themes/core/material_base_theme.dart';
16 import 'package:cake_wallet/typography.dart';
19 -import 'package:cake_wallet/utils/debounce.dart';
17 import 'package:cake_wallet/utils/feature_flag.dart';
18 import 'package:cake_wallet/utils/responsive_layout_util.dart';
19 import 'package:cake_wallet/utils/show_pop_up.dart';
@@ -94,10 +91,7 @@ class CakePayCardsPage extends BasePage {
91
92 @override
93 Widget body(BuildContext context) {
97 - return CakePayCardsPageBody(
98 - cardsListViewModel: _cardsListViewModel,
99 - currentTheme: currentTheme,
100 - titleColor: titleColor);
94 + return CakePayCardsPageBody(cardsListViewModel: _cardsListViewModel, titleColor: titleColor);
95 }
96 }
97
@@ -105,12 +99,10 @@ class CakePayCardsPageBody extends StatefulWidget {
99 const CakePayCardsPageBody({
100 super.key,
101 required CakePayCardsListViewModel cardsListViewModel,
108 - required this.currentTheme,
102 required this.titleColor,
103 }) : _cardsListViewModel = cardsListViewModel;
104
105 final CakePayCardsListViewModel _cardsListViewModel;
113 - final MaterialThemeBase currentTheme;
106 final Color? Function(BuildContext) titleColor;
107
108 @override
@@ -188,8 +180,8 @@ class _CakePayCardsPageBodyState extends State<CakePayCardsPageBody> {
180 ],
181 views: [
182 _MyCardsTab(
191 - cardsListViewModel: widget._cardsListViewModel,
192 - currentTheme: widget.currentTheme),
183 + cardsListViewModel: widget._cardsListViewModel,
184 + ),
185 _ShopTab(cardsListViewModel: widget._cardsListViewModel)
186 ]),
187 )
@@ -258,10 +250,9 @@ class _TrailingIcon extends StatelessWidget {
250 }
251
252 class _MyCardsTab extends StatefulWidget {
261 - const _MyCardsTab({required this.cardsListViewModel, required this.currentTheme});
253 + const _MyCardsTab({required this.cardsListViewModel});
254
255 final CakePayCardsListViewModel cardsListViewModel;
264 - final MaterialThemeBase currentTheme;
256
257 @override
258 State<_MyCardsTab> createState() => _MyCardsTabState();
@@ -322,18 +313,20 @@ class _MyCardsTabState extends State<_MyCardsTab> {
313 logoUrl: card.cardImageUrl,
314 title: card.name,
315 subTitle: '\$100',
325 - onTap: () => _showCardInfoBottomSheet(context, card, widget.currentTheme),
316 + onTap: () => _showCardInfoBottomSheet(context, card),
317 );
318 },
319 ),
320 ],
321 );
331 - return showThumb ? Scrollbar(
332 - key: ValueKey('cake_pay_my_cards_tab_scrollbar_key'),
333 - thumbVisibility: true,
334 - trackVisibility: true,
335 - child: userCardsList,
336 - ) : userCardsList;
322 + return showThumb
323 + ? Scrollbar(
324 + key: ValueKey('cake_pay_my_cards_tab_scrollbar_key'),
325 + thumbVisibility: true,
326 + trackVisibility: true,
327 + child: userCardsList,
328 + )
329 + : userCardsList;
330 }),
331 ),
332 ],
@@ -342,8 +335,7 @@ class _MyCardsTabState extends State<_MyCardsTab> {
335 }
336 }
337
345 -Future<void> _showCardInfoBottomSheet(
346 - BuildContext context, CakePayCard card, MaterialThemeBase currentTheme) async {
338 +Future<void> _showCardInfoBottomSheet(BuildContext context, CakePayCard card) async {
339 bool isReloadable = false; // TODO: replace with real logic
340 if (card.name.toLowerCase().contains('prepaid')) {
341 isReloadable = true;
@@ -360,7 +352,6 @@ Future<void> _showCardInfoBottomSheet(
352 titleText: 'Reloadable Card',
353 balance: '100 USD',
354 howToUse: card.howToUse,
363 - currentTheme: currentTheme,
355 footerType: FooterType.doubleActionButton,
356 applyBoxShadow: true,
357 contentImage: card.cardImageUrl,
@@ -376,7 +367,6 @@ Future<void> _showCardInfoBottomSheet(
367 titleText: card.name,
368 balance: '500 USD',
369 howToUse: card.howToUse,
379 - currentTheme: currentTheme,
370 footerType: FooterType.singleActionButton,
371 applyBoxShadow: true,
372 contentImage: card.cardImageUrl,
@@ -400,7 +390,6 @@ class _ShopTab extends StatefulWidget {
390 class _ShopTabState extends State<_ShopTab> {
391 late final ScrollController _scroll;
392
403 -
393 @override
394 void initState() {
395 super.initState();
@@ -466,8 +455,7 @@ class _ShopTabState extends State<_ShopTab> {
455 return const _Loading();
456 }
457
469 - if (vendors.isEmpty)
470 - return Center(child: Text(S.of(context).no_cards_found));
458 + if (vendors.isEmpty) return Center(child: Text(S.of(context).no_cards_found));
459
460 final loadingMore = viewModel.isLoadingNextPage;
461 final showThumb = vendors.length > 3;
lib/di.dart
-2
@@ -1169,7 +1169,6 @@ Future<void> setup({
1169 getIt.registerFactoryParam<SwapConfirmationBottomSheet, PaymentFlowResult, void>(
1170 (paymentFlowResult, _) => SwapConfirmationBottomSheet(
1171 paymentFlowResult: paymentFlowResult,
1172 - currentTheme: getIt.get<AppStore>().themeStore.currentTheme,
1172 exchangeViewModel: getIt.get<ExchangeViewModel>(),
1173 authService: getIt.get<AuthService>(),
1174 ),
@@ -1177,7 +1176,6 @@ Future<void> setup({
1176
1177 getIt.registerFactory<SwapDetailsBottomSheet>(
1178 () => SwapDetailsBottomSheet(
1180 - currentTheme: getIt.get<AppStore>().themeStore.currentTheme,
1179 exchangeTradeViewModel: getIt.get<ExchangeTradeViewModel>(),
1180 ),
1181 );
lib/entities/preferences_key.dart
+3
@@ -37,6 +37,9 @@ class PreferencesKey {
37 static const exchangeStatusKey = 'exchange_status';
38 static const currentTheme = 'current_theme';
39 static const themeMode = 'theme_mode';
40 + static const blackThemeOled = 'black_theme_oled_enabled';
41 + static const savedDarkTheme = 'saved_dark_theme';
42 + static const savedLightTheme = 'saved_light_theme';
43 static const displayActionListModeKey = 'display_list_mode';
44 static const currentPinLength = 'current_pin_length';
45 static const currentLanguageCode = 'language_code';
lib/nostr/nostr_api.dart
+10 -3
@@ -29,7 +29,10 @@ class NostrProfileHandler {
29 }
30
31 static Future<UserMetadata?> processRelays(
32 - BuildContext context, ProfilePointer profile, String nip05Address) async {
32 + BuildContext context,
33 + ProfilePointer profile,
34 + String nip05Address,
35 + ) async {
36 String userDomain = _extractDomain(nip05Address);
37 const int metaData = 0;
38
@@ -45,7 +48,8 @@ class NostrProfileHandler {
48 }
49 await _showErrorDialog(context, S.of(context).no_relays, S.of(context).no_relay_on_domain);
50
48 - String? chosenRelayUrl = await _showRelayChoiceDialog(context, profile.relays ?? []);
51 + String? chosenRelayUrl =
52 + await _showRelayChoiceDialog(context, profile.relays ?? []);
53 if (chosenRelayUrl != null) {
54 final userData = await _fetchInfoFromRelay(chosenRelayUrl, profile.pubkey, [metaData]);
55 if (userData != null) {
@@ -121,7 +125,10 @@ class NostrProfileHandler {
125 }
126 }
127
124 - static Future<String?> _showRelayChoiceDialog(BuildContext context, List<String> relays) async {
128 + static Future<String?> _showRelayChoiceDialog(
129 + BuildContext context,
130 + List<String> relays,
131 + ) async {
132 String? selectedRelay;
133
134 if (context.mounted) {
lib/src/screens/base_page.dart
+1 -1
@@ -72,7 +72,7 @@ abstract class BasePage extends StatelessWidget {
72
73 Widget backButton(BuildContext context) => Icon(
74 Icons.arrow_back_ios,
75 - color: pageIconColor(context),
75 + color: Theme.of(context).colorScheme.primary,
76 size: 16,
77 );
78
lib/src/screens/buy/buy_sell_page.dart
+14 -11
@@ -78,11 +78,10 @@ class BuySellPage extends BasePage {
78 Widget? leading(BuildContext context) {
79 final _backButton = Icon(
80 Icons.arrow_back_ios,
81 - color: Theme.of(context).colorScheme.onSurface,
81 + color: Theme.of(context).colorScheme.primary,
82 size: 16,
83 );
84 - final _closeButton =
85 - buySellViewModel.isDarkTheme ? closeButtonImageDarkTheme : closeButtonImage;
84 + final _closeButton = currentTheme.isDark ? closeButtonImageDarkTheme : closeButtonImage;
85
86 bool isMobileView = responsiveLayoutUtil.shouldRenderMobileUI;
87
@@ -211,7 +210,7 @@ class BuySellPage extends BasePage {
210 borderRadius: 30,
211 padding: EdgeInsets.symmetric(horizontal: 24, vertical: 8),
212 leadingIcon: Icons.arrow_forward_ios,
214 - isDarkTheme: buySellViewModel.isDarkTheme);
213 + isDarkTheme: currentTheme.isDark);
214 }
215 if (buySellViewModel.paymentMethodState is PaymentMethodFailed) {
216 return OptionTilePlaceholder(errorText: 'No payment methods available', borderRadius: 30);
@@ -225,7 +224,7 @@ class BuySellPage extends BasePage {
224 title: selectedPaymentMethod.title,
225 onPressed: () => _pickPaymentMethod(context),
226 leadingIcon: Icons.arrow_forward_ios,
228 - isLightMode: !buySellViewModel.isDarkTheme,
227 + isLightMode: !currentTheme.isDark,
228 borderRadius: 30,
229 padding: EdgeInsets.symmetric(horizontal: 24, vertical: 8),
230 titleTextStyle: Theme.of(context).textTheme.titleMedium?.copyWith(
@@ -321,8 +320,8 @@ class BuySellPage extends BasePage {
320 _cryptoAddressFocus.addListener(() async {
321 if (!_cryptoAddressFocus.hasFocus && cryptoAddressController.text.isNotEmpty) {
322 final domain = cryptoAddressController.text;
324 - buySellViewModel.cryptoCurrencyAddress =
325 - await fetchParsedAddress(context, domain, buySellViewModel.cryptoCurrency);
323 + buySellViewModel.cryptoCurrencyAddress = await fetchParsedAddress(
324 + context, domain, buySellViewModel.cryptoCurrency);
325 }
326 });
327
@@ -404,7 +403,7 @@ class BuySellPage extends BasePage {
403 onCurrencySelected: (currency) => buySellViewModel.changeFiatCurrency(currency: currency),
404 imageArrow: Image.asset(
405 'assets/images/arrow_bottom_purple_icon.png',
407 - color: Theme.of(context).colorScheme.onSurface,
406 + color: Theme.of(context).colorScheme.primary,
407 height: 8,
408 ),
409 currencyButtonColor: Colors.transparent,
@@ -441,7 +440,7 @@ class BuySellPage extends BasePage {
440 onCurrencySelected: (currency) => buySellViewModel.changeCryptoCurrency(currency: currency),
441 imageArrow: Image.asset(
442 'assets/images/arrow_bottom_cake_green.png',
444 - color: Theme.of(context).colorScheme.onSurface,
443 + color: Theme.of(context).colorScheme.primary,
444 height: 8,
445 ),
446 currencyButtonColor: Colors.transparent,
@@ -508,8 +507,12 @@ class BuySellPage extends BasePage {
507 }
508
509 Future<String> fetchParsedAddress(
511 - BuildContext context, String domain, CryptoCurrency currency) async {
512 - final parsedAddress = await getIt.get<AddressResolver>().resolve(context, domain, currency);
510 + BuildContext context,
511 + String domain,
512 + CryptoCurrency currency,
513 + ) async {
514 + final parsedAddress =
515 + await getIt.get<AddressResolver>().resolve(context, domain, currency);
516 final address = await extractAddressFromParsed(context, parsedAddress);
517 return address;
518 }
lib/src/screens/connect_device/connect_device_page.dart
-1
@@ -316,7 +316,6 @@ class ConnectDevicePageBodyState extends State<ConnectDevicePageBody> {
316 isScrollControlled: true,
317 builder: (BuildContext bottomSheetContext) => InfoStepsBottomSheet(
318 titleText: S.of(context).how_to_connect,
319 - currentTheme: widget.currentTheme,
319 steps: [
320 InfoStep('${S.of(context).step} 1', S.of(context).connect_hw_info_step_1),
321 InfoStep('${S.of(context).step} 2', S.of(context).connect_hw_info_step_2),
lib/src/screens/connect_device/monero_hardware_wallet_options_page.dart
+1 -1
@@ -31,7 +31,7 @@ class _MoneroHardwareWalletOptionsForm extends StatefulWidget {
31 const _MoneroHardwareWalletOptionsForm(this._walletHardwareRestoreVM);
32
33 final WalletHardwareRestoreViewModel _walletHardwareRestoreVM;
34 -
34 +
35 @override
36 _MoneroHardwareWalletOptionsFormState createState() =>
37 _MoneroHardwareWalletOptionsFormState(_walletHardwareRestoreVM);
lib/src/screens/connect_device/select_device_manufacturer_page.dart
-2
@@ -109,7 +109,6 @@ class SelectDeviceManufacturerPage extends BasePage {
109 arguments: [manufacturer.hardwareWalletType]);
110 }
111 },
112 - isDarkTheme: currentTheme.isDark,
112 ),
113 ),
114 ),
@@ -127,7 +126,6 @@ class SelectDeviceManufacturerPage extends BasePage {
126 onPressed: () =>
127 Fluttertoast.showToast(msg: 'One more tap and it might work'),
128 // Ester egg
130 - isDarkTheme: currentTheme.isDark,
129 isUnavailable: true,
130 ),
131 ),
lib/src/screens/connect_device/widgets/manufacturer_option_tile.dart
+3 -9
@@ -1,11 +1,10 @@
1 -import 'package:cake_wallet/themes/utils/custom_theme_colors.dart';
1 +import 'package:cake_wallet/themes/core/theme_extension.dart';
2 import 'package:flutter/material.dart';
3
4 class ManufacturerOptionTile extends StatelessWidget {
5 const ManufacturerOptionTile({
6 required this.onPressed,
7 required this.image,
8 - required this.isDarkTheme,
8 this.tag,
9 this.isUnavailable = false,
10 });
@@ -14,7 +13,6 @@ class ManufacturerOptionTile extends StatelessWidget {
13 final Widget image;
14 final String? tag;
15 final bool isUnavailable;
17 - final bool isDarkTheme;
16
17 @override
18 Widget build(BuildContext context) => GestureDetector(
@@ -28,12 +26,8 @@ class ManufacturerOptionTile extends StatelessWidget {
26 borderRadius: BorderRadius.circular(12),
27 gradient: LinearGradient(
28 colors: [
31 - isDarkTheme
32 - ? CustomThemeColors.cardGradientColorPrimaryDark
33 - : CustomThemeColors.cardGradientColorPrimaryLight,
34 - isDarkTheme
35 - ? CustomThemeColors.cardGradientColorSecondaryDark
36 - : CustomThemeColors.cardGradientColorSecondaryLight,
29 + context.customColors.cardGradientColorPrimary,
30 + context.customColors.cardGradientColorSecondary,
31 ],
32 begin: Alignment.topCenter,
33 end: Alignment.bottomCenter,
lib/src/screens/contact/contact_page.dart
+8 -7
@@ -144,13 +144,14 @@ class ContactPage extends BasePage {
144 void _presentCurrencyPicker(BuildContext context) {
145 showPopUp<void>(
146 builder: (_) => CurrencyPicker(
147 - selectedAtIndex: contactViewModel.currency != null
148 - ? contactViewModel.currencies.indexOf(contactViewModel.currency!)
149 - : -1,
150 - items: contactViewModel.currencies,
151 - title: S.of(context).please_select,
152 - hintText: S.of(context).search_currency,
153 - onItemSelected: (Currency item) => contactViewModel.currency = item as CryptoCurrency),
147 + selectedAtIndex: contactViewModel.currency != null
148 + ? contactViewModel.currencies.indexOf(contactViewModel.currency!)
149 + : -1,
150 + items: contactViewModel.currencies,
151 + title: S.of(context).please_select,
152 + hintText: S.of(context).search_currency,
153 + onItemSelected: (Currency item) => contactViewModel.currency = item as CryptoCurrency,
154 + ),
155 context: context,
156 );
157 }
lib/src/screens/dashboard/dashboard_page.dart
+1 -2
@@ -174,7 +174,7 @@ class _DashboardPageView extends BasePage {
174 label: S.of(context).wallet_menu,
175 child: SvgPicture.asset(
176 'assets/images/menu.svg',
177 - color: Theme.of(context).colorScheme.onSurface,
177 + color: Theme.of(context).colorScheme.primary,
178 ),
179 ),
180 ),
@@ -262,7 +262,6 @@ class _DashboardPageView extends BasePage {
262 ),
263 NavigationDock(
264 dashboardViewModel: dashboardViewModel,
265 - currentTheme: currentTheme,
265 )
266 ],
267 ),
lib/src/screens/dashboard/desktop_widgets/desktop_wallet_selection_dropdown.dart
+14 -14
@@ -30,22 +30,22 @@ class DesktopWalletSelectionDropDown extends StatefulWidget {
30 }
31
32 class _DesktopWalletSelectionDropDownState extends State<DesktopWalletSelectionDropDown> {
33 - final moneroIcon = Image.asset('assets/images/monero_logo.png', height: 24, width: 24);
34 - final bitcoinIcon = Image.asset('assets/images/bitcoin.png', height: 24, width: 24);
33 + final moneroIcon = Image.asset('assets/images/crypto/monero.png', height: 24, width: 24);
34 + final bitcoinIcon = Image.asset('assets/images/crypto/bitcoin.png', height: 24, width: 24);
35 final tBitcoinIcon = Image.asset('assets/images/tbtc.png', height: 24, width: 24);
36 - final litecoinIcon = Image.asset('assets/images/litecoin_icon.png', height: 24, width: 24);
36 + final litecoinIcon = Image.asset('assets/images/crypto/litecoin.png', height: 24, width: 24);
37 final havenIcon = Image.asset('assets/images/haven_logo.png', height: 24, width: 24);
38 - final ethereumIcon = Image.asset('assets/images/eth_icon.png', height: 24, width: 24);
39 - final polygonIcon = Image.asset('assets/images/matic_icon.png', height: 24, width: 24);
40 - final bitcoinCashIcon = Image.asset('assets/images/bch_icon.png', height: 24, width: 24);
41 - final nanoIcon = Image.asset('assets/images/nano_icon.png', height: 24, width: 24);
42 - final bananoIcon = Image.asset('assets/images/nano_icon.png', height: 24, width: 24);
43 - final solanaIcon = Image.asset('assets/images/sol_icon.png', height: 24, width: 24);
44 - final tronIcon = Image.asset('assets/images/trx_icon.png', height: 24, width: 24);
45 - final wowneroIcon = Image.asset('assets/images/wownero_icon.png', height: 24, width: 24);
46 - final zanoIcon = Image.asset('assets/images/zano_icon.png', height: 24, width: 24);
47 - final decredIcon = Image.asset('assets/images/decred_icon.png', height: 24, width: 24);
48 - final dogeIcon = Image.asset('assets/images/doge_icon.png', height: 24, width: 24);
38 + final ethereumIcon = Image.asset('assets/images/crypto/ethereum.png', height: 24, width: 24);
39 + final polygonIcon = Image.asset('assets/images/crypto/polygon.png', height: 24, width: 24);
40 + final bitcoinCashIcon = Image.asset('assets/images/crypto/bitcoin-cash.png', height: 24, width: 24);
41 + final nanoIcon = Image.asset('assets/images/crypto/nano.png', height: 24, width: 24);
42 + final bananoIcon = Image.asset('assets/images/crypto/nano.png', height: 24, width: 24);
43 + final solanaIcon = Image.asset('assets/images/crypto/solana.png', height: 24, width: 24);
44 + final tronIcon = Image.asset('assets/images/crypto/tron.png', height: 24, width: 24);
45 + final wowneroIcon = Image.asset('assets/images/crypto/wownero.png', height: 24, width: 24);
46 + final zanoIcon = Image.asset('assets/images/crypto/zano.png', height: 24, width: 24);
47 + final decredIcon = Image.asset('assets/images/crypto/decred.png', height: 24, width: 24);
48 + final dogeIcon = Image.asset('assets/images/crypto/dogecoin.png', height: 24, width: 24);
49 final nonWalletTypeIcon = Image.asset('assets/images/close.png', height: 24, width: 24);
50
51 Image _newWalletImage(BuildContext context) => Image.asset(
lib/src/screens/dashboard/edit_token_page.dart
+4 -15
@@ -10,8 +10,7 @@ import 'package:cake_wallet/src/widgets/checkbox_widget.dart';
10 import 'package:cake_wallet/src/widgets/primary_button.dart';
11 import 'package:cake_wallet/src/widgets/scollable_with_bottom_section.dart';
12 import 'package:cake_wallet/src/widgets/warning_box_widget.dart';
13 -import 'package:cake_wallet/themes/core/material_base_theme.dart';
14 -import 'package:cake_wallet/themes/utils/custom_theme_colors.dart';
13 +import 'package:cake_wallet/themes/core/theme_extension.dart';
14 import 'package:cake_wallet/utils/show_pop_up.dart';
15 import 'package:cake_wallet/view_model/dashboard/home_settings_view_model.dart';
16 import 'package:cw_core/crypto_currency.dart';
@@ -44,7 +43,6 @@ class EditTokenPage extends BasePage {
43 homeSettingsViewModel: homeSettingsViewModel,
44 token: token,
45 initialContractAddress: initialContractAddress,
47 - currentTheme: currentTheme,
46 );
47 }
48 }
@@ -55,13 +53,11 @@ class EditTokenPageBody extends StatefulWidget {
53 required this.homeSettingsViewModel,
54 this.token,
55 this.initialContractAddress,
58 - required this.currentTheme,
56 }) : super(key: key);
57
58 final HomeSettingsViewModel homeSettingsViewModel;
59 final CryptoCurrency? token;
60 final String? initialContractAddress;
64 - final MaterialThemeBase currentTheme;
61
62 @override
63 State<EditTokenPageBody> createState() => _EditTokenPageBodyState();
@@ -128,8 +124,7 @@ class _EditTokenPageBodyState extends State<EditTokenPageBody> {
124 void _checkIfTokenIsVerified(String? contractAddress) {
125 if (contractAddress == null) return;
126
131 - final isVerified =
132 - widget.homeSettingsViewModel.checkIfTokenIsWhitelisted(contractAddress);
127 + final isVerified = widget.homeSettingsViewModel.checkIfTokenIsWhitelisted(contractAddress);
128
129 if (!mounted) return;
130 setState(() {
@@ -151,13 +146,10 @@ class _EditTokenPageBodyState extends State<EditTokenPageBody> {
146 WarningBox(
147 padding: EdgeInsets.all(16),
148 content: S.of(context).add_token_warning,
154 - currentTheme: widget.currentTheme,
149 showBorder: false,
150 textWeight: FontWeight.w500,
151 textAlign: TextAlign.start,
158 - textColor: widget.currentTheme.isDark
159 - ? CustomThemeColors.warningOutlineColorDark
160 - : CustomThemeColors.warningOutlineColorLight,
152 + textColor: context.customColors.warningOutlineColor,
153 iconSize: 22,
154 iconSpacing: 16,
155 ),
@@ -443,12 +435,9 @@ class _EditTokenPageBodyState extends State<EditTokenPageBody> {
435 ? WarningBox(
436 padding: EdgeInsets.all(16),
437 content: S.of(context).tokens_strong_warning,
446 - currentTheme: widget.currentTheme,
438 showBorder: false,
439 textWeight: FontWeight.w500,
449 - textColor: widget.currentTheme.isDark
450 - ? CustomThemeColors.warningOutlineColorDark
451 - : CustomThemeColors.warningOutlineColorLight,
440 + textColor: context.customColors.warningOutlineColor,
441 showIcon: false,
442 )
443 : Text(
lib/src/screens/dashboard/pages/address_page.dart
+2 -3
@@ -60,7 +60,7 @@ class AddressPage extends BasePage {
60 Widget? leading(BuildContext context) {
61 final _backButton = Icon(
62 Icons.arrow_back_ios,
63 - color: titleColor(context),
63 + color: Theme.of(context).colorScheme.primary,
64 size: 16,
65 );
66 final _closeButton = currentTheme.isDark ? closeButtonImageDarkTheme : closeButtonImage;
@@ -114,7 +114,7 @@ class AddressPage extends BasePage {
114 context: context,
115 );
116 },
117 - icon: Icon(Icons.share, size: 20, color: pageIconColor(context)),
117 + icon: Icon(Icons.share, size: 20, color: Theme.of(context).colorScheme.primary),
118 ),
119 ),
120 );
@@ -150,7 +150,6 @@ class AddressPage extends BasePage {
150 addressListViewModel: addressListViewModel,
151 amountTextFieldFocusNode: _cryptoAmountFocus,
152 amountController: _amountController,
153 - currentTheme: dashboardViewModel.appStore.themeStore.currentTheme,
153 ),
154 ),
155 ),
lib/src/screens/dashboard/pages/balance/balance_row_widget.dart
+16 -20
@@ -6,7 +6,7 @@ import 'package:cake_wallet/generated/i18n.dart';
6 import 'package:cake_wallet/routes.dart';
7 import 'package:cake_wallet/src/screens/exchange_trade/information_page.dart';
8 import 'package:cake_wallet/src/widgets/cake_image_widget.dart';
9 -import 'package:cake_wallet/themes/utils/custom_theme_colors.dart';
9 +import 'package:cake_wallet/themes/core/theme_extension.dart';
10 import 'package:cake_wallet/utils/payment_request.dart';
11 import 'package:cake_wallet/utils/show_pop_up.dart';
12 import 'package:cake_wallet/view_model/dashboard/dashboard_view_model.dart';
@@ -71,22 +71,20 @@ class BalanceRowWidget extends StatelessWidget {
71 decoration: BoxDecoration(
72 borderRadius: BorderRadius.circular(15.0),
73 gradient: LinearGradient(
74 - colors: [
75 - dashboardViewModel.isDarkTheme
76 - ? CustomThemeColors.cardGradientColorPrimaryDark
77 - : CustomThemeColors.cardGradientColorPrimaryLight,
78 - dashboardViewModel.isDarkTheme
79 - ? CustomThemeColors.cardGradientColorSecondaryDark
80 - : CustomThemeColors.cardGradientColorSecondaryLight,
81 - ],
82 - begin: Alignment.topCenter,
83 - end: Alignment.bottomCenter,
84 - ),
74 + colors: [
75 + context.customColors.cardGradientColorPrimary,
76 + context.customColors.cardGradientColorSecondary,
77 + ],
78 + begin: Alignment.topCenter,
79 + end: Alignment.bottomCenter,
80 + ),
81 ),
82 child: TextButton(
83 onPressed: _showToast,
84 onLongPress: () => dashboardViewModel.balanceViewModel.switchBalanceValue(),
85 style: TextButton.styleFrom(
86 + side: BorderSide(
87 + width: 1.25, color: Theme.of(context).colorScheme.surfaceContainerHigh),
88 shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(15)),
89 ),
90 child: Container(
@@ -328,12 +326,8 @@ class BalanceRowWidget extends StatelessWidget {
326 borderRadius: BorderRadius.circular(15),
327 gradient: LinearGradient(
328 colors: [
331 - dashboardViewModel.isDarkTheme
332 - ? CustomThemeColors.cardGradientColorPrimaryDark
333 - : CustomThemeColors.cardGradientColorPrimaryLight,
334 - dashboardViewModel.isDarkTheme
335 - ? CustomThemeColors.cardGradientColorSecondaryDark
336 - : CustomThemeColors.cardGradientColorSecondaryLight,
329 + context.customColors.cardGradientColorPrimary,
330 + context.customColors.cardGradientColorSecondary,
331 ],
332 begin: Alignment.topCenter,
333 end: Alignment.bottomCenter,
@@ -531,7 +525,8 @@ class BalanceRowWidget extends StatelessWidget {
525 style: OutlinedButton.styleFrom(
526 backgroundColor: Theme.of(context).colorScheme.primary,
527 side: BorderSide(
534 - color: Theme.of(context).colorScheme.outlineVariant.withAlpha(0),
528 + color:
529 + Theme.of(context).colorScheme.outlineVariant.withAlpha(0),
530 width: 0,
531 ),
532 shape: RoundedRectangleBorder(
@@ -588,7 +583,8 @@ class BalanceRowWidget extends StatelessWidget {
583 style: OutlinedButton.styleFrom(
584 backgroundColor: Theme.of(context).colorScheme.surface,
585 side: BorderSide(
591 - color: Theme.of(context).colorScheme.outlineVariant.withAlpha(0),
586 + color:
587 + Theme.of(context).colorScheme.outlineVariant.withAlpha(0),
588 width: 0,
589 ),
590 shape: RoundedRectangleBorder(
lib/src/screens/dashboard/pages/balance/crypto_balance_widget.dart
+2 -9
@@ -9,6 +9,7 @@ import 'package:cake_wallet/src/widgets/alert_with_two_actions.dart';
9 import 'package:cake_wallet/src/widgets/dashboard_card_widget.dart';
10 import 'package:cake_wallet/src/widgets/introducing_card.dart';
11 import 'package:cake_wallet/src/widgets/standard_switch.dart';
12 +import 'package:cake_wallet/themes/core/theme_extension.dart';
13 import 'package:cake_wallet/utils/feature_flag.dart';
14 import 'package:cake_wallet/utils/show_pop_up.dart';
15 import 'package:cake_wallet/view_model/dashboard/dashboard_view_model.dart';
@@ -57,7 +58,6 @@ class CryptoBalanceWidget extends StatelessWidget {
58 return Padding(
59 padding: const EdgeInsets.fromLTRB(16, 0, 16, 16),
60 child: DashBoardRoundedCardWidget(
60 - isDarkTheme: dashboardViewModel.isDarkTheme,
61 title: "Invalid monero bindings",
62 subTitle: dashboardViewModel.getMoneroError.toString(),
63 ),
@@ -72,7 +72,6 @@ class CryptoBalanceWidget extends StatelessWidget {
72 return Padding(
73 padding: const EdgeInsets.fromLTRB(16, 0, 16, 16),
74 child: DashBoardRoundedCardWidget(
75 - isDarkTheme: dashboardViewModel.isDarkTheme,
75 title: "Invalid wownero bindings",
76 subTitle: dashboardViewModel.getWowneroError.toString(),
77 ),
@@ -157,7 +156,6 @@ class CryptoBalanceWidget extends StatelessWidget {
156 return Padding(
157 padding: const EdgeInsets.fromLTRB(16, 0, 16, 8),
158 child: DashBoardRoundedCardWidget(
160 - isDarkTheme: dashboardViewModel.isDarkTheme,
159 title: S.of(context).rep_warning,
160 subTitle: S.of(context).rep_warning_sub,
161 onTap: () => Navigator.of(context).pushNamed(Routes.changeRep),
@@ -220,7 +218,6 @@ class CryptoBalanceWidget extends StatelessWidget {
218 Padding(
219 padding: const EdgeInsets.fromLTRB(16, 0, 16, 8),
220 child: DashBoardRoundedCardWidget(
223 - isDarkTheme: dashboardViewModel.isDarkTheme,
221 customBorder: 30,
222 title: "This wallet has encountered an issue",
223 subTitle: "Here are the things that you should note:\n - " +
@@ -233,7 +230,6 @@ class CryptoBalanceWidget extends StatelessWidget {
230 Padding(
231 padding: const EdgeInsets.fromLTRB(16, 0, 16, 0),
232 child: DashBoardRoundedCardWidget(
236 - isDarkTheme: dashboardViewModel.isDarkTheme,
233 shadowBlur: dashboardViewModel.getShadowBlur(),
234 shadowSpread: dashboardViewModel.getShadowSpread(),
235 marginV: 0,
@@ -285,7 +281,7 @@ class CryptoBalanceWidget extends StatelessWidget {
281 ],
282 ),
283 onTap: () => _toggleSilentPaymentsScanning(context),
288 - image: !dashboardViewModel.appStore.themeStore.currentTheme.isDark
284 + image: !context.currentTheme.isDark
285 ? Image.asset(btcLockLight, height: 48)
286 : Image.asset(btcLockDark, height: 48),
287 ),
@@ -296,7 +292,6 @@ class CryptoBalanceWidget extends StatelessWidget {
292 Padding(
293 padding: const EdgeInsets.fromLTRB(16, 0, 16, 8),
294 child: InfoCard(
299 - isDarkTheme: dashboardViewModel.isDarkTheme,
295 title: S.of(context).litecoin_mweb,
296 description: S.of(context).litecoin_mweb_description,
297 leftButtonTitle: S.of(context).litecoin_mweb_dismiss,
@@ -327,7 +322,6 @@ class CryptoBalanceWidget extends StatelessWidget {
322 Padding(
323 padding: const EdgeInsets.fromLTRB(16, 0, 16, 8),
324 child: InfoCard(
330 - isDarkTheme: dashboardViewModel.isDarkTheme,
325 title: S.of(context).synchronizing,
326 description: S.of(context).decred_info_card_details,
327 image: 'assets/images/dcr_icon.png',
@@ -344,7 +338,6 @@ class CryptoBalanceWidget extends StatelessWidget {
338 Padding(
339 padding: const EdgeInsets.fromLTRB(16, 0, 16, 8),
340 child: InfoCard(
347 - isDarkTheme: dashboardViewModel.isDarkTheme,
341 title: "Payjoin",
342 description: S.of(context).payjoin_card_content,
343 hintWidget: GestureDetector(
lib/src/screens/dashboard/pages/cake_features_page.dart
+3 -6
@@ -40,7 +40,6 @@ class CakeFeaturesPage extends StatelessWidget {
40 children: <Widget>[
41 SizedBox(height: 2),
42 DashBoardRoundedCardWidget(
43 - isDarkTheme: dashboardViewModel.isDarkTheme,
43 shadowBlur: dashboardViewModel.getShadowBlur(),
44 shadowSpread: dashboardViewModel.getShadowSpread(),
45 onTap: () {
@@ -53,16 +52,15 @@ class CakeFeaturesPage extends StatelessWidget {
52 title: 'Cake Pay',
53 subTitle: S.of(context).cake_pay_subtitle,
54 image: Image.asset(
56 - 'assets/images/cards.png',
57 - height: 100,
58 - width: 115,
55 + 'assets/images/cakepay.png',
56 + height: 74,
57 + width: 70,
58 fit: BoxFit.cover,
59 ),
60 ),
61 Observer(builder: (_) {
62 if (dashboardViewModel.type == WalletType.ethereum) {
63 return DashBoardRoundedCardWidget(
65 - isDarkTheme: dashboardViewModel.isDarkTheme,
64 shadowBlur: dashboardViewModel.getShadowBlur(),
65 shadowSpread: dashboardViewModel.getShadowSpread(),
66 onTap: () => Navigator.of(context).pushNamed(Routes.dEuroSavings),
@@ -80,7 +78,6 @@ class CakeFeaturesPage extends StatelessWidget {
78 return const SizedBox();
79 }),
80 DashBoardRoundedCardWidget(
83 - isDarkTheme: dashboardViewModel.isDarkTheme,
81 shadowBlur: dashboardViewModel.getShadowBlur(),
82 shadowSpread: dashboardViewModel.getShadowSpread(),
83 onTap: () => _launchUrl("cake.nano-gpt.com"),
lib/src/screens/dashboard/pages/navigation_dock.dart
+21 -32
@@ -1,7 +1,6 @@
1 import 'dart:ui';
2 import 'package:cake_wallet/entities/main_actions.dart';
3 -import 'package:cake_wallet/themes/core/material_base_theme.dart';
4 -import 'package:cake_wallet/themes/utils/custom_theme_colors.dart';
3 +import 'package:cake_wallet/themes/core/theme_extension.dart';
4 import 'package:flutter/material.dart';
5 import 'package:cake_wallet/view_model/dashboard/dashboard_view_model.dart';
6 import 'package:cake_wallet/src/screens/dashboard/widgets/action_button.dart';
@@ -10,11 +9,9 @@ import 'package:flutter_mobx/flutter_mobx.dart';
9 class NavigationDock extends StatelessWidget {
10 const NavigationDock({
11 required this.dashboardViewModel,
13 - required this.currentTheme,
12 });
13
14 final DashboardViewModel dashboardViewModel;
17 - final MaterialThemeBase currentTheme;
15
16 @override
17 Widget build(BuildContext context) {
@@ -24,13 +21,15 @@ class NavigationDock extends StatelessWidget {
21 return Container(
22 height: 150,
23 alignment: Alignment.bottomCenter,
27 - decoration: dashboardViewModel.settingsStore.backgroundImage.isEmpty ? BoxDecoration(
28 - gradient: LinearGradient(
29 - begin: Alignment.topCenter,
30 - end: Alignment.bottomCenter,
31 - colors: _getColors(context, !currentTheme.isDark),
32 - ),
33 - ) : null,
24 + decoration: dashboardViewModel.settingsStore.backgroundImage.isEmpty
25 + ? BoxDecoration(
26 + gradient: LinearGradient(
27 + begin: Alignment.topCenter,
28 + end: Alignment.bottomCenter,
29 + colors: _getColors(context),
30 + ),
31 + )
32 + : null,
33 //color: Colors.transparent,
34 child: Container(
35 decoration: BoxDecoration(
@@ -38,7 +37,7 @@ class NavigationDock extends StatelessWidget {
37 gradient: LinearGradient(
38 begin: Alignment.topCenter,
39 end: Alignment.bottomCenter,
41 - colors: _getColors(context, !currentTheme.isDark),
40 + colors: _getColors(context),
41 ),
42 ),
43 margin: const EdgeInsets.only(left: 8, right: 8, bottom: 16),
@@ -95,25 +94,15 @@ class NavigationDock extends StatelessWidget {
94 );
95 }
96
98 - List<Color> _getColors(BuildContext context, bool isBright) {
99 - return isBright
100 - ? <Color>[
101 - CustomThemeColors.backgroundGradientColorLight.withAlpha(5),
102 - CustomThemeColors.backgroundGradientColorLight.withAlpha(50),
103 - CustomThemeColors.backgroundGradientColorLight.withAlpha(125),
104 - CustomThemeColors.backgroundGradientColorLight.withAlpha(150),
105 - CustomThemeColors.backgroundGradientColorLight.withAlpha(200),
106 - CustomThemeColors.backgroundGradientColorLight,
107 - CustomThemeColors.backgroundGradientColorLight
108 - ]
109 - : <Color>[
110 - CustomThemeColors.backgroundGradientColorDark.withAlpha(5),
111 - CustomThemeColors.backgroundGradientColorDark.withAlpha(50),
112 - CustomThemeColors.backgroundGradientColorDark.withAlpha(125),
113 - CustomThemeColors.backgroundGradientColorDark.withAlpha(150),
114 - CustomThemeColors.backgroundGradientColorDark.withAlpha(200),
115 - CustomThemeColors.backgroundGradientColorDark,
116 - CustomThemeColors.backgroundGradientColorDark
117 - ];
97 + List<Color> _getColors(BuildContext context) {
98 + return <Color>[
99 + context.customColors.backgroundGradientColor.withAlpha(5),
100 + context.customColors.backgroundGradientColor.withAlpha(50),
101 + context.customColors.backgroundGradientColor.withAlpha(125),
102 + context.customColors.backgroundGradientColor.withAlpha(150),
103 + context.customColors.backgroundGradientColor.withAlpha(200),
104 + context.customColors.backgroundGradientColor,
105 + context.customColors.backgroundGradientColor,
106 + ];
107 }
108 }
lib/src/screens/dashboard/pages/nft_details_page.dart
+8 -8
@@ -232,19 +232,19 @@ class _NFTSingleInfoTile extends StatelessWidget {
232 Text(
233 infoType,
234 style: Theme.of(context).textTheme.bodySmall?.copyWith(
235 - color: Theme.of(context).colorScheme.onSurfaceVariant,
236 - fontWeight: FontWeight.w500,
237 - height: 1,
238 - ),
235 + color: Theme.of(context).colorScheme.onSurfaceVariant,
236 + fontWeight: FontWeight.w500,
237 + height: 1,
238 + ),
239 ),
240 const SizedBox(height: 8),
241 Text(
242 infoValue,
243 style: Theme.of(context).textTheme.titleMedium?.copyWith(
244 - fontWeight: FontWeight.w600,
245 - color: Theme.of(context).colorScheme.onSurface,
246 - height: 1,
247 - ),
244 + fontWeight: FontWeight.w600,
245 + color: Theme.of(context).colorScheme.onSurface,
246 + height: 1,
247 + ),
248 ),
249 ],
250 ),
lib/src/screens/dashboard/pages/transactions_page.dart
-1
@@ -49,7 +49,6 @@ class TransactionsPage extends StatelessWidget {
49 final status = dashboardViewModel.status;
50 if (status is SyncingSyncStatus) {
51 return DashBoardRoundedCardWidget(
52 - isDarkTheme: dashboardViewModel.isDarkTheme,
52 key: ValueKey('transactions_page_syncing_alert_card_key'),
53 onTap: () {
54 try {
lib/src/screens/dashboard/widgets/home_screen_account_widget.dart
+25 -22
@@ -12,14 +12,12 @@ class HomeScreenAccountWidget extends StatelessWidget {
12 @override
13 Widget build(BuildContext context) {
14 return GestureDetector(
15 - onTap: () async {
16 - await showPopUp<void>(
17 - context: context,
18 - builder: (_) => getIt.get<MoneroAccountListPage>());
19 - },
15 + onTap: () async {
16 + await showPopUp<void>(context: context, builder: (_) => getIt.get<MoneroAccountListPage>());
17 + },
18 behavior: HitTestBehavior.opaque,
19 child: Padding(
22 - padding: EdgeInsets.only(top: 25, bottom: 25, left: 25, right: 0),
20 + padding: EdgeInsets.all(25.0),
21 child: Row(
22 mainAxisSize: MainAxisSize.min,
23 mainAxisAlignment: MainAxisAlignment.center,
@@ -32,31 +30,36 @@ class HomeScreenAccountWidget extends StatelessWidget {
30 child: Text(
31 walletName ?? '',
32 style: Theme.of(context).textTheme.headlineSmall?.copyWith(
35 - fontWeight: FontWeight.bold,
36 - color: Theme.of(context).colorScheme.onSurface,
37 - ),
33 + fontWeight: FontWeight.bold,
34 + color: Theme.of(context).colorScheme.onSurface,
35 + ),
36 ),
37 ),
38 SizedBox(
39 height: 5.0,
40 ),
43 - Container(
44 - child: Text(
45 - accountName ?? '',
46 - style: Theme.of(context).textTheme.bodyMedium?.copyWith(
47 - fontWeight: FontWeight.bold,
48 - color: Theme.of(context).colorScheme.onSurfaceVariant,
41 + Row(
42 + children: [
43 + Padding(padding: EdgeInsets.only(left: 20)),
44 + Container(
45 + child: Text(
46 + accountName ?? '',
47 + style: Theme.of(context).textTheme.bodyMedium?.copyWith(
48 + fontWeight: FontWeight.bold,
49 + color: Theme.of(context).colorScheme.primary,
50 + ),
51 + ),
52 ),
50 - ),
53 + Container(
54 + child: Icon(
55 + Icons.keyboard_arrow_down,
56 + color: Theme.of(context).colorScheme.primary,
57 + ),
58 + ),
59 + ],
60 ),
61 ],
62 ),
54 - Container(
55 - child: Icon(
56 - Icons.keyboard_arrow_down,
57 - color: Theme.of(context).colorScheme.onSurfaceVariant,
58 - ),
59 - ),
63 ],
64 ),
65 ),
lib/src/screens/dashboard/widgets/info_card.dart
+2 -5
@@ -8,14 +8,13 @@ class InfoCard extends StatelessWidget {
8 final String title;
9 final String description;
10 final String image;
11 - final bool isDarkTheme;
11 final Function() leftButtonAction;
12 final Function() rightButtonAction;
13
14 final Widget? hintWidget;
15
16 const InfoCard({
18 - Key? key,
17 + super.key,
18 required this.title,
19 required this.description,
20 required this.leftButtonTitle,
@@ -23,14 +22,12 @@ class InfoCard extends StatelessWidget {
22 required this.leftButtonAction,
23 required this.rightButtonAction,
24 required this.image,
26 - required this.isDarkTheme,
25 this.hintWidget,
28 - }) : super(key: key);
26 + });
27
28 @override
29 Widget build(BuildContext context) {
30 return DashBoardRoundedCardWidget(
33 - isDarkTheme: isDarkTheme,
31 marginH: 0,
32 marginV: 0,
33 customBorder: 30,
lib/src/screens/dashboard/widgets/menu_widget.dart
+16 -18
@@ -24,21 +24,21 @@ class MenuWidgetState extends State<MenuWidget> {
24 this.tileHeight = 60,
25 this.fromTopEdge = 50,
26 this.fromBottomEdge = 25,
27 - this.moneroIcon = Image.asset('assets/images/monero_menu.png'),
28 - this.bitcoinIcon = Image.asset('assets/images/bitcoin_menu.png'),
29 - this.litecoinIcon = Image.asset('assets/images/litecoin_menu.png'),
27 + this.moneroIcon = Image.asset('assets/images/crypto/monero.png'),
28 + this.bitcoinIcon = Image.asset('assets/images/crypto/bitcoin.png'),
29 + this.litecoinIcon = Image.asset('assets/images/crypto/litecoin.png'),
30 this.havenIcon = Image.asset('assets/images/haven_menu.png'),
31 - this.ethereumIcon = Image.asset('assets/images/eth_icon.png'),
32 - this.nanoIcon = Image.asset('assets/images/nano_icon.png'),
33 - this.bananoIcon = Image.asset('assets/images/nano_icon.png'),
34 - this.bitcoinCashIcon = Image.asset('assets/images/bch_icon.png'),
35 - this.polygonIcon = Image.asset('assets/images/matic_icon.png'),
36 - this.solanaIcon = Image.asset('assets/images/sol_icon.png'),
37 - this.tronIcon = Image.asset('assets/images/trx_icon.png'),
38 - this.wowneroIcon = Image.asset('assets/images/wownero_icon.png'),
39 - this.zanoIcon = Image.asset('assets/images/zano_icon.png'),
40 - this.decredIcon = Image.asset('assets/images/decred_menu.png'),
41 - this.dogecoinIcon = Image.asset('assets/images/doge_icon.png');
31 + this.ethereumIcon = Image.asset('assets/images/crypto/ethereum.png'),
32 + this.nanoIcon = Image.asset('assets/images/crypto/nano.png'),
33 + this.bananoIcon = Image.asset('assets/images/crypto/nano.png'),
34 + this.bitcoinCashIcon = Image.asset('assets/images/crypto/bitcoin-cash.png'),
35 + this.polygonIcon = Image.asset('assets/images/crypto/polygon.png'),
36 + this.solanaIcon = Image.asset('assets/images/crypto/solana.png'),
37 + this.tronIcon = Image.asset('assets/images/crypto/tron.png'),
38 + this.wowneroIcon = Image.asset('assets/images/crypto/wownero.png'),
39 + this.zanoIcon = Image.asset('assets/images/crypto/zano.png'),
40 + this.decredIcon = Image.asset('assets/images/crypto/decred.png'),
41 + this.dogecoinIcon = Image.asset('assets/images/crypto/dogecoin.png');
42
43 final largeScreen = 731;
44
@@ -114,10 +114,8 @@ class MenuWidgetState extends State<MenuWidget> {
114 }
115 int itemCount = items.length;
116
117 - moneroIcon =
118 - Image.asset('assets/images/monero_menu.png', color: Theme.of(context).colorScheme.primary);
119 - bitcoinIcon =
120 - Image.asset('assets/images/bitcoin_menu.png', color: Theme.of(context).colorScheme.primary);
117 + moneroIcon = Image.asset('assets/images/crypto/monero.png');
118 + bitcoinIcon = Image.asset('assets/images/crypto/bitcoin.png');
119
120 return Row(
121 mainAxisSize: MainAxisSize.max,
lib/src/screens/dashboard/widgets/present_receive_option_picker.dart
+50 -44
@@ -18,59 +18,65 @@ class PresentReceiveOptionPicker extends StatelessWidget {
18 Widget build(BuildContext context) {
19 final arrowBottom = Image.asset(
20 'assets/images/arrow_bottom_purple_icon.png',
21 - color: color,
21 + color: Theme.of(context).colorScheme.primary,
22 height: 6,
23 );
24
25 - return TextButton(
26 - onPressed: () => _showPicker(context),
27 - style: ButtonStyle(
28 - padding: WidgetStateProperty.all(EdgeInsets.zero),
29 - splashFactory: NoSplash.splashFactory,
30 - foregroundColor: WidgetStateProperty.all(Colors.transparent),
31 - overlayColor: WidgetStateProperty.all(Colors.transparent),
32 - ),
33 - child: Row(
34 - mainAxisSize: MainAxisSize.min,
35 - crossAxisAlignment: CrossAxisAlignment.start,
36 - children: <Widget>[
37 - Column(
38 - crossAxisAlignment: CrossAxisAlignment.center,
25 + return Padding(
26 + padding: EdgeInsets.only(left: 6),
27 + child: TextButton(
28 + onPressed: () => _showPicker(context),
29 + style: ButtonStyle(
30 + padding: WidgetStateProperty.all(EdgeInsets.zero),
31 + splashFactory: NoSplash.splashFactory,
32 + foregroundColor: WidgetStateProperty.all(Colors.transparent),
33 + overlayColor: WidgetStateProperty.all(Colors.transparent),
34 + ),
35 + child: Row(
36 mainAxisSize: MainAxisSize.min,
37 + crossAxisAlignment: CrossAxisAlignment.start,
38 children: <Widget>[
41 - Text(
42 - S.current.receive,
43 - style: Theme.of(context).textTheme.bodyMedium!.copyWith(
44 - fontSize: 17.0,
45 - fontWeight: FontWeight.bold,
46 - color: color,
47 - ),
48 - ),
49 - Observer(
50 - builder: (_) => Text(
51 - receiveOptionViewModel.selectedReceiveOption
52 - .toString()
53 - .replaceAll(RegExp(r'silent payments', caseSensitive: false),
54 - S.current.silent_payments)
55 - .replaceAll(
56 - RegExp(r'default', caseSensitive: false), S.current.string_default),
57 - style: Theme.of(context).textTheme.bodySmall!.copyWith(
58 - fontSize: 10.0,
59 - fontWeight: FontWeight.w500,
60 - color: color,
39 + Column(
40 + crossAxisAlignment: CrossAxisAlignment.center,
41 + mainAxisSize: MainAxisSize.min,
42 + children: <Widget>[
43 + Text(
44 + S.current.receive,
45 + style: Theme.of(context).textTheme.bodyMedium!.copyWith(
46 + fontSize: 17.0,
47 + fontWeight: FontWeight.bold,
48 + color: Theme.of(context).colorScheme.onSurface,
49 + ),
50 + ),
51 + Row(
52 + children: [
53 + Observer(
54 + builder: (_) => Text(
55 + receiveOptionViewModel.selectedReceiveOption
56 + .toString()
57 + .replaceAll(RegExp(r'silent payments', caseSensitive: false),
58 + S.current.silent_payments)
59 + .replaceAll(RegExp(r'default', caseSensitive: false),
60 + S.current.string_default),
61 + style: Theme.of(context).textTheme.bodySmall!.copyWith(
62 + fontSize: 10.0,
63 + fontWeight: FontWeight.w500,
64 + color: Theme.of(context).colorScheme.onSurfaceVariant,
65 + ),
66 + ),
67 ),
62 - ),
68 + ],
69 + ),
70 + ],
71 + ),
72 + SizedBox(width: 5),
73 + Padding(
74 + padding: EdgeInsets.only(top: 12),
75 + child: arrowBottom,
76 )
77 ],
78 ),
66 - SizedBox(width: 5),
67 - Padding(
68 - padding: EdgeInsets.only(top: 12),
69 - child: arrowBottom,
70 - )
71 - ],
72 - ),
73 - );
79 + ));
80 }
81
82 void _showPicker(BuildContext context) async {
lib/src/screens/dashboard/widgets/sync_indicator_icon.dart
+19 -13
@@ -1,10 +1,14 @@
1 -import 'package:cake_wallet/themes/utils/custom_theme_colors.dart';
1 +import 'package:cake_wallet/themes/core/custom_theme_colors.dart';
2 import 'package:flutter/material.dart';
3 import 'package:flutter_svg/svg.dart';
4
5 class SyncIndicatorIcon extends StatelessWidget {
6 SyncIndicatorIcon(
7 - {this.boolMode = true, this.isSynced = false, this.value = waiting, this.size = 6.0, this.showTorIcon = false});
7 + {this.boolMode = true,
8 + this.isSynced = false,
9 + this.value = waiting,
10 + this.size = 6.0,
11 + this.showTorIcon = false});
12
13 final bool boolMode;
14 final bool isSynced;
@@ -25,9 +29,7 @@ class SyncIndicatorIcon extends StatelessWidget {
29 Color indicatorColor;
30
31 if (boolMode) {
28 - indicatorColor = isSynced
29 - ? CustomThemeColors.syncGreen
30 - : CustomThemeColors.syncYellow;
32 + indicatorColor = isSynced ? CustomThemeColors.syncGreen : CustomThemeColors.syncYellow;
33 } else {
34 switch (value.toLowerCase()) {
35 case actionRequired:
@@ -48,14 +50,18 @@ class SyncIndicatorIcon extends StatelessWidget {
50 return Container(
51 height: size,
52 width: size,
51 - decoration: showTorIcon ? null : BoxDecoration(
52 - shape: BoxShape.circle,
53 - color: indicatorColor,
54 - ),
55 - child: showTorIcon ? SvgPicture.asset(
56 - "assets/images/tor.svg",
57 - color: indicatorColor,
58 - ) : null,
53 + decoration: showTorIcon
54 + ? null
55 + : BoxDecoration(
56 + shape: BoxShape.circle,
57 + color: indicatorColor,
58 + ),
59 + child: showTorIcon
60 + ? SvgPicture.asset(
61 + "assets/images/tor.svg",
62 + color: indicatorColor,
63 + )
64 + : null,
65 );
66 }
67 }
lib/src/screens/exchange/widgets/exchange_card.dart
+2 -2
@@ -206,7 +206,7 @@ class ExchangeCardState<T extends Currency> extends State<ExchangeCard<T>> {
206 style: Theme.of(context).textTheme.titleLarge!.copyWith(
207 fontSize: 18,
208 fontWeight: FontWeight.w600,
209 - color: Theme.of(context).colorScheme.onSurfaceVariant
209 + color: Theme.of(context).colorScheme.onSurfaceVariant,
210 ),
211 )
212 ],
@@ -281,7 +281,7 @@ class ExchangeCardState<T extends Currency> extends State<ExchangeCard<T>> {
281 S.of(context).refund_address,
282 style: Theme.of(context).textTheme.bodyMedium!.copyWith(
283 fontWeight: FontWeight.w500,
284 - color: Theme.of(context).colorScheme.onSurfaceVariant
284 + color: Theme.of(context).colorScheme.onSurfaceVariant,
285 ),
286 ),
287 )
lib/src/screens/exchange/widgets/mobile_exchange_cards_section.dart
+1 -1
@@ -37,7 +37,7 @@ class MobileExchangeCardsSection extends StatelessWidget {
37 bottomLeft: Radius.circular(24),
38 bottomRight: Radius.circular(24),
39 ),
40 - color: Theme.of(context).colorScheme.surfaceContainerHighest,
40 + color: Theme.of(context).colorScheme.surfaceContainerHigh,
41 ),
42 padding: EdgeInsets.fromLTRB(24, 105, 24, 24),
43 child: Column(
lib/src/screens/exchange/widgets/present_provider_picker.dart
+47 -44
@@ -15,55 +15,58 @@ class PresentProviderPicker extends StatelessWidget {
15 Widget build(BuildContext context) {
16 final arrowBottom = Image.asset(
17 'assets/images/arrow_bottom_purple_icon.png',
18 - color: Theme.of(context).colorScheme.onSurface,
18 + color: Theme.of(context).colorScheme.primary,
19 height: 6,
20 );
21
22 - return TextButton(
23 - onPressed: () => presentProviderPicker(context),
24 - style: ButtonStyle(
25 - padding: WidgetStateProperty.all(EdgeInsets.zero),
26 - splashFactory: NoSplash.splashFactory,
27 - foregroundColor: WidgetStateProperty.all(Colors.transparent),
28 - overlayColor: WidgetStateProperty.all(Colors.transparent),
29 - ),
30 - child: Row(
31 - mainAxisSize: MainAxisSize.min,
32 - crossAxisAlignment: CrossAxisAlignment.start,
33 - children: <Widget>[
34 - Column(
35 - crossAxisAlignment: CrossAxisAlignment.center,
36 - mainAxisSize: MainAxisSize.min,
37 - children: <Widget>[
38 - Text(
39 - S.of(context).swap,
40 - style: Theme.of(context).textTheme.bodyMedium?.copyWith(
41 - fontSize: 16.0,
42 - fontWeight: FontWeight.w600,
43 - ),
44 - ),
45 - Observer(
46 - builder: (_) => Text(
47 - exchangeViewModel.selectedProviders.isEmpty
48 - ? S.of(context).choose_one
49 - : exchangeViewModel.selectedProviders.length > 1
50 - ? S.of(context).automatic
51 - : exchangeViewModel.selectedProviders.first.title,
52 - style: Theme.of(context).textTheme.bodySmall?.copyWith(
53 - fontSize: 10.0,
54 - fontWeight: FontWeight.w500,
55 - color: Theme.of(context).colorScheme.onSurfaceVariant,
22 + return Padding(
23 + padding: EdgeInsets.only(left: 10),
24 + child: TextButton(
25 + onPressed: () => presentProviderPicker(context),
26 + style: ButtonStyle(
27 + padding: WidgetStateProperty.all(EdgeInsets.zero),
28 + splashFactory: NoSplash.splashFactory,
29 + foregroundColor: WidgetStateProperty.all(Colors.transparent),
30 + overlayColor: WidgetStateProperty.all(Colors.transparent),
31 + ),
32 + child: Row(
33 + mainAxisSize: MainAxisSize.min,
34 + crossAxisAlignment: CrossAxisAlignment.start,
35 + children: <Widget>[
36 + Column(
37 + crossAxisAlignment: CrossAxisAlignment.center,
38 + mainAxisSize: MainAxisSize.min,
39 + children: <Widget>[
40 + Text(
41 + S.of(context).swap,
42 + style: Theme.of(context).textTheme.bodyMedium?.copyWith(
43 + fontSize: 16.0,
44 + fontWeight: FontWeight.w600,
45 ),
46 ),
58 - )
59 - ],
60 - ),
61 - SizedBox(width: 5),
62 - Padding(
63 - padding: EdgeInsets.only(top: 12),
64 - child: arrowBottom,
65 - )
66 - ],
47 + Observer(
48 + builder: (_) => Text(
49 + exchangeViewModel.selectedProviders.isEmpty
50 + ? S.of(context).choose_one
51 + : exchangeViewModel.selectedProviders.length > 1
52 + ? S.of(context).automatic
53 + : exchangeViewModel.selectedProviders.first.title,
54 + style: Theme.of(context).textTheme.bodySmall?.copyWith(
55 + fontSize: 10.0,
56 + fontWeight: FontWeight.w500,
57 + color: Theme.of(context).colorScheme.onSurfaceVariant,
58 + ),
59 + ),
60 + )
61 + ],
62 + ),
63 + SizedBox(width: 5),
64 + Padding(
65 + padding: EdgeInsets.only(top: 12),
66 + child: arrowBottom,
67 + )
68 + ],
69 + ),
70 ),
71 );
72 }
lib/src/screens/exchange_trade/exchange_trade_external_send_page.dart
-1
@@ -114,7 +114,6 @@ class ExchangeTradeExternalSendPage extends BasePage {
114 (item) => TradeItemRowWidget(
115 key: ValueKey(
116 'exchange_trade_external_send_page_send_item_${item.title}_key'),
117 - currentTheme: currentTheme,
117 title: item.title,
118 value: item.data,
119 isCopied: true,
lib/src/screens/exchange_trade/exchange_trade_page.dart
+3 -20
@@ -6,7 +6,6 @@ import 'package:cake_wallet/src/screens/exchange_trade/widgets/exchange_trade_ca
6 import 'package:cake_wallet/src/widgets/bottom_sheet/base_bottom_sheet_widget.dart';
7 import 'package:cake_wallet/src/widgets/bottom_sheet/confirm_sending_bottom_sheet_widget.dart';
8 import 'package:cake_wallet/src/widgets/bottom_sheet/info_bottom_sheet_widget.dart';
9 -import 'package:cake_wallet/themes/core/material_base_theme.dart';
9 import 'package:cake_wallet/utils/request_review_handler.dart';
10 import 'package:cake_wallet/utils/responsive_layout_util.dart';
11 import 'package:mobx/mobx.dart';
@@ -87,20 +86,13 @@ class ExchangeTradePage extends BasePage {
86 }
87
88 @override
90 - Widget body(BuildContext context) => ExchangeTradeForm(
91 - exchangeTradeViewModel,
92 - currentTheme,
93 - );
89 + Widget body(BuildContext context) => ExchangeTradeForm(exchangeTradeViewModel);
90 }
91
92 class ExchangeTradeForm extends StatefulWidget {
97 - ExchangeTradeForm(
98 - this.exchangeTradeViewModel,
99 - this.currentTheme,
100 - );
93 + ExchangeTradeForm(this.exchangeTradeViewModel);
94
95 final ExchangeTradeViewModel exchangeTradeViewModel;
103 - final MaterialThemeBase currentTheme;
96
97 @override
98 ExchangeTradeState createState() => ExchangeTradeState();
@@ -162,7 +154,6 @@ class ExchangeTradeState extends State<ExchangeTradeForm> {
154 : Offstage(),
155 _ExchangeTradeItemsCardSection(
156 viewModel: widget.exchangeTradeViewModel,
165 - currentTheme: widget.currentTheme,
157 ),
158 ],
159 );
@@ -282,7 +273,6 @@ class ExchangeTradeState extends State<ExchangeTradeForm> {
273 builder: (BuildContext bottomSheetContext) {
274 return ConfirmSendingBottomSheet(
275 key: ValueKey('exchange_trade_page_confirm_sending_bottom_sheet_key'),
285 - currentTheme: widget.currentTheme,
276 footerType: FooterType.slideActionButton,
277 walletType: widget.exchangeTradeViewModel.sendViewModel.walletType,
278 titleText: S.of(bottomSheetContext).confirm_transaction,
@@ -329,7 +319,6 @@ class ExchangeTradeState extends State<ExchangeTradeForm> {
319 isScrollControlled: true,
320 builder: (BuildContext bottomSheetContext) {
321 return InfoBottomSheet(
332 - currentTheme: widget.currentTheme,
322 footerType: FooterType.singleActionButton,
323 titleText: S.of(bottomSheetContext).transaction_sent,
324 contentImage: 'assets/images/birthday_cake.png',
@@ -359,24 +348,18 @@ class ExchangeTradeState extends State<ExchangeTradeForm> {
348 }
349
350 class _ExchangeTradeItemsCardSection extends StatelessWidget {
362 - const _ExchangeTradeItemsCardSection({
363 - required this.viewModel,
364 - required this.currentTheme,
365 - });
351 + const _ExchangeTradeItemsCardSection({required this.viewModel});
352
353 final ExchangeTradeViewModel viewModel;
368 - final MaterialThemeBase currentTheme;
354
355 @override
356 Widget build(BuildContext context) {
357 final firstExchangeCard = ExchangeTradeCardItemWidget(
373 - currentTheme: currentTheme,
358 isReceiveDetailsCard: true,
359 exchangeTradeViewModel: viewModel,
360 );
361
362 final secondExchangeCard = ExchangeTradeCardItemWidget(
379 - currentTheme: currentTheme,
363 isReceiveDetailsCard: false,
364 exchangeTradeViewModel: viewModel,
365 );
lib/src/screens/exchange_trade/widgets/exchange_trade_card_item_widget.dart
-6
@@ -4,7 +4,6 @@ import 'package:cake_wallet/routes.dart';
4 import 'package:cake_wallet/src/widgets/alert_with_two_actions.dart';
5 import 'package:cake_wallet/src/widgets/list_row.dart';
6 import 'package:cake_wallet/src/widgets/picker.dart';
7 -import 'package:cake_wallet/themes/core/material_base_theme.dart';
7 import 'package:cake_wallet/utils/show_bar.dart';
8 import 'package:cake_wallet/utils/show_pop_up.dart';
9 import 'package:cake_wallet/view_model/exchange/exchange_trade_view_model.dart';
@@ -20,7 +19,6 @@ class ExchangeTradeCardItemWidget extends StatelessWidget {
19 ExchangeTradeCardItemWidget({
20 required this.isReceiveDetailsCard,
21 required this.exchangeTradeViewModel,
23 - required this.currentTheme,
22 Key? key,
23 }) : feesViewModel = exchangeTradeViewModel.feesViewModel,
24 output = exchangeTradeViewModel.output;
@@ -29,7 +27,6 @@ class ExchangeTradeCardItemWidget extends StatelessWidget {
27 final bool isReceiveDetailsCard;
28 final FeesViewModel feesViewModel;
29 final ExchangeTradeViewModel exchangeTradeViewModel;
32 - final MaterialThemeBase currentTheme;
30
31 @override
32 Widget build(BuildContext context) {
@@ -51,7 +48,6 @@ class ExchangeTradeCardItemWidget extends StatelessWidget {
48 .where((item) => item.isReceiveDetail == isReceiveDetailsCard)
49 .map(
50 (item) => TradeItemRowWidget(
54 - currentTheme: currentTheme,
51 title: item.title,
52 value: item.data,
53 isCopied: item.isCopied,
@@ -151,14 +147,12 @@ class TradeItemRowWidget extends StatelessWidget {
147 final String value;
148 final bool isCopied;
149 final Image copyImage;
154 - final MaterialThemeBase currentTheme;
150
151 const TradeItemRowWidget({
152 required this.title,
153 required this.value,
154 required this.isCopied,
155 required this.copyImage,
161 - required this.currentTheme,
156 super.key,
157 });
158
lib/src/screens/integrations/deuro/savings_page.dart
-8
@@ -55,7 +55,6 @@ class DEuroSavingsPage extends BasePage {
55 children: <Widget>[
56 Observer(
57 builder: (_) => SavingsCard(
58 - isDarkTheme: currentTheme.isDark,
58 interestRate: "${_dEuroViewModel.interestRateFormated}%",
59 savingsBalance: _dEuroViewModel.savingsBalanceFormated,
60 fiatSavingsBalance: _dEuroViewModel.fiatSavingsBalanceFormated,
@@ -71,7 +70,6 @@ class DEuroSavingsPage extends BasePage {
70 ),
71 Observer(
72 builder: (_) => InterestCardWidget(
74 - isDarkTheme: currentTheme.isDark,
73 title: S.of(context).deuro_savings_collect_interest,
74 fiatAccruedInterest: _dEuroViewModel.fiatAccruedInterestFormated,
75 fiatCurrency: _dEuroViewModel.isFiatDisabled ? null : _dEuroViewModel.fiat,
@@ -178,7 +176,6 @@ class DEuroSavingsPage extends BasePage {
176 key: ValueKey('savings_page_confirm_sending_dialog_key'),
177 footerType: FooterType.slideActionButton,
178 titleText: title,
181 - currentTheme: currentTheme,
179 walletType: WalletType.ethereum,
180 titleIconPath: CryptoCurrency.deuro.iconPath,
181 currency: CryptoCurrency.deuro,
@@ -214,7 +211,6 @@ class DEuroSavingsPage extends BasePage {
211 key: ValueKey('savings_page_confirm_approval_dialog_key'),
212 footerType: FooterType.slideActionButton,
213 titleText: S.of(bottomSheetContext).approve_tokens,
217 - currentTheme: currentTheme,
214 walletType: WalletType.ethereum,
215 titleIconPath: CryptoCurrency.deuro.iconPath,
216 currency: CryptoCurrency.deuro,
@@ -247,7 +243,6 @@ class DEuroSavingsPage extends BasePage {
243 isDismissible: false,
244 builder: (BuildContext bottomSheetContext) => InfoBottomSheet(
245 footerType: FooterType.singleActionButton,
250 - currentTheme: currentTheme,
246 titleText: S.of(bottomSheetContext).transaction_sent,
247 contentImage: 'assets/images/birthday_cake.png',
248 content: S.of(bottomSheetContext).deuro_tx_commited_content,
@@ -311,7 +306,6 @@ class DEuroSavingsPage extends BasePage {
306 showModalBottomSheet<void>(
307 context: context,
308 builder: (BuildContext bottomSheetContext) => TooltipSheet(
314 - currentTheme: currentTheme,
309 titleText: title,
310 titleIconPath: CryptoCurrency.deuro.iconPath,
311 tooltip: content,
@@ -333,7 +327,6 @@ class DEuroSavingsPage extends BasePage {
327 context: context,
328 isScrollControlled: true,
329 builder: (BuildContext bottomSheetContext) => InfoBottomSheet(
336 - currentTheme: currentTheme,
330 height: 350,
331 titleText: "dEURO",
332 titleIconPath: CryptoCurrency.deuro.iconPath,
@@ -360,7 +353,6 @@ class DEuroSavingsPage extends BasePage {
353 return showModalBottomSheet<void>(
354 context: context,
355 builder: (BuildContext bottomSheetContext) => InfoBottomSheet(
363 - currentTheme: currentTheme,
356 titleText: title,
357 titleIconPath: CryptoCurrency.deuro.iconPath,
358 contentImage: 'assets/images/deuro_not_enough_eth.png',
lib/src/screens/integrations/deuro/widgets/interest_card_widget.dart
+11 -19
@@ -1,7 +1,7 @@
1 import 'package:cake_wallet/entities/fiat_currency.dart';
2 import 'package:cake_wallet/generated/i18n.dart';
3 import 'package:cake_wallet/src/screens/integrations/deuro/widgets/savings_card_widget.dart';
4 -import 'package:cake_wallet/themes/utils/custom_theme_colors.dart';
4 +import 'package:cake_wallet/themes/core/theme_extension.dart';
5 import 'package:cw_core/crypto_currency.dart';
6 import 'package:flutter/material.dart';
7
@@ -9,7 +9,6 @@ class InterestCardWidget extends StatelessWidget {
9 const InterestCardWidget({
10 required this.title,
11 required this.accruedInterest,
12 - required this.isDarkTheme,
12 required this.isEnabled,
13 required this.onCollectInterest,
14 required this.onReinvestInterest,
@@ -22,7 +21,6 @@ class InterestCardWidget extends StatelessWidget {
21 final String accruedInterest;
22 final String? fiatAccruedInterest;
23 final FiatCurrency? fiatCurrency;
25 - final bool isDarkTheme;
24 final bool isEnabled;
25 final VoidCallback onCollectInterest;
26 final VoidCallback onReinvestInterest;
@@ -37,12 +35,8 @@ class InterestCardWidget extends StatelessWidget {
35 borderRadius: BorderRadius.circular(15),
36 gradient: LinearGradient(
37 colors: [
40 - isDarkTheme
41 - ? CustomThemeColors.cardGradientColorPrimaryDark
42 - : CustomThemeColors.cardGradientColorPrimaryLight,
43 - isDarkTheme
44 - ? CustomThemeColors.cardGradientColorSecondaryDark
45 - : CustomThemeColors.cardGradientColorSecondaryLight,
38 + context.customColors.cardGradientColorPrimary,
39 + context.customColors.cardGradientColorSecondary,
40 ],
41 begin: Alignment.topCenter,
42 end: Alignment.bottomCenter,
@@ -52,16 +46,14 @@ class InterestCardWidget extends StatelessWidget {
46 padding: EdgeInsets.all(20),
47 child: Column(
48 children: [
55 - SavingsCard.getAssetBalanceRow(
56 - context,
57 - title: title,
58 - amount: accruedInterest,
59 - fiatAmount: fiatAccruedInterest,
60 - currency: CryptoCurrency.deuro,
61 - fiatCurrency: fiatCurrency,
62 - hideSymbol: false,
63 - onTooltipPressed: onTooltipPressed
64 - ),
49 + SavingsCard.getAssetBalanceRow(context,
50 + title: title,
51 + amount: accruedInterest,
52 + fiatAmount: fiatAccruedInterest,
53 + currency: CryptoCurrency.deuro,
54 + fiatCurrency: fiatCurrency,
55 + hideSymbol: false,
56 + onTooltipPressed: onTooltipPressed),
57 SizedBox(height: 10),
58 Row(mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [
59 Expanded(
lib/src/screens/integrations/deuro/widgets/savings_card_widget.dart
+15 -21
@@ -4,28 +4,14 @@ import 'package:auto_size_text/auto_size_text.dart';
4 import 'package:cake_wallet/entities/fiat_currency.dart';
5 import 'package:cake_wallet/generated/i18n.dart';
6 import 'package:cake_wallet/src/widgets/cake_image_widget.dart';
7 -import 'package:cake_wallet/themes/utils/custom_theme_colors.dart';
7 +import 'package:cake_wallet/themes/core/theme_extension.dart';
8 import 'package:cw_core/crypto_currency.dart';
9 import 'package:flutter/cupertino.dart';
10 import 'package:flutter/material.dart';
11
12 class SavingsCard extends StatelessWidget {
13 - final bool isDarkTheme;
14 - final bool isEnabled;
15 - final bool isLoading;
16 - final String interestRate;
17 - final String savingsBalance;
18 - final String? fiatSavingsBalance;
19 - final FiatCurrency? fiatCurrency;
20 - final CryptoCurrency currency;
21 - final VoidCallback onAddSavingsPressed;
22 - final VoidCallback onRemoveSavingsPressed;
23 - final VoidCallback onApproveSavingsPressed;
24 - final VoidCallback onTooltipPressed;
25 -
13 const SavingsCard({
14 super.key,
28 - required this.isDarkTheme,
15 required this.interestRate,
16 required this.savingsBalance,
17 required this.currency,
@@ -39,6 +25,18 @@ class SavingsCard extends StatelessWidget {
25 this.fiatCurrency,
26 });
27
28 + final bool isEnabled;
29 + final bool isLoading;
30 + final String interestRate;
31 + final String savingsBalance;
32 + final String? fiatSavingsBalance;
33 + final FiatCurrency? fiatCurrency;
34 + final CryptoCurrency currency;
35 + final VoidCallback onAddSavingsPressed;
36 + final VoidCallback onRemoveSavingsPressed;
37 + final VoidCallback onApproveSavingsPressed;
38 + final VoidCallback onTooltipPressed;
39 +
40 @override
41 Widget build(BuildContext context) => Container(
42 margin: const EdgeInsets.all(15),
@@ -77,12 +75,8 @@ class SavingsCard extends StatelessWidget {
75 borderRadius: BorderRadius.circular(15),
76 gradient: LinearGradient(
77 colors: [
80 - isDarkTheme
81 - ? CustomThemeColors.cardGradientColorPrimaryDark
82 - : CustomThemeColors.cardGradientColorPrimaryLight,
83 - isDarkTheme
84 - ? CustomThemeColors.cardGradientColorSecondaryDark
85 - : CustomThemeColors.cardGradientColorSecondaryLight,
78 + context.customColors.cardGradientColorPrimary,
79 + context.customColors.cardGradientColorSecondary,
80 ],
81 begin: Alignment.topCenter,
82 end: Alignment.bottomCenter,
lib/src/screens/new_wallet/advanced_privacy_settings_page.dart
+2 -3
@@ -65,9 +65,8 @@ class _AdvancedPrivacySettingsBody extends StatefulWidget {
65 this.toggleUseTestnet,
66 this.privacySettingsViewModel,
67 this.nodeViewModel,
68 - this.seedTypeViewModel, {
69 - Key? key,
70 - }) : super(key: key);
68 + this.seedTypeViewModel,
69 + );
70
71 final AdvancedPrivacySettingsViewModel privacySettingsViewModel;
72 final NodeCreateOrEditViewModel nodeViewModel;
lib/src/screens/new_wallet/new_wallet_page.dart
+11 -11
@@ -44,7 +44,7 @@ class NewWalletPage extends BasePage {
44
45 @override
46 Widget Function(BuildContext, Widget) get rootWrapper =>
47 - (BuildContext context, Widget scaffold) => GradientBackground(scaffold: scaffold);
47 + (BuildContext context, Widget scaffold) => GradientBackground(scaffold: scaffold);
48
49 @override
50 String get title => S.current.new_wallet;
@@ -228,11 +228,11 @@ class _WalletNameFormState extends State<WalletNameForm> {
228 color: Theme.of(context).colorScheme.onSurface,
229 ),
230 placeholderTextStyle: Theme.of(context).textTheme.bodyMedium?.copyWith(
231 - color: Theme.of(context).colorScheme.onSurfaceVariant,
232 - height: 1.4,
233 - fontSize: 18.0,
234 - fontWeight: FontWeight.w500,
235 - ),
231 + color: Theme.of(context).colorScheme.onSurfaceVariant,
232 + height: 1.4,
233 + fontSize: 18.0,
234 + fontWeight: FontWeight.w500,
235 + ),
236 hintText: S.of(context).password,
237 ),
238 BaseTextFormField(
@@ -247,11 +247,11 @@ class _WalletNameFormState extends State<WalletNameForm> {
247 color: Theme.of(context).colorScheme.onSurface,
248 ),
249 placeholderTextStyle: Theme.of(context).textTheme.bodyMedium?.copyWith(
250 - color: Theme.of(context).colorScheme.onSurfaceVariant,
251 - height: 1.4,
252 - fontSize: 18.0,
253 - fontWeight: FontWeight.w500,
254 - ),
250 + color: Theme.of(context).colorScheme.onSurfaceVariant,
251 + height: 1.4,
252 + fontSize: 18.0,
253 + fontWeight: FontWeight.w500,
254 + ),
255 hintText: S.of(context).repeat_wallet_password,
256 ),
257 ],
lib/src/screens/new_wallet/new_wallet_type_page.dart
+2 -2
@@ -143,8 +143,8 @@ class WalletTypeFormState extends State<WalletTypeForm> {
143 key: ValueKey('new_wallet_type_${type.name}_button_key'),
144 image: Image.asset(
145 walletTypeToCryptoCurrency(type).iconPath ?? '',
146 - height: 24,
147 - width: 24,
146 + height: 28,
147 + width: 28,
148 ),
149 text: walletTypeToDisplayName(type),
150 showTrailingIcon: false,
lib/src/screens/new_wallet/widgets/grouped_wallet_expansion_tile.dart
+82 -85
@@ -51,101 +51,98 @@ class GroupedWalletExpansionTile extends StatelessWidget {
51
52 @override
53 Widget build(BuildContext context) {
54 - final backgroundColor = color ?? (isSelected ? Theme.of(context).colorScheme.primary : Theme.of(context).colorScheme.surfaceContainer);
54 + final backgroundColor = color ??
55 + (isSelected
56 + ? Theme.of(context).colorScheme.primary
57 + : Theme.of(context).colorScheme.surfaceContainer);
58 final effectiveTextColor = textColor ??
59 (isSelected
60 ? Theme.of(context).colorScheme.onPrimary
58 - : Theme.of(context).colorScheme.onSecondaryContainer);
61 + : Theme.of(context).colorScheme.onSurface);
62
63 final effectiveArrowColor = arrowColor ??
64 (isSelected
65 ? Theme.of(context).colorScheme.onPrimary
63 - : Theme.of(context).colorScheme.onSecondaryContainer);
64 - return Container(
65 - decoration: BoxDecoration(
66 - borderRadius: borderRadius ?? BorderRadius.all(Radius.circular(30)),
67 - color: backgroundColor,
68 - ),
69 - margin: margin ?? const EdgeInsets.only(bottom: 12.0),
70 - child: Theme(
71 - data: Theme.of(context).copyWith(
72 - dividerColor: Colors.transparent,
73 - splashFactory: NoSplash.splashFactory,
74 - ),
75 - child: ExpansionTile(
76 - onExpansionChanged: onExpansionChanged,
77 - initiallyExpanded: shouldShowCurrentWalletPointer
78 - ? childWallets.any((element) => element.isCurrent)
79 - : false,
80 - key: tileKey,
81 - tilePadding:
82 - EdgeInsets.symmetric(vertical: 1, horizontal: !isCurrentlySelectedWallet ? 16 : 0),
83 - iconColor: effectiveArrowColor,
84 - collapsedIconColor: effectiveArrowColor,
85 - leading: leadingWidget,
86 - trailing: trailingWidget ?? (childWallets.isEmpty ? SizedBox.shrink() : null),
87 - title: GestureDetector(
88 - onTap: onTitleTapped,
89 - child: Text(
90 - title,
91 - style: Theme.of(context).textTheme.bodyMedium!.copyWith(
92 - fontSize: 18,
93 - fontWeight: FontWeight.w500,
94 - color: effectiveTextColor,
95 - ),
96 - textAlign: TextAlign.left,
97 - ),
66 + : Theme.of(context).colorScheme.onSurfaceVariant);
67 + return Padding(
68 + padding: EdgeInsets.symmetric(vertical: 6),
69 + child: ExpansionTile(
70 + shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(16)),
71 + collapsedShape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(16)),
72 + collapsedBackgroundColor: backgroundColor,
73 + backgroundColor: backgroundColor,
74 + onExpansionChanged: onExpansionChanged,
75 + initiallyExpanded: shouldShowCurrentWalletPointer
76 + ? childWallets.any((element) => element.isCurrent)
77 + : false,
78 + key: tileKey,
79 + tilePadding:
80 + EdgeInsets.symmetric(vertical: 1, horizontal: !isCurrentlySelectedWallet ? 16 : 0),
81 + iconColor: effectiveArrowColor,
82 + collapsedIconColor: effectiveArrowColor,
83 + leading: leadingWidget,
84 + trailing: trailingWidget ?? (childWallets.isEmpty ? SizedBox.shrink() : null),
85 + title: GestureDetector(
86 + onTap: onTitleTapped,
87 + child: Text(
88 + title,
89 + style: Theme.of(context).textTheme.bodyMedium!.copyWith(
90 + fontSize: 18,
91 + fontWeight: FontWeight.w500,
92 + color: effectiveTextColor,
93 + ),
94 + textAlign: TextAlign.left,
95 ),
99 - children: childWallets.map(
100 - (item) {
101 - final currentColor = item.isCurrent
102 - ? Theme.of(context).colorScheme.primary
103 - : Theme.of(context).colorScheme.surface;
104 - final walletTypeToCrypto = walletTypeToCryptoCurrency(item.type);
105 - return ListTile(
106 - contentPadding: EdgeInsets.zero,
107 - key: ValueKey(item.name),
108 - trailing: childTrailingWidget?.call(item),
109 - onTap: () => onChildItemTapped(item),
110 - leading: SizedBox(
111 - width: 60,
112 - child: Row(
113 - children: [
114 - item.isCurrent && shouldShowCurrentWalletPointer
115 - ? Container(
116 - height: 35,
117 - width: 6,
118 - decoration: BoxDecoration(
119 - borderRadius: BorderRadius.only(
120 - topRight: Radius.circular(16),
121 - bottomRight: Radius.circular(16),
122 - ),
123 - color: currentColor,
96 + ),
97 + children: childWallets.map(
98 + (item) {
99 + final currentColor = item.isCurrent
100 + ? Theme.of(context).colorScheme.primary
101 + : Theme.of(context).colorScheme.surface;
102 + final walletTypeToCrypto = walletTypeToCryptoCurrency(item.type);
103 + return ListTile(
104 + contentPadding: EdgeInsets.zero,
105 + key: ValueKey(item.name),
106 + trailing: childTrailingWidget?.call(item),
107 + onTap: () => onChildItemTapped(item),
108 + leading: SizedBox(
109 + width: 64,
110 + child: Row(
111 + children: [
112 + item.isCurrent && shouldShowCurrentWalletPointer
113 + ? Container(
114 + height: 35,
115 + width: 6,
116 + decoration: BoxDecoration(
117 + borderRadius: BorderRadius.only(
118 + topRight: Radius.circular(16),
119 + bottomRight: Radius.circular(16),
120 ),
125 - )
126 - : SizedBox(width: 6),
127 - SizedBox(width: 16),
128 - Image.asset(
129 - walletTypeToCrypto.iconPath!,
130 - width: 32,
131 - height: 32,
132 - ),
133 - ],
134 - ),
135 - ),
136 - title: Text(
137 - item.name,
138 - maxLines: 2,
139 - style: Theme.of(context).textTheme.bodyMedium!.copyWith(
140 - fontSize: 18,
141 - fontWeight: FontWeight.w500,
142 - color: effectiveTextColor,
143 - ),
121 + color: currentColor,
122 + ),
123 + )
124 + : SizedBox(width: 7),
125 + SizedBox(width: 24),
126 + Image.asset(
127 + walletTypeToCrypto.iconPath!,
128 + width: 32,
129 + height: 32,
130 + ),
131 + ],
132 ),
145 - );
146 - },
147 - ).toList(),
148 - ),
133 + ),
134 + title: Text(
135 + item.name,
136 + maxLines: 2,
137 + style: Theme.of(context).textTheme.bodyMedium!.copyWith(
138 + fontSize: 18,
139 + fontWeight: FontWeight.w500,
140 + color: effectiveTextColor,
141 + ),
142 + ),
143 + );
144 + },
145 + ).toList(),
146 ),
147 );
148 }
lib/src/screens/nodes/widgets/node_indicator.dart
+2 -2
@@ -1,8 +1,8 @@
1 -import 'package:cake_wallet/themes/utils/custom_theme_colors.dart';
1 +import 'package:cake_wallet/themes/core/custom_theme_colors.dart';
2 import 'package:flutter/material.dart';
3
4 class NodeIndicator extends StatelessWidget {
5 - NodeIndicator({this.isLive = false});
5 + const NodeIndicator({this.isLive = false});
6
7 final bool isLive;
8
lib/src/screens/receive/address_list_page.dart
-1
@@ -20,7 +20,6 @@ class AddressListPage extends BasePage {
20 children: <Widget>[
21 AddressList(
22 addressListViewModel: addressListViewModel,
23 - currentTheme: currentTheme,
23 onSelect: (String address) async {
24 Navigator.of(context).pop(address);
25 },
lib/src/screens/receive/receive_page.dart
+1 -2
@@ -102,10 +102,9 @@ class ReceivePage extends BasePage {
102 heroTag: _heroTag,
103 amountTextFieldFocusNode: _cryptoAmountFocus,
104 amountController: _amountController,
105 - currentTheme: currentTheme,
105 ),
106 ),
108 - AddressList(addressListViewModel: addressListViewModel, currentTheme: currentTheme),
107 + AddressList(addressListViewModel: addressListViewModel),
108 Padding(
109 padding: EdgeInsets.fromLTRB(24, 24, 24, 32),
110 child: Text(
lib/src/screens/receive/widgets/address_cell.dart
-5
@@ -1,5 +1,4 @@
1 import 'package:cake_wallet/generated/i18n.dart';
2 -import 'package:cake_wallet/themes/core/material_base_theme.dart';
2 import 'package:cake_wallet/utils/address_formatter.dart';
3 import 'package:cake_wallet/view_model/wallet_address_list/wallet_address_list_item.dart';
4 import 'package:cw_core/wallet_type.dart';
@@ -16,7 +15,6 @@ class AddressCell extends StatelessWidget {
15 required this.backgroundColor,
16 required this.textColor,
17 required this.walletType,
19 - required this.currentTheme,
18 this.onTap,
19 this.onEdit,
20 this.onHide,
@@ -35,7 +33,6 @@ class AddressCell extends StatelessWidget {
33 required Color backgroundColor,
34 required Color textColor,
35 required WalletType walletType,
38 - required MaterialThemeBase currentTheme,
36 Function(String)? onTap,
37 bool hasBalance = false,
38 bool hasReceived = false,
@@ -52,7 +49,6 @@ class AddressCell extends StatelessWidget {
49 backgroundColor: backgroundColor,
50 textColor: textColor,
51 walletType: walletType,
55 - currentTheme: currentTheme,
52 onTap: onTap,
53 onEdit: onEdit,
54 onHide: onHide,
@@ -72,7 +68,6 @@ class AddressCell extends StatelessWidget {
68 final Color backgroundColor;
69 final Color textColor;
70 final WalletType walletType;
75 - final MaterialThemeBase currentTheme;
71 final Function(String)? onTap;
72 final Function()? onEdit;
73 final Function()? onHide;
lib/src/screens/receive/widgets/address_list.dart
+1 -8
@@ -19,15 +19,9 @@ import 'package:flutter/material.dart';
19 import 'package:flutter_mobx/flutter_mobx.dart';
20
21 class AddressList extends StatefulWidget {
22 - const AddressList({
23 - super.key,
24 - required this.addressListViewModel,
25 - required this.currentTheme,
26 - this.onSelect,
27 - });
22 + const AddressList({super.key, required this.addressListViewModel, this.onSelect});
23
24 final WalletAddressListViewModel addressListViewModel;
30 - final MaterialThemeBase currentTheme;
25 final Function(String)? onSelect;
26
27 @override
@@ -167,7 +161,6 @@ class _AddressListState extends State<AddressList> {
161 return AddressCell.fromItem(
162 item,
163 isCurrent: isCurrent,
170 - currentTheme: widget.currentTheme,
164 walletType: widget.addressListViewModel.type,
165 hasBalance: widget.addressListViewModel.isBalanceAvailable,
166 hasReceived: widget.addressListViewModel.isReceivedAvailable,
lib/src/screens/receive/widgets/currency_input_field.dart
+1 -4
@@ -1,6 +1,5 @@
1 import 'package:cake_wallet/generated/i18n.dart';
2 import 'package:cake_wallet/src/widgets/base_text_form_field.dart';
3 -import 'package:cake_wallet/themes/core/material_base_theme.dart';
3 import 'package:cw_core/crypto_amount_format.dart';
4 import 'package:flutter/material.dart';
5 import 'package:flutter/services.dart';
@@ -15,7 +14,6 @@ class CurrencyAmountTextField extends StatelessWidget {
14 this.allAmountButton = false,
15 this.isPickerEnable = false,
16 this.isSelected = false,
18 - this.currentThemeType = ThemeType.dark,
17 this.onTapPicker,
18 this.padding,
19 this.imageArrow,
@@ -54,7 +52,6 @@ class CurrencyAmountTextField extends StatelessWidget {
52 final bool isAmountEditable;
53 final FormFieldValidator<String>? currencyValueValidator;
54 final bool isPickerEnable;
57 - final ThemeType currentThemeType;
55 final bool isSelected;
56 final bool allAmountButton;
57 final VoidCallback? allAmountCallback;
@@ -84,7 +81,7 @@ class CurrencyAmountTextField extends StatelessWidget {
81 child: imageArrow ??
82 Image.asset(
83 'assets/images/arrow_bottom_purple_icon.png',
87 - color: textColor,
84 + color: Theme.of(context).colorScheme.primary,
85 height: 8,
86 ),
87 ),
lib/src/screens/receive/widgets/qr_widget.dart
-5
@@ -4,7 +4,6 @@ import 'package:cake_wallet/src/widgets/primary_button.dart';
4 import 'package:cake_wallet/routes.dart';
5 import 'package:cake_wallet/src/screens/exchange/widgets/currency_picker.dart';
6 import 'package:cake_wallet/src/screens/receive/widgets/currency_input_field.dart';
7 -import 'package:cake_wallet/themes/core/material_base_theme.dart';
7 import 'package:cake_wallet/generated/i18n.dart';
8 import 'package:cake_wallet/src/screens/receive/widgets/qr_image.dart';
9 import 'package:cake_wallet/src/widgets/bottom_sheet/base_bottom_sheet_widget.dart';
@@ -24,7 +23,6 @@ import 'package:url_launcher/url_launcher.dart';
23 class QRWidget extends StatelessWidget {
24 QRWidget({
25 required this.addressListViewModel,
27 - required this.currentTheme,
26 this.qrVersion,
27 this.heroTag,
28 required this.amountController,
@@ -36,7 +34,6 @@ class QRWidget extends StatelessWidget {
34 final TextEditingController amountController;
35 final FocusNode? amountTextFieldFocusNode;
36 final GlobalKey<FormState> formKey;
39 - final MaterialThemeBase currentTheme;
37 final int? qrVersion;
38 final String? heroTag;
39
@@ -211,7 +208,6 @@ class QRWidget extends StatelessWidget {
208 amountFocusNode: amountTextFieldFocusNode,
209 amountController: amountController,
210 padding: EdgeInsets.only(top: 20, left: _width / 4),
214 - currentThemeType: currentTheme.type,
211 isAmountEditable: true,
212 tag: addressListViewModel.selectedCurrency.tag,
213 onTapPicker: () => _presentPicker(context),
@@ -312,7 +308,6 @@ class QRWidget extends StatelessWidget {
308 builder: (context) => InfoBottomSheet(
309 titleText: S.of(context).payjoin_unavailable_sheet_title,
310 content: S.of(context).payjoin_unavailable_sheet_content,
315 - currentTheme: currentTheme,
311 footerType: FooterType.doubleActionButton,
312 doubleActionLeftButtonText: S.of(context).learn_more,
313 onLeftActionButtonPressed: () => launchUrl(
lib/src/screens/restore/restore_options_page.dart
+60 -62
@@ -10,7 +10,6 @@ import 'package:cake_wallet/utils/permission_handler.dart';
10 import 'package:cake_wallet/utils/responsive_layout_util.dart';
11 import 'package:cake_wallet/utils/show_pop_up.dart';
12 import 'package:cake_wallet/view_model/restore/wallet_restore_from_qr_code.dart';
13 -import 'package:cake_wallet/wallet_type_utils.dart';
13 import 'package:cw_core/wallet_info.dart';
14 import 'package:flutter/material.dart';
15 import 'package:permission_handler/permission_handler.dart';
@@ -20,12 +19,13 @@ class RestoreOptionsPage extends BasePage {
19
20 @override
21 String get title => S.current.restore_restore_wallet;
23 -
22 final bool isNewInstall;
23
24 @override
27 - Widget body(BuildContext context) =>
28 - _RestoreOptionsBody(isNewInstall: isNewInstall, themeType: currentTheme.type);
25 + Widget body(BuildContext context) => _RestoreOptionsBody(
26 + isNewInstall: isNewInstall,
27 + themeType: currentTheme.type,
28 + );
29 }
30
31 class _RestoreOptionsBody extends StatefulWidget {
@@ -71,70 +71,68 @@ class _RestoreOptionsBodyState extends State<_RestoreOptionsBody> {
71
72 return Center(
73 child: Container(
74 - width: ResponsiveLayoutUtilBase.kDesktopMaxWidthConstraint,
75 - height: double.infinity,
76 - padding: EdgeInsets.symmetric(vertical: 24, horizontal: 24),
77 - child: SingleChildScrollView(
78 - child: Column(
79 - children: <Widget>[
80 - OptionTile(
81 - key: ValueKey('restore_options_from_seeds_or_keys_button_key'),
82 - onPressed: () => Navigator.pushNamed(context, Routes.restoreWalletFromSeedKeys),
83 - image: imageSeedKeys,
84 - title: S.of(context).restore_title_from_seed_keys,
85 - description: S.of(context).restore_description_from_seed_keys,
86 - ),
87 - if (FeatureFlag.hasBitcoinViewOnly && DeviceInfo.instance.isMobile)
88 - Padding(
89 - padding: EdgeInsets.only(top: 24),
90 - child: OptionTile(
91 - key: ValueKey('restore_options_from_cupcake_button_key'),
92 - onPressed: () => _onScanQRCode(context),
93 - image: imageRestoreCupcake,
94 - title: S.of(context).restore_title_from_cupcake,
95 - description: S.of(context).restore_description_from_cupcake,
96 - tag: S.of(context).new_tag,
97 - ),
98 - ),
74 + width: ResponsiveLayoutUtilBase.kDesktopMaxWidthConstraint,
75 + height: double.infinity,
76 + padding: EdgeInsets.symmetric(vertical: 24, horizontal: 24),
77 + child: SingleChildScrollView(
78 + child: Column(
79 + children: <Widget>[
80 + OptionTile(
81 + key: ValueKey('restore_options_from_seeds_or_keys_button_key'),
82 + onPressed: () => Navigator.pushNamed(context, Routes.restoreWalletFromSeedKeys),
83 + image: imageSeedKeys,
84 + title: S.of(context).restore_title_from_seed_keys,
85 + description: S.of(context).restore_description_from_seed_keys,
86 + ),
87 + if (FeatureFlag.hasBitcoinViewOnly && DeviceInfo.instance.isMobile)
88 Padding(
100 - padding: EdgeInsets.only(top: 24),
89 + padding: EdgeInsets.only(top: 12),
90 child: OptionTile(
102 - key: ValueKey('restore_options_from_hardware_wallet_button_key'),
103 - onPressed: () => Navigator.pushNamed(
104 - context,
105 - isSingleCoin
106 - ? Routes.connectHardwareWallet
107 - : Routes.restoreWalletFromHardwareWallet),
108 - image: imageRestoreHW,
109 - title: S.of(context).restore_title_from_hardware_wallet,
110 - description: S.of(context).restore_description_from_hardware_wallet,
91 + key: ValueKey('restore_options_from_cupcake_button_key'),
92 + onPressed: () => _onScanQRCode(context),
93 + image: imageRestoreCupcake,
94 + title: S.of(context).restore_title_from_cupcake,
95 + description: S.of(context).restore_description_from_cupcake,
96 + tag: S.of(context).new_tag,
97 ),
98 ),
113 - if (widget.isNewInstall)
114 - Padding(
115 - padding: EdgeInsets.only(top: 24),
116 - child: OptionTile(
117 - key: ValueKey('restore_options_from_backup_button_key'),
118 - onPressed: () => Navigator.pushNamed(context, Routes.restoreFromBackup),
119 - image: imageRestoreBackup,
120 - title: S.of(context).restore_title_from_backup,
121 - description: S.of(context).restore_description_from_backup,
122 - ),
99 + Padding(
100 + padding: EdgeInsets.only(top: 12),
101 + child: OptionTile(
102 + key: ValueKey('restore_options_from_hardware_wallet_button_key'),
103 + onPressed: () =>
104 + Navigator.pushNamed(context, Routes.restoreWalletFromHardwareWallet),
105 + image: imageRestoreHW,
106 + title: S.of(context).restore_title_from_hardware_wallet,
107 + description: S.of(context).restore_description_from_hardware_wallet,
108 + ),
109 + ),
110 + if (widget.isNewInstall)
111 + Padding(
112 + padding: EdgeInsets.only(top: 12),
113 + child: OptionTile(
114 + key: ValueKey('restore_options_from_backup_button_key'),
115 + onPressed: () => Navigator.pushNamed(context, Routes.restoreFromBackup),
116 + image: imageRestoreBackup,
117 + title: S.of(context).restore_title_from_backup,
118 + description: S.of(context).restore_description_from_backup,
119 ),
124 - if (DeviceInfo.instance.isMobile)
125 - Padding(
126 - padding: EdgeInsets.only(top: 24),
127 - child: OptionTile(
128 - key: ValueKey('restore_options_from_qr_button_key'),
129 - onPressed: () => _onScanQRCode(context),
130 - image: imageRestoreQR,
131 - title: S.of(context).scan_qr_code,
132 - description: S.of(context).cold_or_recover_wallet,
133 - ),
120 + ),
121 + if (DeviceInfo.instance.isMobile)
122 + Padding(
123 + padding: EdgeInsets.only(top: 12),
124 + child: OptionTile(
125 + key: ValueKey('restore_options_from_qr_button_key'),
126 + onPressed: () => _onScanQRCode(context),
127 + image: imageRestoreQR,
128 + title: S.of(context).scan_qr_code,
129 + description: S.of(context).cold_or_recover_wallet,
130 ),
135 - ],
136 - ),
137 - )),
131 + ),
132 + ],
133 + ),
134 + ),
135 + ),
136 );
137 }
138
lib/src/screens/restore/wallet_restore_page.dart
-2
@@ -42,7 +42,6 @@ class WalletRestorePage extends BasePage {
42 : S.current.restore_title_from_keys,
43 style: Theme.of(context).textTheme.titleMedium?.copyWith(
44 fontSize: 18,
45 -
45 fontWeight: FontWeight.w600,
46 ),
47 ),
@@ -147,7 +146,6 @@ class WalletRestorePage extends BasePage {
146 bottom: MediaQuery.of(bottomSheetContext).viewInsets.bottom,
147 ),
148 child: AddPassphraseBottomSheet(
150 - currentTheme: currentTheme,
149 titleText: S.of(context).add_passphrase,
150 onRestoreButtonPressed: (passphrase) async {
151 await _onPassphraseBottomSheetRestoreButtonPressed(
lib/src/screens/root/root.dart
+20
@@ -153,6 +153,10 @@ class RootState extends State<Root> with WidgetsBindingObserver {
153
154 break;
155 case AppLifecycleState.resumed:
156 +
157 + // Reset inactive state when app resumes
158 + if (_isInactive) setState(() => _setInactive(false));
159 +
160 widget.authService.requireAuth().then((value) {
161 if (mounted) {
162 setState(() {
@@ -201,8 +205,14 @@ class RootState extends State<Root> with WidgetsBindingObserver {
205
206 @override
207 void didChangePlatformBrightness() {
208 + // Only handle theme changes when the app is active (not in background)
209 + if (_isInactive) return;
210 +
211 if (widget.appStore.themeStore.themeMode == ThemeMode.system) {
212 Future.delayed(Duration(milliseconds: Platform.isIOS ? 500 : 0), () {
213 + // Double-check that app is still active before applying theme change
214 + if (_isInactive) return;
215 +
216 final systemTheme = widget.appStore.themeStore.getThemeFromSystem();
217 if (widget.appStore.themeStore.currentTheme != systemTheme) {
218 widget.appStore.themeStore.setTheme(systemTheme);
@@ -272,6 +282,16 @@ class RootState extends State<Root> with WidgetsBindingObserver {
282 _postFrameCallback = false;
283 _setInactive(false);
284 });
285 +
286 + // Apply any missed theme changes after successful authentication
287 + if (widget.appStore.themeStore.themeMode == ThemeMode.system) {
288 + Future.delayed(Duration(milliseconds: 100), () {
289 + final systemTheme = widget.appStore.themeStore.getThemeFromSystem();
290 + if (widget.appStore.themeStore.currentTheme != systemTheme) {
291 + widget.appStore.themeStore.setTheme(systemTheme);
292 + }
293 + });
294 + }
295 }
296
297 void _setInactive(bool value) {
lib/src/screens/seed/wallet_seed_page.dart
+5 -8
@@ -68,19 +68,16 @@ class WalletSeedPage extends BasePage {
68 crossAxisAlignment: CrossAxisAlignment.center,
69 children: <Widget>[
70 SizedBox(height: 16),
71 - WarningBox(
72 - content: S.current.cake_seeds_save_disclaimer,
73 - currentTheme: currentTheme,
74 - ),
71 + WarningBox(content: S.current.cake_seeds_save_disclaimer),
72 SizedBox(height: 36),
73 Text(
74 key: ValueKey('wallet_seed_page_wallet_name_text_key'),
75 walletSeedViewModel.name,
76 style: Theme.of(context).textTheme.bodyMedium!.copyWith(
80 - fontSize: 18,
81 - fontWeight: FontWeight.w600,
82 - color: Theme.of(context).colorScheme.onSurface,
83 - ),
77 + fontSize: 18,
78 + fontWeight: FontWeight.w600,
79 + color: Theme.of(context).colorScheme.onSurface,
80 + ),
81 ),
82 SizedBox(height: 24),
83 Expanded(
lib/src/screens/send/send_page.dart
-4
@@ -580,7 +580,6 @@ class SendPage extends BasePage {
580 key: ValueKey('send_page_confirm_sending_bottom_sheet_key'),
581 titleText: S.of(bottomSheetContext).confirm_transaction,
582 accessibleNavigationModeSlideActionButtonText: S.of(bottomSheetContext).send,
583 - currentTheme: currentTheme,
583 footerType: FooterType.slideActionButton,
584 walletType: sendViewModel.walletType,
585 titleIconPath: sendViewModel.selectedCryptoCurrency.iconPath,
@@ -630,7 +629,6 @@ class SendPage extends BasePage {
629 builder: (BuildContext bottomSheetContext) {
630 return showContactSheet && sendViewModel.ocpRequest == null
631 ? InfoBottomSheet(
633 - currentTheme: currentTheme,
632 footerType: FooterType.doubleActionButton,
633 titleText: S.of(bottomSheetContext).transaction_sent,
634 contentImage: 'assets/images/contact.png',
@@ -684,7 +682,6 @@ class SendPage extends BasePage {
682 },
683 )
684 : InfoBottomSheet(
687 - currentTheme: currentTheme,
685 footerType: FooterType.singleActionButton,
686 titleText: S.of(bottomSheetContext).transaction_sent,
687 contentImage: 'assets/images/birthday_cake.png',
@@ -747,7 +744,6 @@ class SendPage extends BasePage {
744 builder: (context) {
745 dialogContext = context;
746 return InfoBottomSheet(
750 - currentTheme: currentTheme,
747 footerType: FooterType.singleActionButton,
748 titleText: S.of(context).proceed_on_device,
749 contentImage: 'assets/images/hardware_wallet/ledger_nano_x.png',
lib/src/screens/send/widgets/send_card.dart
+5 -4
@@ -121,8 +121,11 @@ class SendCardState extends State<SendCard> with AutomaticKeepAliveClientMixin<S
121 WidgetsBinding.instance.addPostFrameCallback(
122 (timeStamp) {
123 if (mounted) {
124 - final prefix = initialPaymentRequest!.scheme.isNotEmpty ? "${initialPaymentRequest!.scheme}:" : "";
125 - final amount = initialPaymentRequest!.amount.isNotEmpty ? "?amount=${initialPaymentRequest!.amount}" : "";
124 + final prefix =
125 + initialPaymentRequest!.scheme.isNotEmpty ? "${initialPaymentRequest!.scheme}:" : "";
126 + final amount = initialPaymentRequest!.amount.isNotEmpty
127 + ? "?amount=${initialPaymentRequest!.amount}"
128 + : "";
129 final uri = prefix + initialPaymentRequest!.address + amount;
130 _handlePaymentFlow(uri, initialPaymentRequest!);
131 }
@@ -188,7 +191,6 @@ class SendCardState extends State<SendCard> with AutomaticKeepAliveClientMixin<S
191 paymentFlowResult: result,
192 paymentViewModel: paymentViewModel,
193 walletSwitcherViewModel: walletSwitcherViewModel,
191 - currentTheme: currentTheme,
194 paymentRequest: paymentRequest,
195 onSelectWallet: () => _handleSelectWallet(
196 paymentViewModel,
@@ -221,7 +223,6 @@ class SendCardState extends State<SendCard> with AutomaticKeepAliveClientMixin<S
223 builder: (BuildContext dialogContext) {
224 return WalletSwitcherBottomSheet(
225 viewModel: walletSwitcherViewModel,
224 - currentTheme: currentTheme,
226 filterWalletType: paymentViewModel.detectedWalletType,
227 );
228 },
lib/src/screens/send/widgets/send_template_card.dart
+6 -5
@@ -14,11 +14,12 @@ import 'package:cake_wallet/src/widgets/base_text_form_field.dart';
14 import 'package:mobx/mobx.dart';
15
16 class SendTemplateCard extends StatelessWidget {
17 - SendTemplateCard(
18 - {super.key,
19 - required this.template,
20 - required this.index,
21 - required this.sendTemplateViewModel});
17 + SendTemplateCard({
18 + super.key,
19 + required this.template,
20 + required this.index,
21 + required this.sendTemplateViewModel,
22 + });
23
24 final TemplateViewModel template;
25 final int index;
lib/src/screens/settings/background_sync_page.dart
+33 -25
@@ -1,18 +1,15 @@
1 import 'dart:async';
2 -import 'dart:io';
2
3 import 'package:cake_wallet/generated/i18n.dart';
4 import 'package:cake_wallet/src/screens/base_page.dart';
5 import 'package:cake_wallet/src/screens/settings/widgets/settings_picker_cell.dart';
6 import 'package:cake_wallet/src/screens/settings/widgets/settings_switcher_cell.dart';
8 -import 'package:cake_wallet/src/widgets/alert_with_no_action.dart.dart';
7 import 'package:cake_wallet/src/widgets/alert_with_one_action.dart';
8 import 'package:cake_wallet/utils/show_pop_up.dart';
9 import 'package:cake_wallet/view_model/dashboard/dashboard_view_model.dart';
10 import 'package:cake_wallet/view_model/settings/sync_mode.dart';
11 import 'package:flutter/material.dart';
12 import 'package:flutter_mobx/flutter_mobx.dart';
15 -import 'package:permission_handler/permission_handler.dart';
13
14 class BackgroundSyncPage extends BasePage {
15 BackgroundSyncPage(this.dashboardViewModel);
@@ -36,12 +33,14 @@ class BackgroundSyncPage extends BasePage {
33 onValueChange: (_, bool value) async {
34 if (value) {
35 if (dashboardViewModel.batteryOptimizationEnabled) {
39 - await showPopUp(context: context, builder: (context) => AlertWithOneAction(
40 - alertTitle: S.current.background_sync,
41 - alertContent: S.current.unrestricted_background_service_notice,
42 - buttonText: S.current.ok,
43 - buttonAction: () => Navigator.of(context).pop(),
44 - ));
36 + await showPopUp(
37 + context: context,
38 + builder: (context) => AlertWithOneAction(
39 + alertTitle: S.current.background_sync,
40 + alertContent: S.current.unrestricted_background_service_notice,
41 + buttonText: S.current.ok,
42 + buttonAction: () => Navigator.of(context).pop(),
43 + ));
44 await dashboardViewModel.disableBatteryOptimization();
45 for (var i = 0; i < 4 * 60; i++) {
46 await Future.delayed(Duration(milliseconds: 250));
@@ -65,16 +64,20 @@ class BackgroundSyncPage extends BasePage {
64 items: SyncMode.all,
65 displayItem: (SyncMode syncMode) => syncMode.name,
66 selectedItem: dashboardViewModel.settingsStore.currentSyncMode,
68 - onItemSelected: (dashboardViewModel.batteryOptimizationEnabled && dashboardViewModel.hasBatteryOptimization) ? null : (syncMode) async {
69 - dashboardViewModel.setSyncMode(syncMode);
70 - });
67 + onItemSelected: (dashboardViewModel.batteryOptimizationEnabled &&
68 + dashboardViewModel.hasBatteryOptimization)
69 + ? null
70 + : (syncMode) async {
71 + dashboardViewModel.setSyncMode(syncMode);
72 + });
73 }),
74 if (dashboardViewModel.hasBgsyncNetworkConstraints)
75 Observer(builder: (context) {
76 return SettingsSwitcherCell(
77 title: S.current.background_sync_on_unmetered_network,
78 value: dashboardViewModel.backgroundSyncNetworkUnmetered,
77 - onValueChange: (_, bool value) => dashboardViewModel.setBackgroundSyncNetworkUnmetered(value),
79 + onValueChange: (_, bool value) =>
80 + dashboardViewModel.setBackgroundSyncNetworkUnmetered(value),
81 );
82 }),
83 if (dashboardViewModel.hasBgsyncBatteryNotLowConstraints)
@@ -82,7 +85,8 @@ class BackgroundSyncPage extends BasePage {
85 return SettingsSwitcherCell(
86 title: S.current.background_sync_on_battery_low,
87 value: !dashboardViewModel.backgroundSyncBatteryNotLow,
85 - onValueChange: (_, bool value) => dashboardViewModel.setBackgroundSyncBatteryNotLow(!value),
88 + onValueChange: (_, bool value) =>
89 + dashboardViewModel.setBackgroundSyncBatteryNotLow(!value),
90 );
91 }),
92 if (dashboardViewModel.hasBgsyncChargingConstraints)
@@ -90,7 +94,8 @@ class BackgroundSyncPage extends BasePage {
94 return SettingsSwitcherCell(
95 title: S.current.background_sync_on_charging,
96 value: dashboardViewModel.backgroundSyncCharging,
93 - onValueChange: (_, bool value) => dashboardViewModel.setBackgroundSyncCharging(value),
97 + onValueChange: (_, bool value) =>
98 + dashboardViewModel.setBackgroundSyncCharging(value),
99 );
100 }),
101 if (dashboardViewModel.hasBgsyncDeviceIdleConstraints)
@@ -98,25 +103,28 @@ class BackgroundSyncPage extends BasePage {
103 return SettingsSwitcherCell(
104 title: S.current.background_sync_on_device_idle,
105 value: dashboardViewModel.backgroundSyncDeviceIdle,
101 - onValueChange: (_, bool value) => dashboardViewModel.setBackgroundSyncDeviceIdle(value),
106 + onValueChange: (_, bool value) =>
107 + dashboardViewModel.setBackgroundSyncDeviceIdle(value),
108 );
109 }),
110 Observer(builder: (context) {
111 return SettingsSwitcherCell(
112 title: S.current.new_transactions_notifications,
113 value: dashboardViewModel.backgroundSyncNotificationsEnabled,
108 - onValueChange: (_, bool value) {
114 + onValueChange: (_, bool value) {
115 try {
116 dashboardViewModel.setBackgroundSyncNotificationsEnabled(value);
117 } catch (e) {
112 - showPopUp(context: context, builder: (context) => AlertWithOneAction(
113 - alertTitle: S.current.error,
114 - alertContent: S.current.notification_permission_denied,
115 - buttonText: S.current.ok,
116 - buttonAction: () {
117 - Navigator.of(context).pop();
118 - },
119 - ));
118 + showPopUp(
119 + context: context,
120 + builder: (context) => AlertWithOneAction(
121 + alertTitle: S.current.error,
122 + alertContent: S.current.notification_permission_denied,
123 + buttonText: S.current.ok,
124 + buttonAction: () {
125 + Navigator.of(context).pop();
126 + },
127 + ));
128 }
129 },
130 );
lib/src/screens/settings/display_settings_page.dart
+55 -10
@@ -3,6 +3,7 @@ import 'package:cake_wallet/entities/language_service.dart';
3 import 'package:cake_wallet/entities/sync_status_display_mode.dart';
4 import 'package:cake_wallet/generated/i18n.dart';
5 import 'package:cake_wallet/src/screens/base_page.dart';
6 +import 'package:cake_wallet/src/screens/settings/widgets/settings_choices_cell.dart';
7 import 'package:cake_wallet/src/screens/settings/widgets/settings_picker_cell.dart';
8 import 'package:cake_wallet/src/screens/settings/widgets/settings_switcher_cell.dart';
9 import 'package:cake_wallet/src/screens/settings/widgets/settings_theme_choice.dart';
@@ -12,6 +13,7 @@ import 'package:cake_wallet/utils/device_info.dart';
13 import 'package:cake_wallet/utils/feature_flag.dart';
14 import 'package:cake_wallet/utils/responsive_layout_util.dart';
15 import 'package:cake_wallet/utils/show_pop_up.dart';
16 +import 'package:cake_wallet/view_model/settings/choices_list_item.dart';
17 import 'package:cake_wallet/view_model/settings/display_settings_view_model.dart';
18 import 'package:flutter/material.dart';
19 import 'package:flutter_mobx/flutter_mobx.dart';
@@ -32,6 +34,7 @@ class DisplaySettingsPage extends BasePage {
34 return Container(
35 padding: EdgeInsets.only(top: 10),
36 child: Column(
37 + crossAxisAlignment: CrossAxisAlignment.start,
38 children: [
39 SettingsSwitcherCell(
40 title: S.of(context).show_market_place,
@@ -100,17 +103,59 @@ class DisplaySettingsPage extends BasePage {
103 ),
104
105 if (responsiveLayoutUtil.shouldRenderMobileUI && DeviceInfo.instance.isMobile) ...[
103 - SettingsSwitcherCell(
104 - title: S.of(context).use_device_theme,
105 - value: _displaySettingsViewModel.themeMode == ThemeMode.system,
106 - onValueChange: (_, bool value) {
107 - _displaySettingsViewModel
108 - .setThemeMode(value ? ThemeMode.system : ThemeMode.dark);
109 - },
106 + SizedBox(height: 24),
107 + Padding(
108 + padding: const EdgeInsets.only(left: 24),
109 + child: Text(
110 + S.current.appearance,
111 + style: Theme.of(context).textTheme.bodyMedium?.copyWith(
112 + fontWeight: FontWeight.w400,
113 + fontSize: 14,
114 + height: 22 / 14,
115 + color: Theme.of(context).colorScheme.onSurface,
116 + ),
117 + ),
118 ),
111 - Semantics(
112 - label: S.of(context).color_theme,
113 - child: SettingsThemeChoicesCell(_displaySettingsViewModel),
119 + SizedBox(height: 12),
120 + Container(
121 + margin: EdgeInsets.symmetric(horizontal: 20),
122 + decoration: BoxDecoration(
123 + color: Theme.of(context).colorScheme.surfaceContainer,
124 + borderRadius: BorderRadius.circular(16),
125 + ),
126 + child: Column(
127 + children: [
128 + SettingsChoicesCell(
129 + ChoicesListItem<ThemeMode>(
130 + title: "",
131 + items: ThemeMode.values,
132 + selectedItem: _displaySettingsViewModel.themeMode,
133 + onItemSelected: (ThemeMode themeMode) =>
134 + _displaySettingsViewModel.setThemeMode(themeMode),
135 + displayItem: (ThemeMode themeMode) {
136 + return themeMode.name[0].toUpperCase() +
137 + themeMode.name.substring(1).toLowerCase();
138 + },
139 + ),
140 + useGenericColor: false,
141 + padding: EdgeInsets.all(12),
142 + ),
143 + Container(
144 + decoration: BoxDecoration(
145 + color: Theme.of(context).colorScheme.surfaceContainerHigh,
146 + borderRadius: BorderRadius.circular(16),
147 + ),
148 + child: Column(
149 + children: [
150 + Semantics(
151 + label: S.of(context).color_theme,
152 + child: SettingsThemeChoicesCell(_displaySettingsViewModel),
153 + ),
154 + ],
155 + ),
156 + ),
157 + ],
158 + ),
159 ),
160 ],
161 ],
lib/src/screens/settings/security_backup_page.dart
+2 -2
@@ -114,8 +114,8 @@ class SecurityBackupPage extends BasePage {
114 key: ValueKey('security_backup_page_sign_and_verify'),
115 title: S.current.sign_verify_title,
116 handler: (_) => Navigator.of(context).pushNamed(Routes.signPage)
117 - //_securitySettingsViewModel.pinCodeRequiredDuration,
118 - ),
117 + //_securitySettingsViewModel.pinCodeRequiredDuration,
118 + ),
119 Observer(
120 builder: (context) {
121 return SettingsCellWithArrow(
lib/src/screens/settings/trocador_providers_page.dart
+12 -8
@@ -53,7 +53,11 @@ class TrocadorProvidersPage extends BasePage {
53 }
54
55 class Badge extends StatelessWidget {
56 - Badge({required this.textColor, required this.backgroundColor, required this.title, required this.subTitle});
56 + Badge(
57 + {required this.textColor,
58 + required this.backgroundColor,
59 + required this.title,
60 + required this.subTitle});
61
62 final String title;
63 final String subTitle;
@@ -79,10 +83,10 @@ class Badge extends StatelessWidget {
83 title,
84 textAlign: TextAlign.center,
85 style: Theme.of(context).textTheme.bodySmall!.copyWith(
82 - color: textColor,
83 - fontSize: 7,
84 - fontWeight: FontWeight.w600,
85 - ),
86 + color: textColor,
87 + fontSize: 7,
88 + fontWeight: FontWeight.w600,
89 + ),
90 ),
91 VerticalDivider(
92 color: textColor,
@@ -91,9 +95,9 @@ class Badge extends StatelessWidget {
95 Text(
96 subTitle,
97 style: Theme.of(context).textTheme.bodySmall!.copyWith(
94 - color: textColor,
95 - fontWeight: FontWeight.w600,
96 - ),
98 + color: textColor,
99 + fontWeight: FontWeight.w600,
100 + ),
101 ),
102 ],
103 ),
lib/src/screens/settings/widgets/setting_priority_picker_cell.dart
+14 -14
@@ -4,20 +4,20 @@ import 'package:cake_wallet/src/widgets/picker.dart';
4 import 'package:cake_wallet/src/widgets/standard_list.dart';
5
6 class SettingsPriorityPickerCell<ItemType> extends StandardListRow {
7 - SettingsPriorityPickerCell(
8 - {required String title,
9 - required this.selectedItem,
10 - required this.items,
11 - this.displayItem,
12 - this.images,
13 - this.searchHintText,
14 - this.isGridView = false,
15 - this.matchingCriteria,
16 - this.customValue,
17 - this.maxValue,
18 - this.customItemIndex,
19 - this.onItemSelected})
20 - : super(
7 + SettingsPriorityPickerCell({
8 + required String title,
9 + required this.selectedItem,
10 + required this.items,
11 + this.displayItem,
12 + this.images,
13 + this.searchHintText,
14 + this.isGridView = false,
15 + this.matchingCriteria,
16 + this.customValue,
17 + this.maxValue,
18 + this.customItemIndex,
19 + this.onItemSelected,
20 + }) : super(
21 title: title,
22 isSelected: false,
23 onTap: (BuildContext context) async {
lib/src/screens/settings/widgets/settings_choices_cell.dart
+15 -4
@@ -2,15 +2,19 @@ import 'package:cake_wallet/view_model/settings/choices_list_item.dart';
2 import 'package:flutter/material.dart';
3
4 class SettingsChoicesCell extends StatelessWidget {
5 - const SettingsChoicesCell(this.choicesListItem, {Key? key}) : super(key: key);
5 + const SettingsChoicesCell(this.choicesListItem,
6 + {this.useGenericColor = true, this.padding, Key? key})
7 + : super(key: key);
8
9 final ChoicesListItem<dynamic> choicesListItem;
10 + final bool useGenericColor;
11 + final EdgeInsets? padding;
12
13 @override
14 Widget build(BuildContext context) {
15 return Container(
12 - color: Theme.of(context).colorScheme.surface,
13 - padding: EdgeInsets.only(left: 24, right: 24, top: 16, bottom: 16),
16 + color: useGenericColor ? Theme.of(context).colorScheme.surface : null,
17 + padding: padding ?? EdgeInsets.only(left: 24, right: 24, top: 16, bottom: 16),
18 child: Column(
19 mainAxisSize: MainAxisSize.min,
20 crossAxisAlignment: CrossAxisAlignment.start,
@@ -30,7 +34,14 @@ class SettingsChoicesCell extends StatelessWidget {
34 child: Container(
35 decoration: BoxDecoration(
36 borderRadius: BorderRadius.circular(10),
33 - color: Theme.of(context).colorScheme.surfaceContainerHighest,
37 + border: useGenericColor
38 + ? null
39 + : Border.all(
40 + color: Theme.of(context).colorScheme.surfaceContainerHighest,
41 + width: 1.5,
42 + ),
43 + color:
44 + useGenericColor ? Theme.of(context).colorScheme.surfaceContainerHighest : null,
45 ),
46 child: Row(
47 mainAxisAlignment: MainAxisAlignment.center,
lib/src/screens/settings/widgets/settings_switcher_cell.dart
+7 -1
@@ -11,16 +11,21 @@ class SettingsSwitcherCell extends StandardListRow {
11 this.leading,
12 void Function(BuildContext context)? onTap,
13 Key? key,
14 + this.padding,
15 + this.switchBackgroundColor,
16 }) : super(title: title, isSelected: false, decoration: decoration, onTap: onTap, key: key);
17
18 final bool value;
19 + final Color? switchBackgroundColor;
20 final void Function(BuildContext context, bool value)? onValueChange;
21 final Widget? leading;
22 + final EdgeInsets? padding;
23
24 @override
25 Widget buildTrailing(BuildContext context) => StandardSwitch(
26 value: value,
27 onTapped: () => onValueChange?.call(context, !value),
28 + backgroundColor: switchBackgroundColor,
29 );
30
31 @override
@@ -29,7 +34,7 @@ class SettingsSwitcherCell extends StandardListRow {
34 final trailing = buildTrailing(context);
35 return Container(
36 height: 56,
32 - padding: EdgeInsets.only(left: 12, right: 12),
37 + padding: padding ?? EdgeInsets.only(left: 12, right: 12),
38 child: TextButton(
39 onPressed: () {
40 if (onTap != null) {
@@ -39,6 +44,7 @@ class SettingsSwitcherCell extends StandardListRow {
44 }
45 },
46 style: ButtonStyle(
47 + padding: WidgetStateProperty.all(padding ?? null),
48 //backgroundColor: MaterialStateProperty.all(Theme.of(context).colorScheme.surfaceContainer),
49 shape: WidgetStateProperty.all(
50 RoundedRectangleBorder(
lib/src/screens/settings/widgets/settings_theme_choice.dart
+126 -84
@@ -1,112 +1,154 @@
1 import 'package:cake_wallet/generated/i18n.dart';
2 +import 'package:cake_wallet/src/screens/settings/widgets/settings_switcher_cell.dart';
3 +import 'package:cake_wallet/src/widgets/cake_image_widget.dart';
4 import 'package:cake_wallet/themes/core/material_base_theme.dart';
3 -import 'package:cake_wallet/themes/utils/theme_list.dart';
5 +import 'package:cake_wallet/themes/theme_classes/black_theme.dart';
6 import 'package:cake_wallet/view_model/settings/display_settings_view_model.dart';
7 import 'package:flutter/material.dart';
8 +import 'package:flutter_mobx/flutter_mobx.dart';
9
10 class SettingsThemeChoicesCell extends StatelessWidget {
11 SettingsThemeChoicesCell(this._displaySettingsViewModel);
12
10 - final items = ThemeList.all;
11 -
13 final DisplaySettingsViewModel _displaySettingsViewModel;
14
15 final double cellHeight = 25;
16 final double cellWidth = 12;
16 - final double cellRadius = 6;
17 + final double cellRadius = 8;
18
19 @override
20 Widget build(BuildContext context) {
20 - return Container(
21 - padding: EdgeInsets.all(cellHeight),
22 - child: Column(
23 - mainAxisSize: MainAxisSize.min,
24 - crossAxisAlignment: CrossAxisAlignment.start,
25 - children: [
26 - Row(
21 + return Observer(
22 + builder: (context) {
23 + final availableThemes = _displaySettingsViewModel.availableThemes;
24 + final currentTheme = _displaySettingsViewModel.currentTheme;
25 + final availableAccentColors = _displaySettingsViewModel.availableAccentColors;
26 + final screenHeight = MediaQuery.of(context).size.height;
27 +
28 + final previewHeight = _getResponsivePreviewHeight(screenHeight);
29 + final previewWidth = previewHeight * 0.6;
30 +
31 + return Container(
32 + height: getHeight(context, currentTheme, currentTheme.hasAccentColors),
33 + padding: EdgeInsets.all(12),
34 + child: Column(
35 + mainAxisSize: MainAxisSize.min,
36 + crossAxisAlignment: CrossAxisAlignment.start,
37 children: [
28 - Text(
29 - S.current.color_theme,
30 - style: Theme.of(context).textTheme.bodyMedium,
31 - ),
32 - ],
33 - ),
34 - SizedBox(height: cellHeight),
35 - GridView.builder(
36 - itemCount: items.length,
37 - shrinkWrap: true,
38 - physics: NeverScrollableScrollPhysics(),
39 - gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
40 - crossAxisCount: 3,
41 - mainAxisExtent: 75,
42 - crossAxisSpacing: 20,
43 - ),
44 - itemBuilder: (context, index) {
45 - final MaterialThemeBase e = items[index];
46 - final currentTheme = _displaySettingsViewModel.theme;
47 - final isSelected = currentTheme == e;
38 + Expanded(
39 + child: ListView.builder(
40 + itemCount: availableThemes.length,
41 + scrollDirection: Axis.horizontal,
42 + itemBuilder: (context, index) {
43 + final MaterialThemeBase theme = availableThemes[index];
44 + final isSelected = _displaySettingsViewModel.isThemeSelected(theme);
45
49 - return Padding(
50 - padding: EdgeInsets.all(5),
51 - child: Semantics(
52 - label: e.toString(),
53 - selected: isSelected,
54 - child: GestureDetector(
55 - onTap: () {
56 - _displaySettingsViewModel.onThemeSelected(e);
57 - },
58 - child: Container(
59 - padding: EdgeInsets.all(5),
60 - decoration: BoxDecoration(
61 - borderRadius: BorderRadius.circular(cellRadius),
62 - border: isSelected
63 - ? Border.all(color: Theme.of(context).colorScheme.primary)
64 - : null,
65 - color: Theme.of(context)
66 - .colorScheme
67 - .onSurfaceVariant
68 - .withOpacity(currentTheme.brightness == Brightness.light ? 0.1 : 0.3),
69 - ),
70 - child: Row(
71 - mainAxisAlignment: MainAxisAlignment.center,
72 - children: [
73 - Container(
74 - padding:
75 - EdgeInsets.symmetric(horizontal: cellWidth, vertical: cellHeight),
76 - decoration: BoxDecoration(
77 - borderRadius: BorderRadius.only(
78 - topLeft: Radius.circular(cellRadius),
79 - bottomLeft: Radius.circular(cellRadius),
80 - ),
81 - color: e.colorScheme.primary,
82 - ),
46 + return Semantics(
47 + label: theme.toString(),
48 + selected: isSelected,
49 + child: GestureDetector(
50 + onTap: () {
51 + _displaySettingsViewModel.onThemeSelected(theme);
52 + },
53 + child: Container(
54 + margin: EdgeInsets.only(right: 24),
55 + decoration: BoxDecoration(
56 + borderRadius: BorderRadius.circular(cellRadius),
57 + border: isSelected
58 + ? Border.all(
59 + color: Theme.of(context).colorScheme.primary,
60 + strokeAlign: BorderSide.strokeAlignOutside)
61 + : null,
62 ),
84 - Container(
85 - padding:
86 - EdgeInsets.symmetric(horizontal: cellWidth, vertical: cellHeight),
87 - decoration: BoxDecoration(color: e.colorScheme.surface),
63 + child: ClipRRect(
64 + borderRadius: BorderRadius.circular(cellRadius),
65 + child: CakeImageWidget(
66 + imageUrl: _displaySettingsViewModel.getImageForTheme(theme),
67 + fit: BoxFit.cover,
68 + height: previewHeight,
69 + width: previewWidth,
70 + ),
71 ),
89 - Container(
90 - padding:
91 - EdgeInsets.symmetric(horizontal: cellWidth, vertical: cellHeight),
92 - decoration: BoxDecoration(
93 - borderRadius: BorderRadius.only(
94 - topRight: Radius.circular(cellRadius),
95 - bottomRight: Radius.circular(cellRadius),
72 + ),
73 + ),
74 + );
75 + },
76 + ),
77 + ),
78 + if (_displaySettingsViewModel.currentTheme.hasAccentColors) ...[
79 + SizedBox(height: cellHeight),
80 + Row(
81 + mainAxisAlignment: MainAxisAlignment.spaceBetween,
82 + children: [
83 + Text(
84 + S.of(context).accent_color,
85 + style: Theme.of(context).textTheme.bodyMedium,
86 + ),
87 + Container(
88 + height: 40,
89 + child: Row(
90 + children: availableAccentColors.map((accentColor) {
91 + final isSelected = _displaySettingsViewModel
92 + .isAccentColorSelected(accentColor.name.toLowerCase());
93 + return GestureDetector(
94 + onTap: () {
95 + _displaySettingsViewModel
96 + .onAccentColorSelected(accentColor.name.toLowerCase());
97 + },
98 + child: Container(
99 + width: 26,
100 + height: 26,
101 + margin: EdgeInsets.only(right: 11),
102 + decoration: BoxDecoration(
103 + borderRadius: BorderRadius.circular(16),
104 + border: isSelected
105 + ? Border.all(
106 + color: Theme.of(context).colorScheme.onSurfaceVariant,
107 + width: 3)
108 + : null,
109 + color: accentColor.color,
110 ),
97 - color: e.colorScheme.tertiary,
111 ),
99 - ),
100 - ],
112 + );
113 + }).toList(),
114 ),
115 ),
103 - ),
116 + ],
117 ),
105 - );
106 - },
118 + ],
119 + if (_displaySettingsViewModel.currentTheme is BlackTheme)
120 + SettingsSwitcherCell(
121 + title: S.current.oled_mode,
122 + value: _displaySettingsViewModel.isBlackThemeOledEnabled,
123 + onValueChange: (_, bool value) {
124 + _displaySettingsViewModel.setBlackThemeOled(value);
125 + },
126 + padding: EdgeInsets.zero,
127 + switchBackgroundColor: currentTheme.colorScheme.secondaryContainer,
128 + ),
129 + ],
130 ),
108 - ],
109 - ),
131 + );
132 + },
133 );
134 }
135 +
136 + double getHeight(BuildContext context, MaterialThemeBase theme, bool hasAccentColors) {
137 + final screenHeight = MediaQuery.of(context).size.height;
138 +
139 + double baseHeight = (screenHeight * 0.25).clamp(150.0, screenHeight * 0.5);
140 +
141 + if (hasAccentColors) {
142 + baseHeight += (screenHeight * 0.05).clamp(35.0, 60.0);
143 + }
144 +
145 + if (theme is BlackTheme) {
146 + baseHeight += (screenHeight * 0.08).clamp(48.0, 96.0);
147 + }
148 +
149 + return baseHeight;
150 + }
151 +
152 + double _getResponsivePreviewHeight(double screenHeight) =>
153 + (screenHeight * 0.22).clamp(160.0, 240.0);
154 }
lib/src/screens/support/support_page.dart
-4
@@ -12,10 +12,6 @@ class SupportPage extends BasePage {
12
13 final SupportViewModel supportViewModel;
14
15 - final imageLiveSupport = Image.asset('assets/images/cake_icon.png');
16 - final imageWalletGuides = Image.asset('assets/images/wallet_guides.png');
17 - final imageMoreLinks = Image.asset('assets/images/more_links.png');
18 -
15 @override
16 String get title => S.current.settings_support;
17
lib/src/screens/transaction_details/rbf_details_page.dart
+10 -7
@@ -121,7 +121,6 @@ class RBFDetailsPage extends BasePage {
121 }
122
123 reaction((_) => transactionDetailsViewModel.sendViewModel.state, (ExecutionState state) {
124 -
124 if (state is! IsExecutingState &&
125 loadingBottomSheetContext != null &&
126 loadingBottomSheetContext!.mounted) {
@@ -191,16 +190,20 @@ class RBFDetailsPage extends BasePage {
190 return ConfirmSendingBottomSheet(
191 key: ValueKey('rbf_confirm_sending_bottom_sheet'),
192 titleText: S.of(bottomSheetContext).confirm_transaction,
194 - currentTheme: currentTheme,
193 walletType: transactionDetailsViewModel.sendViewModel.walletType,
196 - titleIconPath: transactionDetailsViewModel.sendViewModel.selectedCryptoCurrency.iconPath,
194 + titleIconPath:
195 + transactionDetailsViewModel.sendViewModel.selectedCryptoCurrency.iconPath,
196 currency: transactionDetailsViewModel.sendViewModel.selectedCryptoCurrency,
197 amount: S.of(bottomSheetContext).send_amount,
199 - amountValue: transactionDetailsViewModel.sendViewModel.pendingTransaction!.amountFormatted,
200 - fiatAmountValue: transactionDetailsViewModel.sendViewModel.pendingTransactionFiatAmountFormatted,
198 + amountValue:
199 + transactionDetailsViewModel.sendViewModel.pendingTransaction!.amountFormatted,
200 + fiatAmountValue: transactionDetailsViewModel
201 + .sendViewModel.pendingTransactionFiatAmountFormatted,
202 fee: S.of(bottomSheetContext).send_fee,
202 - feeValue: transactionDetailsViewModel.sendViewModel.pendingTransaction!.feeFormatted,
203 - feeFiatAmount: transactionDetailsViewModel.sendViewModel.pendingTransactionFeeFiatAmountFormatted,
203 + feeValue:
204 + transactionDetailsViewModel.sendViewModel.pendingTransaction!.feeFormatted,
205 + feeFiatAmount: transactionDetailsViewModel
206 + .sendViewModel.pendingTransactionFeeFiatAmountFormatted,
207 outputs: transactionDetailsViewModel.sendViewModel.outputs,
208 footerType: FooterType.slideActionButton,
209 accessibleNavigationModeSlideActionButtonText: S.of(context).send,
lib/src/screens/unspent_coins/unspent_coins_details_page.dart
+6 -4
@@ -50,10 +50,12 @@ class UnspentCoinsDetailsPage extends BasePage {
50
51 if (item is UnspentCoinsSwitchItem) {
52 return Observer(
53 - builder: (_) => UnspentCoinsSwitchRow(
54 - title: item.title,
55 - switchValue: item.switchValue(),
56 - onSwitchValueChange: item.onSwitchValueChange));
53 + builder: (_) => UnspentCoinsSwitchRow(
54 + title: item.title,
55 + switchValue: item.switchValue(),
56 + onSwitchValueChange: item.onSwitchValueChange,
57 + ),
58 + );
59 }
60
61 if (item is BlockExplorerListItem) {
lib/src/screens/wallet_connect/utils/method_utils.dart
+1 -1
@@ -5,7 +5,7 @@ import 'package:cake_wallet/src/screens/wallet_connect/models/wc_connection_mode
5 import 'package:cake_wallet/src/screens/wallet_connect/services/walletkit_service.dart';
6 import 'package:cake_wallet/src/screens/wallet_connect/widgets/wc_connection_widget.dart';
7 import 'package:cake_wallet/src/screens/wallet_connect/widgets/wc_request_widget.dart';
8 -import 'package:cake_wallet/themes/utils/custom_theme_colors.dart';
8 +import 'package:cake_wallet/themes/core/custom_theme_colors.dart';
9 import 'package:flutter/material.dart';
10 import 'package:reown_walletkit/reown_walletkit.dart';
11
lib/src/screens/wallet_connect/widgets/wc_request_widget.dart
-5
@@ -1,9 +1,7 @@
1 -import 'package:cake_wallet/di.dart';
1 import 'package:cake_wallet/generated/i18n.dart';
2 import 'package:cake_wallet/src/screens/wallet_connect/services/bottom_sheet_service.dart';
3 import 'package:cake_wallet/src/screens/wallet_connect/widgets/wc_verify_context_widget.dart';
4 import 'package:cake_wallet/src/widgets/primary_button.dart';
6 -import 'package:cake_wallet/themes/core/theme_store.dart';
5 import 'package:flutter/material.dart';
6 import 'package:reown_walletkit/reown_walletkit.dart';
7
@@ -22,13 +20,10 @@ class WCRequestWidget extends StatelessWidget {
20
21 @override
22 Widget build(BuildContext context) {
25 - final currentTheme = getIt.get<ThemeStore>().currentTheme;
26 -
23 return Column(
24 mainAxisSize: MainAxisSize.min,
25 children: [
26 WCVerifyContextWidget(
31 - currentTheme: currentTheme,
27 verifyContext: verifyContext,
28 ),
29 const SizedBox(height: 8),
lib/src/screens/wallet_connect/widgets/wc_verify_context_widget.dart
+1 -4
@@ -1,6 +1,5 @@
1 import 'package:cake_wallet/generated/i18n.dart';
2 -import 'package:cake_wallet/themes/core/material_base_theme.dart';
3 -import 'package:cake_wallet/themes/utils/custom_theme_colors.dart';
2 +import 'package:cake_wallet/themes/core/custom_theme_colors.dart';
3 import 'package:flutter/material.dart';
4 import 'package:reown_walletkit/reown_walletkit.dart';
5
@@ -8,11 +7,9 @@ class WCVerifyContextWidget extends StatelessWidget {
7 const WCVerifyContextWidget({
8 super.key,
9 required this.verifyContext,
11 - required this.currentTheme,
10 });
11
12 final VerifyContext? verifyContext;
15 - final MaterialThemeBase currentTheme;
13
14 @override
15 Widget build(BuildContext context) {
lib/src/screens/wallet_keys/wallet_keys_page.dart
+5 -6
@@ -7,7 +7,6 @@ import 'package:cake_wallet/src/widgets/primary_button.dart';
7 import 'package:cake_wallet/src/widgets/seedphrase_grid_widget.dart';
8 import 'package:cake_wallet/src/widgets/text_info_box.dart';
9 import 'package:cake_wallet/src/widgets/warning_box_widget.dart';
10 -import 'package:cake_wallet/themes/core/material_base_theme.dart';
10 import 'package:cake_wallet/utils/brightness_util.dart';
11 import 'package:cake_wallet/utils/clipboard_util.dart';
12 import 'package:cake_wallet/utils/show_bar.dart';
@@ -36,13 +35,11 @@ class WalletKeysPage extends BasePage {
35 child: WarningBox(
36 key: const ValueKey('wallet_keys_page_share_warning_text_key'),
37 content: S.of(context).do_not_share_warning_text.toUpperCase(),
39 - currentTheme: currentTheme,
38 ),
39 ),
40 Expanded(
41 child: WalletKeysPageBody(
42 walletKeysViewModel: walletKeysViewModel,
45 - currentTheme: currentTheme,
43 ),
44 ),
45 ],
@@ -54,11 +51,9 @@ class WalletKeysPage extends BasePage {
51 class WalletKeysPageBody extends StatefulWidget {
52 WalletKeysPageBody({
53 required this.walletKeysViewModel,
57 - required this.currentTheme,
54 });
55
56 final WalletKeysViewModel walletKeysViewModel;
61 - final MaterialThemeBase currentTheme;
57
58 @override
59 State<StatefulWidget> createState() => _WalletKeysPageBodyState();
@@ -161,7 +156,11 @@ class _WalletKeysPageBodyState extends State<WalletKeysPageBody>
156 if (showKeyTab)
157 Padding(
158 padding: const EdgeInsets.only(left: 22, right: 22),
164 - child: _buildKeysTab(context, showSilentPaymentsTab ? widget.walletKeysViewModel.items.sublist(0, 4) : widget.walletKeysViewModel.items),
159 + child: _buildKeysTab(
160 + context,
161 + showSilentPaymentsTab
162 + ? widget.walletKeysViewModel.items.sublist(0, 4)
163 + : widget.walletKeysViewModel.items),
164 ),
165 if (showSilentPaymentsTab)
166 Padding(
lib/src/screens/wallet_list/edit_wallet_button_widget.dart
+8 -18
@@ -20,27 +20,17 @@ class EditWalletButtonWidget extends StatelessWidget {
20 width: width,
21 child: Row(
22 children: [
23 - GestureDetector(
24 - onTap: onTap,
25 - child: Center(
26 - child: Container(
27 - height: 40,
28 - width: 44,
29 - padding: EdgeInsets.all(10),
30 - decoration: BoxDecoration(
31 - shape: BoxShape.circle,
32 - color: Theme.of(context).colorScheme.surface,
33 - ),
34 - child: Icon(
35 - Icons.edit,
36 - size: 14,
37 - color: Theme.of(context).colorScheme.onSurfaceVariant,
38 - ),
39 - ),
23 + TextButton(
24 + onPressed: onTap,
25 + style: TextButton.styleFrom(
26 + backgroundColor: Theme.of(context).colorScheme.surface, shape: CircleBorder()),
27 + child: Icon(
28 + Icons.edit,
29 + size: 14,
30 + color: Theme.of(context).colorScheme.onSurfaceVariant,
31 ),
32 ),
33 if (isGroup) ...{
43 - SizedBox(width: 6),
34 Icon(
35 isExpanded ? Icons.keyboard_arrow_up : Icons.keyboard_arrow_down,
36 size: 24,
lib/src/screens/wallet_list/filtered_list.dart
+17
@@ -29,6 +29,23 @@ class FilteredListState extends State<FilteredList> {
29 if (widget.canReorder) {
30 return Observer(
31 builder: (_) => ReorderableListView.builder(
32 + proxyDecorator: (child, index, animation) => Material(
33 + child: Container(
34 + //margin: EdgeInsets.symmetric(vertical: 5),
35 + decoration: BoxDecoration(
36 + color: Theme.of(context).colorScheme.surfaceContainer,
37 + borderRadius: BorderRadius.circular(20.0),
38 + boxShadow: [
39 + BoxShadow(
40 + color: Colors.black.withOpacity(0.3),
41 + blurRadius: 5,
42 + offset: const Offset(0, 6),
43 + spreadRadius: 1)
44 + ],
45 + ),
46 + child: child,
47 + ),
48 + ),
49 shrinkWrap: widget.shrinkWrap,
50 physics: widget.physics ?? const BouncingScrollPhysics(),
51 itemBuilder: widget.itemBuilder,
lib/src/screens/wallet_list/wallet_list_page.dart
+128 -141
@@ -116,21 +116,6 @@ class WalletListBody extends StatefulWidget {
116 }
117
118 class WalletListBodyState extends State<WalletListBody> {
119 - final moneroIcon = Image.asset('assets/images/monero_logo.png', height: 24, width: 24);
120 - final bitcoinIcon = Image.asset('assets/images/bitcoin.png', height: 24, width: 24);
121 - final tBitcoinIcon = Image.asset('assets/images/tbtc.png', height: 24, width: 24);
122 - final litecoinIcon = Image.asset('assets/images/litecoin_icon.png', height: 24, width: 24);
123 - final decredIcon = Image.asset('assets/images/decred_icon.png', height: 24, width: 24);
124 - final nonWalletTypeIcon = Image.asset('assets/images/close.png', height: 24, width: 24);
125 - final havenIcon = Image.asset('assets/images/haven_logo.png', height: 24, width: 24);
126 - final ethereumIcon = Image.asset('assets/images/eth_icon.png', height: 24, width: 24);
127 - final bitcoinCashIcon = Image.asset('assets/images/bch_icon.png', height: 24, width: 24);
128 - final nanoIcon = Image.asset('assets/images/nano_icon.png', height: 24, width: 24);
129 - final polygonIcon = Image.asset('assets/images/matic_icon.png', height: 24, width: 24);
130 - final solanaIcon = Image.asset('assets/images/sol_icon.png', height: 24, width: 24);
131 - final tronIcon = Image.asset('assets/images/trx_icon.png', height: 24, width: 24);
132 - final wowneroIcon = Image.asset('assets/images/wownero_icon.png', height: 24, width: 24);
133 - final zanoIcon = Image.asset('assets/images/zano_icon.png', height: 24, width: 24);
119 final scrollController = ScrollController();
120 final double tileHeight = 60;
121 Flushbar<void>? _progressBar;
@@ -164,69 +149,68 @@ class WalletListBodyState extends State<WalletListBody> {
149 ),
150 SizedBox(height: 16),
151 Container(
167 - child: Observer(
168 - builder: (_) => FilteredList(
169 - shrinkWrap: true,
170 - list: widget.walletListViewModel.multiWalletGroups,
171 - updateFunction: widget.walletListViewModel.reorderAccordingToWalletList,
172 - itemBuilder: (context, index) {
173 - final group = widget.walletListViewModel.multiWalletGroups[index];
174 - final groupName =
175 - group.groupName ?? '${S.current.wallet_group} ${index + 1}';
152 + child: Padding(
153 + padding: EdgeInsets.only(left: 20, right: 20),
154 + child: Observer(
155 + builder: (_) => FilteredList(
156 + shrinkWrap: true,
157 + list: widget.walletListViewModel.multiWalletGroups,
158 + updateFunction: widget.walletListViewModel.reorderAccordingToWalletList,
159 + itemBuilder: (context, index) {
160 + final group = widget.walletListViewModel.multiWalletGroups[index];
161 + final groupName =
162 + group.groupName ?? '${S.current.wallet_group} ${index + 1}';
163
177 - widget.walletListViewModel.updateTileState(
178 - index,
179 - widget.walletListViewModel.expansionTileStateTrack[index] ?? false,
180 - );
164 + widget.walletListViewModel.updateTileState(
165 + index,
166 + widget.walletListViewModel.expansionTileStateTrack[index] ?? false,
167 + );
168
182 - return GroupedWalletExpansionTile(
183 - onExpansionChanged: (value) {
184 - widget.walletListViewModel.updateTileState(index, value);
185 - setState(() {});
186 - },
187 - shouldShowCurrentWalletPointer: true,
188 - borderRadius: BorderRadius.all(Radius.circular(16)),
189 - margin: EdgeInsets.only(left: 20, right: 20, bottom: 12),
190 - title: groupName,
191 - tileKey: ValueKey('group_wallets_expansion_tile_widget_$index'),
192 - leadingWidget: Icon(
193 - Icons.account_balance_wallet_outlined,
194 - size: 28,
195 - ),
196 - trailingWidget: EditWalletButtonWidget(
197 - width: 74,
198 - isGroup: true,
199 - isExpanded:
200 - widget.walletListViewModel.expansionTileStateTrack[index]!,
201 - onTap: () {
202 - final wallet = widget.walletListViewModel
203 - .convertWalletInfoToWalletListItem(group.wallets.first);
204 - Navigator.of(context).pushNamed(
205 - Routes.walletEdit,
206 - arguments: WalletEditPageArguments(
207 - walletListViewModel: widget.walletListViewModel,
208 - editingWallet: wallet,
209 - isWalletGroup: true,
210 - groupName: groupName,
211 - walletGroupKey: group.groupKey,
212 - ),
213 - );
169 + return GroupedWalletExpansionTile(
170 + onExpansionChanged: (value) {
171 + widget.walletListViewModel.updateTileState(index, value);
172 + setState(() {});
173 },
215 - ),
216 - childWallets: group.wallets.map((walletInfo) {
217 - return widget.walletListViewModel
218 - .convertWalletInfoToWalletListItem(walletInfo);
219 - }).toList(),
220 - isSelected: false,
221 - onChildItemTapped: (wallet) =>
222 - wallet.isCurrent ? null : _loadWallet(wallet),
223 - childTrailingWidget: (item) {
224 - return item.isCurrent
225 - ? SizedBox.shrink()
226 - : Padding(
227 - padding: const EdgeInsets.only(right: 16),
228 - child: EditWalletButtonWidget(
229 - width: 44,
174 + shouldShowCurrentWalletPointer: true,
175 + borderRadius: BorderRadius.all(Radius.circular(16)),
176 + title: groupName,
177 + tileKey: ValueKey('group_wallets_expansion_tile_widget_$index'),
178 + leadingWidget: Icon(
179 + Icons.account_balance_wallet_outlined,
180 + size: 28,
181 + ),
182 + trailingWidget: EditWalletButtonWidget(
183 + width: 88,
184 + isGroup: true,
185 + isExpanded:
186 + widget.walletListViewModel.expansionTileStateTrack[index]!,
187 + onTap: () {
188 + final wallet = widget.walletListViewModel
189 + .convertWalletInfoToWalletListItem(group.wallets.first);
190 + Navigator.of(context).pushNamed(
191 + Routes.walletEdit,
192 + arguments: WalletEditPageArguments(
193 + walletListViewModel: widget.walletListViewModel,
194 + editingWallet: wallet,
195 + isWalletGroup: true,
196 + groupName: groupName,
197 + walletGroupKey: group.groupKey,
198 + ),
199 + );
200 + },
201 + ),
202 + childWallets: group.wallets.map((walletInfo) {
203 + return widget.walletListViewModel
204 + .convertWalletInfoToWalletListItem(walletInfo);
205 + }).toList(),
206 + isSelected: false,
207 + onChildItemTapped: (wallet) =>
208 + wallet.isCurrent ? null : _loadWallet(wallet),
209 + childTrailingWidget: (item) {
210 + return item.isCurrent
211 + ? SizedBox.shrink()
212 + : EditWalletButtonWidget(
213 + width: 60,
214 onTap: () => Navigator.of(context).pushNamed(
215 Routes.walletEdit,
216 arguments: WalletEditPageArguments(
@@ -234,11 +218,11 @@ class WalletListBodyState extends State<WalletListBody> {
218 editingWallet: item,
219 ),
220 ),
237 - ),
238 - );
239 - },
240 - );
241 - },
221 + );
222 + },
223 + );
224 + },
225 + ),
226 ),
227 ),
228 ),
@@ -257,68 +241,70 @@ class WalletListBodyState extends State<WalletListBody> {
241 ),
242 ),
243 SizedBox(height: 16),
260 - Container(
261 - child: Observer(
262 - builder: (_) => FilteredList(
263 - shrinkWrap: true,
264 - list: widget.walletListViewModel.singleWalletsList,
265 - updateFunction: widget.walletListViewModel.reorderAccordingToWalletList,
266 - itemBuilder: (context, index) {
267 - final wallet = widget.walletListViewModel.singleWalletsList[index];
268 - final currentColor = wallet.isCurrent
269 - ? Theme.of(context).colorScheme.primary
270 - : Theme.of(context).colorScheme.surface;
271 -
272 - return GroupedWalletExpansionTile(
273 - tileKey: ValueKey('single_wallets_expansion_tile_widget_$index'),
274 - isCurrentlySelectedWallet: wallet.isCurrent,
275 - leadingWidget: SizedBox(
276 - width: wallet.isCurrent ? 56 : 40,
277 - child: Row(
278 - children: [
279 - wallet.isCurrent
280 - ? Container(
281 - height: 35,
282 - width: 6,
283 - margin: EdgeInsets.only(right: 16),
284 - decoration: BoxDecoration(
285 - borderRadius: BorderRadius.only(
286 - topRight: Radius.circular(16),
287 - bottomRight: Radius.circular(16),
244 + Padding(
245 + padding: EdgeInsets.only(left: 20, right: 20),
246 + child: Container(
247 + child: Observer(
248 + builder: (_) => FilteredList(
249 + shrinkWrap: true,
250 + list: widget.walletListViewModel.singleWalletsList,
251 + updateFunction: widget.walletListViewModel.reorderAccordingToWalletList,
252 + itemBuilder: (context, index) {
253 + final wallet = widget.walletListViewModel.singleWalletsList[index];
254 + final currentColor = wallet.isCurrent
255 + ? Theme.of(context).colorScheme.primary
256 + : Theme.of(context).colorScheme.surface;
257 + return GroupedWalletExpansionTile(
258 + tileKey: ValueKey('single_wallets_expansion_tile_widget_$index'),
259 + isCurrentlySelectedWallet: wallet.isCurrent,
260 + leadingWidget: SizedBox(
261 + width: wallet.isCurrent ? 56 : 40,
262 + child: Row(
263 + children: [
264 + wallet.isCurrent
265 + ? Container(
266 + height: 35,
267 + width: 6,
268 + margin: EdgeInsets.only(right: 16),
269 + decoration: BoxDecoration(
270 + borderRadius: BorderRadius.only(
271 + topRight: Radius.circular(16),
272 + bottomRight: Radius.circular(16),
273 + ),
274 + color: currentColor,
275 ),
289 - color: currentColor,
290 - ),
291 - )
292 - : SizedBox(width: 6),
293 - Image.asset(
294 - walletTypeToCryptoCurrency(wallet.type).iconPath!,
295 - width: 32,
296 - height: 32,
297 - ),
298 - ],
276 + )
277 + : SizedBox(width: 6),
278 + Image.asset(
279 + walletTypeToCryptoCurrency(wallet.type).iconPath!,
280 + width: 32,
281 + height: 32,
282 + ),
283 + ],
284 + ),
285 ),
300 - ),
301 - title: wallet.name,
302 - isSelected: false,
303 - borderRadius: BorderRadius.all(Radius.circular(16)),
304 - margin: EdgeInsets.only(left: 20, right: 20, bottom: 12),
305 - onTitleTapped: () => wallet.isCurrent ? null : _loadWallet(wallet),
306 - trailingWidget: wallet.isCurrent
307 - ? null
308 - : EditWalletButtonWidget(
309 - width: 44,
310 - onTap: () {
311 - Navigator.of(context).pushNamed(
312 - Routes.walletEdit,
313 - arguments: WalletEditPageArguments(
314 - walletListViewModel: widget.walletListViewModel,
315 - editingWallet: wallet,
316 - ),
317 - );
318 - },
319 - ),
320 - );
321 - },
286 + title: wallet.name,
287 + isSelected: false,
288 + borderRadius: BorderRadius.all(Radius.circular(16)),
289 + margin: EdgeInsets.only(left: 20, right: 20, bottom: 12),
290 + onTitleTapped: () => wallet.isCurrent ? null : _loadWallet(wallet),
291 + trailingWidget: wallet.isCurrent
292 + ? null
293 + : EditWalletButtonWidget(
294 + width: 64,
295 + onTap: () {
296 + Navigator.of(context).pushNamed(
297 + Routes.walletEdit,
298 + arguments: WalletEditPageArguments(
299 + walletListViewModel: widget.walletListViewModel,
300 + editingWallet: wallet,
301 + ),
302 + );
303 + },
304 + ),
305 + );
306 + },
307 + ),
308 ),
309 ),
310 ),
@@ -481,7 +467,8 @@ class WalletListBodyState extends State<WalletListBody> {
467 walletType: WalletType.monero,
468 hardwareWalletType: HardwareWalletType.ledger,
469 onConnectDevice: (context, ledgerVM) async {
484 - if (ledgerVM is LedgerViewModel) monero!.setGlobalLedgerConnection(ledgerVM.connection);
470 + if (ledgerVM is LedgerViewModel)
471 + monero!.setGlobalLedgerConnection(ledgerVM.connection);
472 didConnect = true;
473 Navigator.of(context).pop();
474 },
lib/src/screens/welcome/create_pin_welcome_page.dart
+1 -4
@@ -1,6 +1,5 @@
1 import 'package:cake_wallet/src/widgets/cake_image_widget.dart';
2 import 'package:cake_wallet/src/widgets/scollable_with_bottom_section.dart';
3 -import 'package:cake_wallet/themes/utils/custom_theme_colors.dart';
3 import 'package:flutter/gestures.dart';
4 import 'package:flutter/material.dart';
5 import 'package:cake_wallet/routes.dart';
@@ -59,9 +58,7 @@ class CreatePinWelcomePage extends BasePage {
58 gradient: LinearGradient(
59 colors: [
60 Theme.of(context).colorScheme.surface,
62 - currentTheme.isDark
63 - ? CustomThemeColors.backgroundGradientColorDark
64 - : CustomThemeColors.backgroundGradientColorLight,
61 + currentTheme.customColors.backgroundGradientColor,
62 ],
63 begin: Alignment.topCenter,
64 end: Alignment.bottomCenter,
lib/src/widgets/base_text_form_field.dart
+6 -5
@@ -45,7 +45,8 @@ class BaseTextFormField extends StatelessWidget {
45 this.borderWidth = 1.0,
46 this.prefixIconConstraints,
47 this.suffixIconConstraints,
48 - super.key, this.suffixText,
48 + super.key,
49 + this.suffixText,
50 });
51
52 final TextEditingController? controller;
@@ -125,12 +126,12 @@ class BaseTextFormField extends StatelessWidget {
126 alignLabelWithHint: alignLabelWithHint,
127 contentPadding: contentPadding,
128 floatingLabelBehavior: floatingLabelBehavior ?? FloatingLabelBehavior.never,
128 - prefixIconConstraints: prefixIconConstraints ??
129 - const BoxConstraints(minWidth: 0, minHeight: 0),
129 + prefixIconConstraints:
130 + prefixIconConstraints ?? const BoxConstraints(minWidth: 40, minHeight: 0),
131 prefix: prefix,
132 prefixIcon: prefixIcon,
132 - suffixIconConstraints: suffixIconConstraints ??
133 - const BoxConstraints(minWidth: 0, minHeight: 0),
133 + suffixIconConstraints:
134 + suffixIconConstraints ?? const BoxConstraints(minWidth: 0, minHeight: 0),
135 suffix: suffix,
136 suffixIcon: suffixIcon,
137 filled: !hasUnderlineBorder,
lib/src/widgets/blockchain_height_widget.dart
-1
@@ -37,7 +37,6 @@ class BlockchainHeightWidget extends StatefulWidget {
37 final Function()? toggleSingleScan;
38 final WalletType walletType;
39 final Key? blockHeightTextFieldKey;
40 -
40 @override
41 State<StatefulWidget> createState() => BlockchainHeightState();
42 }
lib/src/widgets/bottom_sheet/add_passphrase_bottom_sheet_widget.dart
+3 -5
@@ -2,18 +2,16 @@ import 'package:cake_wallet/generated/i18n.dart';
2 import 'package:cake_wallet/src/widgets/base_text_form_field.dart';
3 import 'package:cake_wallet/src/widgets/cake_image_widget.dart';
4 import 'package:cake_wallet/src/widgets/primary_button.dart';
5 -import 'package:cake_wallet/themes/core/material_base_theme.dart';
5 +import 'package:cake_wallet/themes/core/theme_extension.dart';
6 import 'package:flutter/material.dart';
7
8 class AddPassphraseBottomSheet extends StatefulWidget {
9 AddPassphraseBottomSheet({
10 required String titleText,
11 - required this.currentTheme,
11 required this.onRestoreButtonPressed,
12 });
13
14 final void Function(String) onRestoreButtonPressed;
16 - final MaterialThemeBase currentTheme;
15
16 @override
17 State<AddPassphraseBottomSheet> createState() => _AddPassphraseBottomSheetState();
@@ -43,8 +41,8 @@ class _AddPassphraseBottomSheetState extends State<AddPassphraseBottomSheet> {
41 bool obscurePassphrase = true;
42 @override
43 Widget build(BuildContext context) {
46 -
47 - final passphraseImage = widget.currentTheme.isDark ? passphraseImageDark : passphraseImageLight;
44 + final passphraseImage =
45 + context.currentTheme.isDark ? passphraseImageDark : passphraseImageLight;
46
47 return Container(
48 decoration: BoxDecoration(
lib/src/widgets/bottom_sheet/base_bottom_sheet_widget.dart
+1 -5
@@ -1,6 +1,5 @@
1 import 'package:cake_wallet/src/widgets/primary_button.dart';
2 import 'package:cake_wallet/src/widgets/standard_slide_button_widget.dart';
3 -import 'package:cake_wallet/themes/core/material_base_theme.dart';
3 import 'package:flutter/material.dart';
4
5 enum FooterType { none, slideActionButton, singleActionButton, doubleActionButton }
@@ -11,7 +10,6 @@ abstract class BaseBottomSheet extends StatelessWidget {
10 required this.titleText,
11 this.titleIconPath,
12 required this.footerType,
14 - this.currentTheme,
13 this.slideActionButtonText,
14 this.onSlideActionComplete,
15 this.singleActionButtonText,
@@ -25,12 +23,11 @@ abstract class BaseBottomSheet extends StatelessWidget {
23 this.leftActionButtonKey,
24 this.rightActionButtonKey,
25 required this.maxHeight,
28 - }) : assert(footerType == FooterType.none || currentTheme != null,
26 + }) : assert(footerType == FooterType.none,
27 'currentTheme is required unless footerType is none');
28
29 final String titleText;
30 final String? titleIconPath;
33 - final MaterialThemeBase? currentTheme;
31 final FooterType footerType;
32 final String? slideActionButtonText;
33 final VoidCallback? onSlideActionComplete;
@@ -115,7 +112,6 @@ abstract class BaseBottomSheet extends StatelessWidget {
112 key: ValueKey('base_bottom_sheet_widget_standard_slide_button_key'),
113 buttonText: slideActionButtonText ?? '',
114 onSlideComplete: onSlideActionComplete ?? () {},
118 - currentTheme: currentTheme!,
115 accessibleNavigationModeButtonText: accessibleNavigationModeSlideActionButtonText ?? '',
116 ),
117 );
lib/src/widgets/bottom_sheet/cake_pay_card_info_bottom_sheet_widget.dart
+14 -28
@@ -2,8 +2,6 @@ import 'package:cake_wallet/cake_pay/src/widgets/cake_pay_alert_modal.dart';
2 import 'package:cake_wallet/cake_pay/src/widgets/flip_card_widget.dart';
3 import 'package:cake_wallet/cake_pay/src/widgets/link_extractor.dart';
4 import 'package:cake_wallet/generated/i18n.dart';
5 -import 'package:cake_wallet/palette.dart';
6 -import 'package:cake_wallet/themes/core/material_base_theme.dart';
5 import 'package:cake_wallet/utils/image_utill.dart';
6 import 'package:cake_wallet/utils/show_pop_up.dart';
7 import 'package:flutter/material.dart';
@@ -13,7 +11,6 @@ import 'base_bottom_sheet_widget.dart';
11 class CakePayCardInfoBottomSheet extends BaseBottomSheet {
12 CakePayCardInfoBottomSheet({
13 required String titleText,
16 - required MaterialThemeBase currentTheme,
14 required FooterType footerType,
15 String? titleIconPath,
16 String? singleActionButtonText,
@@ -32,12 +29,10 @@ class CakePayCardInfoBottomSheet extends BaseBottomSheet {
29 this.howToUse,
30 this.applyBoxShadow = false,
31 Key? key,
35 - }) : _currentTheme = currentTheme,
36 - super(
32 + }) : super(
33 titleText: titleText,
34 maxHeight: 900,
35 titleIconPath: titleIconPath,
40 - currentTheme: currentTheme,
36 footerType: footerType,
37 singleActionButtonText: singleActionButtonText,
38 onSingleActionButtonPressed: onSingleActionButtonPressed,
@@ -51,7 +46,6 @@ class CakePayCardInfoBottomSheet extends BaseBottomSheet {
46 key: key);
47
48 final VoidCallback onUpdateBalancePressed;
54 - final MaterialThemeBase _currentTheme;
49 final String? contentImage;
50 final String? howToUse;
51 final bool isReloadable;
@@ -63,15 +57,15 @@ class CakePayCardInfoBottomSheet extends BaseBottomSheet {
57 @override
58 Widget contentWidget(BuildContext context) {
59 final itemTitleTextStyle = Theme.of(context).textTheme.bodyMedium!.copyWith(
66 - fontSize: 16,
67 - fontWeight: FontWeight.w500,
68 - decoration: TextDecoration.none,
69 - );
60 + fontSize: 16,
61 + fontWeight: FontWeight.w500,
62 + decoration: TextDecoration.none,
63 + );
64 final itemSubTitleTextStyle = Theme.of(context).textTheme.bodySmall!.copyWith(
71 - fontWeight: FontWeight.w600,
72 - color: Theme.of(context).colorScheme.onSurfaceVariant,
73 - decoration: TextDecoration.none,
74 - );
65 + fontWeight: FontWeight.w600,
66 + color: Theme.of(context).colorScheme.onSurfaceVariant,
67 + decoration: TextDecoration.none,
68 + );
69
70 final tileBackgroundColor = Theme.of(context).colorScheme.surfaceContainer;
71
@@ -165,9 +159,7 @@ class _HowToUseTile extends StatelessWidget {
159 child: Row(
160 mainAxisAlignment: MainAxisAlignment.spaceBetween,
161 children: [
168 - Text(
169 - S.of(context).how_to_use_card,
170 - style: Theme.of(context).textTheme.bodyLarge),
162 + Text(S.of(context).how_to_use_card, style: Theme.of(context).textTheme.bodyLarge),
163 Icon(
164 Icons.chevron_right_rounded,
165 color: Theme.of(context).textTheme.titleLarge!.color!,
@@ -261,11 +253,9 @@ Widget _buildCardImage(BuildContext ctx, String path, bool addShadow) {
253 return Container(
254 decoration: addShadow
255 ? BoxDecoration(
264 - borderRadius: border,
265 - boxShadow: [
266 - BoxShadow(color: Colors.black.withAlpha(150), blurRadius: 5)
267 - ],
268 - )
256 + borderRadius: border,
257 + boxShadow: [BoxShadow(color: Colors.black.withAlpha(150), blurRadius: 5)],
258 + )
259 : null,
260 child: ClipRRect(
261 borderRadius: border,
@@ -290,9 +280,7 @@ Widget _buildBarcodeSide(BuildContext context, {required String cardNumber, requ
280 decoration: BoxDecoration(
281 color: Theme.of(context).cardColor.withAlpha(200),
282 borderRadius: BorderRadius.circular(10),
293 - boxShadow: [
294 - BoxShadow(color: Colors.black.withAlpha(150), blurRadius: 5)
295 - ],
283 + boxShadow: [BoxShadow(color: Colors.black.withAlpha(150), blurRadius: 5)],
284 ),
285 child: Column(
286 mainAxisAlignment: MainAxisAlignment.center,
@@ -300,7 +288,6 @@ Widget _buildBarcodeSide(BuildContext context, {required String cardNumber, requ
288 Expanded(
289 child: Container(
290 color: Theme.of(context).textTheme.titleLarge!.color!.withOpacity(.1),
303 -
291 ),
292 ),
293 const SizedBox(height: 12),
@@ -345,7 +332,6 @@ Widget _buildBarcodeSide(BuildContext context, {required String cardNumber, requ
332 ),
333 ],
334 ),
348 -
335 ],
336 ),
337 ),
lib/src/widgets/bottom_sheet/confirm_sending_bottom_sheet_widget.dart
+4 -9
@@ -1,7 +1,6 @@
1 import 'package:cake_wallet/generated/i18n.dart';
2 import 'package:cake_wallet/src/widgets/rounded_icon_button.dart';
3 -import 'package:cake_wallet/themes/core/material_base_theme.dart';
4 -import 'package:cake_wallet/themes/utils/custom_theme_colors.dart';
3 +import 'package:cake_wallet/themes/core/theme_extension.dart';
4 import 'package:cake_wallet/utils/address_formatter.dart';
5 import 'package:cake_wallet/utils/image_utill.dart';
6 import 'package:cake_wallet/view_model/cake_pay/cake_pay_buy_card_view_model.dart';
@@ -18,7 +17,6 @@ import 'base_bottom_sheet_widget.dart';
17 class ConfirmSendingBottomSheet extends BaseBottomSheet {
18 ConfirmSendingBottomSheet({
19 required String titleText,
21 - required MaterialThemeBase currentTheme,
20 required FooterType footerType,
21 String? titleIconPath,
22 String? slideActionButtonText,
@@ -43,12 +41,10 @@ class ConfirmSendingBottomSheet extends BaseBottomSheet {
41 this.quantity,
42 Key? key,
43 }) : showScrollbar = outputs.length > 3,
46 - _currentTheme = currentTheme,
44 super(
45 titleText: titleText,
46 maxHeight: 900,
47 titleIconPath: titleIconPath,
51 - currentTheme: currentTheme,
48 footerType: footerType,
49 slideActionButtonText: slideActionButtonText ?? 'Swipe to send',
50 onSlideActionComplete: onSlideActionComplete,
@@ -57,7 +53,6 @@ class ConfirmSendingBottomSheet extends BaseBottomSheet {
53 key: key);
54
55 final CryptoCurrency currency;
60 - final MaterialThemeBase _currentTheme;
56 final String? paymentId;
57 final String? paymentIdValue;
58 final String? expirationTime;
@@ -91,9 +86,9 @@ class ConfirmSendingBottomSheet extends BaseBottomSheet {
86 decoration: TextDecoration.none,
87 );
88
94 - final tileBackgroundColor = _currentTheme.isDark
95 - ? CustomThemeColors.backgroundGradientColorDark.withAlpha(140)
96 - : CustomThemeColors.cardGradientColorPrimaryLight;
89 + final tileBackgroundColor = context.currentTheme.isDark
90 + ? context.customColors.backgroundGradientColor.withAlpha(140)
91 + : context.customColors.cardGradientColorPrimary;
92
93 Widget content = Padding(
94 padding: EdgeInsets.fromLTRB(8, 0, showScrollbar ? 16 : 8, 8),
lib/src/widgets/bottom_sheet/info_bottom_sheet_widget.dart
+32 -41
@@ -1,17 +1,8 @@
1 import 'package:auto_size_text/auto_size_text.dart';
2 -import 'package:cake_wallet/src/widgets/simple_checkbox.dart';
3 -
4 -
2
3 import 'package:cake_wallet/utils/image_utill.dart';
4
8 -import 'package:cake_wallet/src/widgets/primary_button.dart';
9 -import 'package:cake_wallet/themes/core/material_base_theme.dart';
10 -
11 -
5 import 'package:cake_wallet/routes.dart';
13 -import 'package:cake_wallet/src/widgets/primary_button.dart';
14 -import 'package:cake_wallet/themes/core/material_base_theme.dart';
6 import 'package:flutter/gestures.dart';
7
8 import 'package:flutter/material.dart';
@@ -19,9 +10,12 @@ import 'package:flutter/material.dart';
10 import 'base_bottom_sheet_widget.dart';
11
12 class LoadingBottomSheet extends BaseBottomSheet {
22 - LoadingBottomSheet(
23 - {required String titleText, String? titleIconPath})
24 - : super(titleText: titleText, titleIconPath: titleIconPath, footerType: FooterType.none, maxHeight: 900);
13 + LoadingBottomSheet({required String titleText, String? titleIconPath})
14 + : super(
15 + titleText: titleText,
16 + titleIconPath: titleIconPath,
17 + footerType: FooterType.none,
18 + maxHeight: 900);
19
20 @override
21 Widget contentWidget(BuildContext context) {
@@ -36,7 +30,6 @@ class InfoBottomSheet extends BaseBottomSheet {
30 InfoBottomSheet({
31 required String titleText,
32 String? titleIconPath,
39 - required this.currentTheme,
33 required this.footerType,
34 this.contentImage,
35 this.contentImageColor,
@@ -59,7 +52,6 @@ class InfoBottomSheet extends BaseBottomSheet {
52 titleText: titleText,
53 titleIconPath: titleIconPath,
54 maxHeight: 900,
62 - currentTheme: currentTheme,
55 footerType: footerType,
56 singleActionButtonText: singleActionButtonText,
57 onSingleActionButtonPressed: onSingleActionButtonPressed,
@@ -72,7 +64,6 @@ class InfoBottomSheet extends BaseBottomSheet {
64 rightActionButtonKey: rightActionButtonKey,
65 key: key);
66
75 - final MaterialThemeBase currentTheme;
67 final FooterType footerType;
68 final String? contentImage;
69 final Color? contentImageColor;
@@ -91,7 +82,6 @@ class InfoBottomSheet extends BaseBottomSheet {
82 final double? contentImageSize;
83 final bool showDisclaimerText;
84
94 -
85 @override
86 Widget contentWidget(BuildContext context) {
87 return SizedBox(
@@ -137,35 +127,36 @@ class InfoBottomSheet extends BaseBottomSheet {
127 bottomActionPanel ?? const SizedBox(),
128 if (showDisclaimerText)
129 Padding(
140 - padding: const EdgeInsets.only(top: 20, bottom: 10),
141 - child: RichText(
142 - textAlign: TextAlign.center,
143 - text: TextSpan(
144 - style: Theme.of(context).textTheme.bodyMedium?.copyWith(
145 - color: Theme.of(context).colorScheme.onSurfaceVariant,
146 - ),
147 - children: [
148 - TextSpan(
149 - text: 'By continuing you agree to this ',
150 - style: Theme.of(context).textTheme.bodyMedium?.copyWith(
151 - color: Theme.of(context).colorScheme.onSurfaceVariant,
152 - fontWeight: FontWeight.w500,
130 + padding: const EdgeInsets.only(top: 20, bottom: 10),
131 + child: RichText(
132 + textAlign: TextAlign.center,
133 + text: TextSpan(
134 + style: Theme.of(context).textTheme.bodyMedium?.copyWith(
135 + color: Theme.of(context).colorScheme.onSurfaceVariant,
136 + ),
137 + children: [
138 + TextSpan(
139 + text: 'By continuing you agree to this ',
140 + style: Theme.of(context).textTheme.bodyMedium?.copyWith(
141 + color: Theme.of(context).colorScheme.onSurfaceVariant,
142 + fontWeight: FontWeight.w500,
143 + ),
144 ),
154 - ),
155 - TextSpan(
156 - text: 'disclaimer',
157 - style: Theme.of(context).textTheme.bodyMedium?.copyWith(
158 - color: Theme.of(context).colorScheme.onSurfaceVariant,
159 - decoration: TextDecoration.underline,
160 - fontWeight: FontWeight.w700,
145 + TextSpan(
146 + text: 'disclaimer',
147 + style: Theme.of(context).textTheme.bodyMedium?.copyWith(
148 + color: Theme.of(context).colorScheme.onSurfaceVariant,
149 + decoration: TextDecoration.underline,
150 + fontWeight: FontWeight.w700,
151 + ),
152 + recognizer: TapGestureRecognizer()
153 + ..onTap =
154 + () => Navigator.pushNamed(context, Routes.readThirdPartyDisclaimer),
155 ),
162 - recognizer: TapGestureRecognizer()
163 - ..onTap = () => Navigator.pushNamed(context, Routes.readThirdPartyDisclaimer),
164 - ),
165 - ],
156 + ],
157 + ),
158 ),
159 ),
168 - ),
160 ],
161 ),
162 );
lib/src/widgets/bottom_sheet/info_steps_bottom_sheet_widget.dart
+18 -28
@@ -1,6 +1,6 @@
1 import 'package:cake_wallet/generated/i18n.dart';
2 import 'package:cake_wallet/src/widgets/primary_button.dart';
3 -import 'package:cake_wallet/themes/core/material_base_theme.dart';
3 +import 'package:cake_wallet/themes/core/theme_extension.dart';
4 import 'package:flutter/material.dart';
5
6 import 'base_bottom_sheet_widget.dart';
@@ -13,15 +13,17 @@ class InfoStep {
13 }
14
15 class InfoStepsBottomSheet extends BaseBottomSheet {
16 - final MaterialThemeBase currentTheme;
16 final List<InfoStep> steps;
17
18 InfoStepsBottomSheet({
19 required String titleText,
20 required this.steps,
21 String? titleIconPath,
23 - required this.currentTheme,
24 - }) : super(titleText: titleText, titleIconPath: titleIconPath, footerType: FooterType.none, maxHeight: 900);
22 + }) : super(
23 + titleText: titleText,
24 + titleIconPath: titleIconPath,
25 + footerType: FooterType.none,
26 + maxHeight: 900);
27
28 @override
29 Widget contentWidget(BuildContext context) => SizedBox(
@@ -33,8 +35,7 @@ class InfoStepsBottomSheet extends BaseBottomSheet {
35 child: Column(
36 children: steps
37 .map((step) => Container(
36 - margin: EdgeInsets.only(
37 - bottom: 15, left: 20, right: 20),
38 + margin: EdgeInsets.only(bottom: 15, left: 20, right: 20),
39 padding: EdgeInsets.all(10),
40 alignment: Alignment.center,
41 decoration: BoxDecoration(
@@ -51,35 +52,24 @@ class InfoStepsBottomSheet extends BaseBottomSheet {
52 padding: EdgeInsets.only(left: 16),
53 child: Column(
54 mainAxisSize: MainAxisSize.max,
54 - mainAxisAlignment:
55 - MainAxisAlignment.start,
56 - crossAxisAlignment:
57 - CrossAxisAlignment.start,
55 + mainAxisAlignment: MainAxisAlignment.start,
56 + crossAxisAlignment: CrossAxisAlignment.start,
57 children: <Widget>[
58 Text(
59 step.title,
61 - style: Theme.of(context)
62 - .textTheme
63 - .bodyMedium!
64 - .copyWith(
60 + style: Theme.of(context).textTheme.bodyMedium!.copyWith(
61 fontSize: 20,
62 fontWeight: FontWeight.w500,
67 - color: Theme.of(context)
68 - .colorScheme
69 - .onSurface,
63 + color: context.currentTheme.colorScheme.onSurface,
64 ),
65 ),
66 Padding(
67 padding: EdgeInsets.only(top: 5),
68 child: Text(
69 step.description,
76 - style: Theme.of(context)
77 - .textTheme
78 - .bodyMedium!
79 - .copyWith(
80 - color: Theme.of(context)
81 - .colorScheme
82 - .onSurfaceVariant,
70 + style: Theme.of(context).textTheme.bodyMedium!.copyWith(
71 + color: context
72 + .currentTheme.colorScheme.onSurfaceVariant,
73 ),
74 ),
75 )
@@ -98,10 +88,10 @@ class InfoStepsBottomSheet extends BaseBottomSheet {
88 padding: const EdgeInsets.all(16),
89 child: PrimaryButton(
90 text: S.of(context).close,
101 - color: Theme.of(context).colorScheme.primary,
102 - textColor: currentTheme.isDark
103 - ? Theme.of(context).colorScheme.onSurfaceVariant
104 - : Theme.of(context).colorScheme.onPrimary,
91 + color: context.currentTheme.colorScheme.primary,
92 + textColor: context.currentTheme.isDark
93 + ? context.currentTheme.colorScheme.onSurfaceVariant
94 + : context.currentTheme.colorScheme.onPrimary,
95 onPressed: () => Navigator.of(context).pop(),
96 ),
97 )
lib/src/widgets/bottom_sheet/payment_confirmation_bottom_sheet.dart
-4
@@ -6,7 +6,6 @@ import 'package:cake_wallet/src/widgets/primary_button.dart';
6 import 'package:cw_core/wallet_type.dart';
7 import 'package:cake_wallet/view_model/payment/payment_view_model.dart';
8 import 'package:cake_wallet/view_model/wallet_switcher_view_model.dart';
9 -import 'package:cake_wallet/themes/core/material_base_theme.dart';
9 import 'package:flutter_mobx/flutter_mobx.dart';
10
11 class PaymentConfirmationBottomSheet extends BaseBottomSheet {
@@ -15,7 +14,6 @@ class PaymentConfirmationBottomSheet extends BaseBottomSheet {
14 required this.paymentFlowResult,
15 required this.paymentViewModel,
16 required this.walletSwitcherViewModel,
18 - required this.currentTheme,
17 required this.paymentRequest,
18 required this.onSelectWallet,
19 required this.onChangeWallet,
@@ -24,13 +22,11 @@ class PaymentConfirmationBottomSheet extends BaseBottomSheet {
22 titleText: '',
23 footerType: FooterType.none,
24 maxHeight: 900,
27 - currentTheme: currentTheme,
25 );
26
27 final PaymentFlowResult paymentFlowResult;
28 final PaymentViewModel paymentViewModel;
29 final WalletSwitcherViewModel walletSwitcherViewModel;
33 - final MaterialThemeBase currentTheme;
30 final PaymentRequest paymentRequest;
31 final VoidCallback onSelectWallet;
32 final VoidCallback onChangeWallet;
lib/src/widgets/bottom_sheet/swap_confirmation_bottom_sheet.dart
-4
@@ -19,7 +19,6 @@ import 'package:cw_core/wallet_type.dart';
19 import 'package:cake_wallet/view_model/payment/payment_view_model.dart';
20 import 'package:cake_wallet/view_model/exchange/exchange_view_model.dart';
21 import 'package:cake_wallet/exchange/exchange_trade_state.dart';
22 -import 'package:cake_wallet/themes/core/material_base_theme.dart';
22 import 'package:flutter_mobx/flutter_mobx.dart';
23 import 'package:cake_wallet/src/widgets/alert_with_one_action.dart';
24 import 'package:cake_wallet/utils/show_pop_up.dart';
@@ -29,7 +28,6 @@ class SwapConfirmationBottomSheet extends BaseBottomSheet {
28 SwapConfirmationBottomSheet({
29 Key? key,
30 required this.paymentFlowResult,
32 - required this.currentTheme,
31 required this.exchangeViewModel,
32 required this.authService,
33 this.sessionId,
@@ -37,11 +35,9 @@ class SwapConfirmationBottomSheet extends BaseBottomSheet {
35 titleText: S.current.swap,
36 footerType: FooterType.none,
37 maxHeight: 900,
40 - currentTheme: currentTheme,
38 );
39
40 final PaymentFlowResult paymentFlowResult;
44 - final MaterialThemeBase currentTheme;
41 final ExchangeViewModel exchangeViewModel;
42 final AuthService authService;
43 final String? sessionId;
lib/src/widgets/bottom_sheet/swap_details_bottom_sheet.dart
-8
@@ -7,7 +7,6 @@ import 'package:cake_wallet/src/widgets/bottom_sheet/base_bottom_sheet_widget.da
7 import 'package:cw_core/wallet_type.dart';
8 import 'package:cake_wallet/view_model/exchange/exchange_trade_view_model.dart';
9 import 'package:cake_wallet/src/widgets/standard_slide_button_widget.dart';
10 -import 'package:cake_wallet/themes/core/material_base_theme.dart';
10 import 'package:cake_wallet/core/execution_state.dart';
11 import 'package:cake_wallet/view_model/send/send_view_model_state.dart';
12 import 'package:cake_wallet/src/widgets/bottom_sheet/info_bottom_sheet_widget.dart';
@@ -22,11 +21,9 @@ import 'package:flutter_mobx/flutter_mobx.dart';
21 class SwapDetailsBottomSheet extends StatefulWidget {
22 SwapDetailsBottomSheet({
23 Key? key,
25 - required this.currentTheme,
24 required this.exchangeTradeViewModel,
25 }) : super(key: key);
26
29 - final MaterialThemeBase currentTheme;
27 final ExchangeTradeViewModel exchangeTradeViewModel;
28
29 @override
@@ -124,7 +121,6 @@ class _SwapDetailsBottomSheetState extends State<SwapDetailsBottomSheet> {
121 isScrollControlled: true,
122 builder: (BuildContext bottomSheetContext) {
123 return InfoBottomSheet(
127 - currentTheme: widget.currentTheme,
124 footerType: FooterType.singleActionButton,
125 titleText: S.of(bottomSheetContext).transaction_sent,
126 contentImage: 'assets/images/birthday_cake.png',
@@ -155,7 +151,6 @@ class _SwapDetailsBottomSheetState extends State<SwapDetailsBottomSheet> {
151 titleText: 'Confirm Swap',
152 footerType: FooterType.none,
153 maxHeight: 900,
158 - currentTheme: widget.currentTheme,
154 exchangeTradeViewModel: widget.exchangeTradeViewModel,
155 onExecuteSwap: _executeSwap,
156 );
@@ -192,14 +187,12 @@ class _SwapDetailsBottomSheetContent extends BaseBottomSheet {
187 required String titleText,
188 required FooterType footerType,
189 required double maxHeight,
195 - MaterialThemeBase? currentTheme,
190 required this.exchangeTradeViewModel,
191 required this.onExecuteSwap,
192 }) : super(
193 titleText: titleText,
194 footerType: footerType,
195 maxHeight: maxHeight,
202 - currentTheme: currentTheme,
196 );
197
198 final ExchangeTradeViewModel exchangeTradeViewModel;
@@ -250,7 +243,6 @@ class _SwapDetailsBottomSheetContent extends BaseBottomSheet {
243 knobColor: Theme.of(context).colorScheme.primary,
244 buttonText: 'Swipe to swap',
245 onSlideComplete: onExecuteSwap,
253 - currentTheme: currentTheme!,
246 accessibleNavigationModeButtonText: 'Complete swap',
247 );
248 },
lib/src/widgets/bottom_sheet/tooltip_bottom_sheet.dart
+16 -17
@@ -6,7 +6,6 @@ class TooltipSheet extends BaseBottomSheet {
6 final String tooltip;
7
8 const TooltipSheet({
9 - required super.currentTheme,
9 required super.titleText,
10 super.titleIconPath,
11 required this.tooltip,
@@ -25,22 +24,22 @@ class TooltipSheet extends BaseBottomSheet {
24
25 @override
26 Widget contentWidget(BuildContext context) => Container(
28 - decoration: BoxDecoration(
29 - borderRadius: BorderRadius.circular(10),
30 - color: Theme.of(context).colorScheme.surfaceContainer),
31 - margin: const EdgeInsets.all(12),
32 - padding: const EdgeInsets.all(12),
33 - child: AutoSizeText(
34 - tooltip,
35 - textAlign: TextAlign.center,
36 - style: Theme.of(context).textTheme.bodyMedium!.copyWith(
37 - fontSize: 16,
38 - fontWeight: FontWeight.w500,
39 - color: Theme.of(context).colorScheme.onSurfaceVariant,
40 - decoration: TextDecoration.none,
41 - ),
42 - ),
43 - );
27 + decoration: BoxDecoration(
28 + borderRadius: BorderRadius.circular(10),
29 + color: Theme.of(context).colorScheme.surfaceContainer),
30 + margin: const EdgeInsets.all(12),
31 + padding: const EdgeInsets.all(12),
32 + child: AutoSizeText(
33 + tooltip,
34 + textAlign: TextAlign.center,
35 + style: Theme.of(context).textTheme.bodyMedium!.copyWith(
36 + fontSize: 16,
37 + fontWeight: FontWeight.w500,
38 + color: Theme.of(context).colorScheme.onSurfaceVariant,
39 + decoration: TextDecoration.none,
40 + ),
41 + ),
42 + );
43
44 Widget footerWidget(BuildContext context) => SizedBox.shrink();
45 }
lib/src/widgets/bottom_sheet/wallet_switcher_bottom_sheet.dart
-4
@@ -6,13 +6,11 @@ import 'package:cw_core/wallet_info.dart';
6 import 'package:cw_core/wallet_type.dart';
7 import 'package:cake_wallet/view_model/wallet_switcher_view_model.dart';
8 import 'package:flutter_mobx/flutter_mobx.dart';
9 -import 'package:cake_wallet/themes/core/material_base_theme.dart';
9
10 class WalletSwitcherBottomSheet extends BaseBottomSheet {
11 WalletSwitcherBottomSheet({
12 Key? key,
13 required this.viewModel,
15 - required this.currentTheme,
14 this.filterWalletType,
15 this.subtitle,
16 this.onWalletSelected,
@@ -20,11 +18,9 @@ class WalletSwitcherBottomSheet extends BaseBottomSheet {
18 titleText: S.current.select_a_wallet,
19 footerType: FooterType.none,
20 maxHeight: 900,
23 - currentTheme: currentTheme,
21 );
22
23 final WalletSwitcherViewModel viewModel;
27 - final MaterialThemeBase currentTheme;
24 final WalletType? filterWalletType;
25 final String? subtitle;
26 final Function(WalletInfo)? onWalletSelected;
lib/src/widgets/dashboard_card_widget.dart
+5 -10
@@ -1,8 +1,7 @@
1 +import 'package:cake_wallet/themes/core/theme_extension.dart';
2 import 'package:flutter/material.dart';
3 import 'package:flutter_svg/flutter_svg.dart';
4
4 -import '../../themes/utils/custom_theme_colors.dart';
5 -
5 class DashBoardRoundedCardWidget extends StatelessWidget {
6 DashBoardRoundedCardWidget({
7 this.onTap,
@@ -19,7 +18,6 @@ class DashBoardRoundedCardWidget extends StatelessWidget {
18 super.key,
19 this.marginV,
20 this.marginH,
22 - required this.isDarkTheme,
21 });
22
23 final VoidCallback? onTap;
@@ -35,7 +33,6 @@ class DashBoardRoundedCardWidget extends StatelessWidget {
33 final double? marginH;
34 final double? shadowSpread;
35 final double? shadowBlur;
38 - final bool isDarkTheme;
36
37 @override
38 Widget build(BuildContext context) {
@@ -48,12 +45,8 @@ class DashBoardRoundedCardWidget extends StatelessWidget {
45 borderRadius: BorderRadius.circular(15),
46 gradient: LinearGradient(
47 colors: [
51 - isDarkTheme
52 - ? CustomThemeColors.cardGradientColorPrimaryDark
53 - : CustomThemeColors.cardGradientColorPrimaryLight,
54 - isDarkTheme
55 - ? CustomThemeColors.cardGradientColorSecondaryDark
56 - : CustomThemeColors.cardGradientColorSecondaryLight,
48 + context.customColors.cardGradientColorPrimary,
49 + context.customColors.cardGradientColorSecondary,
50 ],
51 begin: Alignment.topCenter,
52 end: Alignment.bottomCenter,
@@ -76,6 +69,8 @@ class DashBoardRoundedCardWidget extends StatelessWidget {
69 style: TextButton.styleFrom(
70 shape: RoundedRectangleBorder(
71 borderRadius: BorderRadius.circular(15),
72 + side: BorderSide(
73 + width: 1.25, color: Theme.of(context).colorScheme.surfaceContainerHigh),
74 ),
75 padding: EdgeInsets.only(left: 24, top: 24, right: 20, bottom: 24),
76 ),
lib/src/widgets/gradient_background.dart
+3 -5
@@ -1,8 +1,8 @@
1 -import 'package:cake_wallet/themes/utils/custom_theme_colors.dart';
1 +import 'package:cake_wallet/themes/core/theme_extension.dart';
2 import 'package:flutter/material.dart';
3
4 class GradientBackground extends StatelessWidget {
5 - const GradientBackground({required this.scaffold});
5 + const GradientBackground({required this.scaffold, super.key});
6
7 final Widget scaffold;
8
@@ -14,9 +14,7 @@ class GradientBackground extends StatelessWidget {
14 gradient: LinearGradient(
15 colors: [
16 Theme.of(context).colorScheme.surface,
17 - Theme.of(context).brightness == Brightness.dark
18 - ? CustomThemeColors.backgroundGradientColorDark
19 - : CustomThemeColors.backgroundGradientColorLight,
17 + context.customColors.backgroundGradientColor,
18 ],
19 begin: Alignment.topCenter,
20 end: Alignment.bottomCenter,
lib/src/widgets/option_tile.dart
+25 -12
@@ -1,4 +1,5 @@
1 import 'package:flutter/material.dart';
2 +import 'package:cake_wallet/themes/core/theme_extension.dart';
3
4 class OptionTile extends StatelessWidget {
5 const OptionTile({
@@ -23,10 +24,22 @@ class OptionTile extends StatelessWidget {
24 return Container(
25 width: double.infinity,
26 alignment: Alignment.center,
26 - child: ElevatedButton(
27 + decoration: ShapeDecoration(
28 + gradient: LinearGradient(
29 + colors: [
30 + context.customColors.cardGradientColorPrimary,
31 + context.customColors.cardGradientColorSecondary,
32 + ],
33 + begin: Alignment.topCenter,
34 + end: Alignment.bottomCenter,
35 + ),
36 + shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(15)),
37 + ),
38 + child: TextButton(
39 style: TextButton.styleFrom(
28 - backgroundColor: Theme.of(context).colorScheme.surfaceContainer,
29 - shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(12)),
40 + side: BorderSide(width: 1.25, color: Theme.of(context).colorScheme.surfaceContainerHigh),
41 + backgroundColor: Colors.transparent,
42 + shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(15)),
43 padding: EdgeInsets.all(24),
44 ),
45 onPressed: onPressed,
@@ -50,15 +63,15 @@ class OptionTile extends StatelessWidget {
63 constraints: BoxConstraints(maxWidth: 220),
64 child: Text(title, style: Theme.of(context).textTheme.titleMedium),
65 ),
53 - if (tag != null) Container(
54 - decoration: BoxDecoration(
55 - border: Border.all(),
56 - borderRadius: BorderRadius.circular(20),
57 - color: Theme.of(context).colorScheme.onSurfaceVariant
58 - ),
59 - padding: EdgeInsets.symmetric(horizontal: 5),
60 - margin: EdgeInsets.only(left: 5),
61 - child: Text(tag!))
66 + if (tag != null)
67 + Container(
68 + decoration: BoxDecoration(
69 + border: Border.all(),
70 + borderRadius: BorderRadius.circular(20),
71 + color: Theme.of(context).colorScheme.onSurfaceVariant),
72 + padding: EdgeInsets.symmetric(horizontal: 5),
73 + margin: EdgeInsets.only(left: 5),
74 + child: Text(tag!))
75 ],
76 ),
77 Padding(
lib/src/widgets/picker.dart
+3 -7
@@ -4,7 +4,7 @@ import 'dart:math';
4
5 import 'package:cake_wallet/entities/seed_type.dart';
6 import 'package:cake_wallet/src/widgets/search_bar_widget.dart';
7 -import 'package:cake_wallet/themes/utils/custom_theme_colors.dart';
7 +import 'package:cake_wallet/themes/core/theme_extension.dart';
8 import 'package:cake_wallet/utils/responsive_layout_util.dart';
9 import 'package:cw_core/transaction_priority.dart';
10 import 'package:flutter/material.dart';
@@ -77,7 +77,6 @@ class _PickerState<Item> extends State<Picker<Item>> {
77 List<Image> images;
78 List<Item> filteredItems = [];
79 List<Image> filteredImages = [];
80 -
80 final TextEditingController searchController = TextEditingController();
81
82 ScrollController controller = ScrollController();
@@ -519,16 +518,13 @@ class _PickerState<Item> extends State<Picker<Item>> {
518 }
519
520 Widget buildSlider({required int index, required bool isActivated}) {
522 - final isDarkMode = Theme.of(context).brightness == Brightness.dark;
521 return Row(
522 children: <Widget>[
523 Expanded(
524 child: Slider(
525 activeColor: Theme.of(context).colorScheme.primary,
528 - inactiveColor: isDarkMode
529 - ? CustomThemeColors.toggleColorOffStateDark
530 - : CustomThemeColors.toggleColorOffStateLight,
531 - thumbColor: CustomThemeColors.toggleKnobStateColorLight,
526 + inactiveColor: context.customColors.toggleColorOffState,
527 + thumbColor: context.customColors.toggleKnobStateColor,
528 value: widget.sliderValue == null || widget.sliderValue! < 1 ? 1 : widget.sliderValue!,
529 onChanged: isActivated ? widget.onSliderChanged : null,
530 min: widget.minValue ?? 1,
lib/src/widgets/primary_button.dart
+9 -10
@@ -46,16 +46,15 @@ class PrimaryButton extends StatelessWidget {
46 borderRadius: borderRadius ?? BorderRadius.circular(12.0),
47 ),
48 ),
49 - overlayColor: WidgetStateProperty.all(Colors.transparent),
49 ),
50 child: Text(
51 text,
52 textAlign: TextAlign.center,
53 style: Theme.of(context).textTheme.bodyMedium!.copyWith(
55 - fontSize: 15.0,
56 - fontWeight: FontWeight.w600,
57 - color: isDisabled ? textColor.withOpacity(0.5) : textColor,
58 - ),
54 + fontSize: 15.0,
55 + fontWeight: FontWeight.w600,
56 + color: isDisabled ? textColor.withOpacity(0.5) : textColor,
57 + ),
58 ),
59 ),
60 ),
@@ -117,10 +116,10 @@ class LoadingPrimaryButton extends StatelessWidget {
116 : Text(
117 text,
118 style: Theme.of(context).textTheme.bodyMedium!.copyWith(
120 - fontSize: 15.0,
121 - fontWeight: FontWeight.w600,
122 - color: isDisabled ? textColor.withOpacity(0.5) : textColor,
123 - ),
119 + fontSize: 15.0,
120 + fontWeight: FontWeight.w600,
121 + color: isDisabled ? textColor.withOpacity(0.5) : textColor,
122 + ),
123 ),
124 ),
125 ),
@@ -228,7 +227,7 @@ class PrimaryImageButton extends StatelessWidget {
227 child: SizedBox(
228 width: double.infinity,
229 height: 52.0,
231 - child: ElevatedButton(
230 + child: TextButton(
231 onPressed: onPressed,
232 style: ButtonStyle(
233 backgroundColor: WidgetStateProperty.all(color),
lib/src/widgets/seed_language_picker.dart
+12 -8
@@ -15,8 +15,12 @@ class SeedLanguagePickerOption {
15 }
16
17 final List<SeedLanguagePickerOption> seedLanguages = [
18 - SeedLanguagePickerOption('English', S.current.seed_language_english,
19 - Image.asset('assets/images/flags/usa.png'), [MoneroSeedType.legacy, MoneroSeedType.polyseed, MoneroSeedType.bip39]),
18 + SeedLanguagePickerOption(
19 + 'English',
20 + S.current.seed_language_english,
21 + Image.asset('assets/images/flags/usa.png'),
22 + [MoneroSeedType.legacy, MoneroSeedType.polyseed, MoneroSeedType.bip39],
23 + ),
24 SeedLanguagePickerOption('Chinese (Simplified)', S.current.seed_language_chinese,
25 Image.asset('assets/images/flags/chn.png'), [MoneroSeedType.legacy, MoneroSeedType.polyseed]),
26 SeedLanguagePickerOption('Chinese (Traditional)', S.current.seed_language_chinese_traditional,
@@ -48,12 +52,12 @@ const defaultSeedLanguage = 'English';
52 enum Places { topLeft, topRight, bottomLeft, bottomRight, inside }
53
54 class SeedLanguagePicker extends StatefulWidget {
51 - SeedLanguagePicker(
52 - {Key? key,
53 - this.selected = defaultSeedLanguage,
54 - this.seedType = MoneroSeedType.defaultSeedType,
55 - required this.onItemSelected})
56 - : super(key: key);
55 + SeedLanguagePicker({
56 + Key? key,
57 + this.selected = defaultSeedLanguage,
58 + this.seedType = MoneroSeedType.defaultSeedType,
59 + required this.onItemSelected,
60 + }) : super(key: key);
61
62 final MoneroSeedType seedType;
63 final String selected;
lib/src/widgets/service_status_tile.dart
+5 -6
@@ -1,6 +1,6 @@
1 import 'package:auto_size_text/auto_size_text.dart';
2 import 'package:cake_wallet/entities/service_status.dart';
3 -import 'package:cake_wallet/themes/utils/custom_theme_colors.dart';
3 +import 'package:cake_wallet/themes/core/custom_theme_colors.dart';
4 import 'package:flutter/material.dart';
5 import 'package:intl/intl.dart';
6
@@ -22,11 +22,10 @@ class ServiceStatusTile extends StatelessWidget {
22 child: AutoSizeText(
23 "${status.title}${status.status != null ? " - ${status.status}" : ""}",
24 style: Theme.of(context).textTheme.bodyMedium!.copyWith(
25 - fontSize: 16,
26 -
27 - fontWeight: FontWeight.w800,
28 - height: 1,
29 - ),
25 + fontSize: 16,
26 + fontWeight: FontWeight.w800,
27 + height: 1,
28 + ),
29 maxLines: 1,
30 textAlign: TextAlign.start,
31 ),
lib/src/widgets/services_updates_widget.dart
+3 -7
@@ -43,7 +43,7 @@ class _ServicesUpdatesWidgetState extends State<ServicesUpdatesWidget> {
43 },
44 child: CakeImageWidget(
45 imageUrl: "assets/images/notif.svg",
46 - color: Theme.of(context).colorScheme.onSurface,
46 + color: Theme.of(context).colorScheme.primary,
47 width: DeviceInfo.instance.isDesktop ? 30 : 20,
48 ),
49 );
@@ -108,7 +108,7 @@ class _ServicesUpdatesWidgetState extends State<ServicesUpdatesWidget> {
108 horizontal: 24,
109 vertical: 20,
110 ),
111 - child: PrimaryImageButton(
111 + child: PrimaryButton(
112 onPressed: () {
113 try {
114 launchUrl(
@@ -118,10 +118,6 @@ class _ServicesUpdatesWidgetState extends State<ServicesUpdatesWidget> {
118 mode: LaunchMode.externalApplication);
119 } catch (_) {}
120 },
121 - image: Image.asset(
122 - "assets/images/status_website_image.png",
123 - color: Theme.of(context).colorScheme.onPrimary,
124 - ),
121 text: "Status Website",
122 color: Theme.of(context).colorScheme.primary,
123 textColor: Theme.of(context).colorScheme.onPrimary,
@@ -139,7 +135,7 @@ class _ServicesUpdatesWidgetState extends State<ServicesUpdatesWidget> {
135 children: [
136 CakeImageWidget(
137 imageUrl: "assets/images/notif.svg",
142 - color: Theme.of(context).colorScheme.onSurface,
138 + color: Theme.of(context).colorScheme.primary,
139 width: DeviceInfo.instance.isDesktop ? 30 : 20,
140 ),
141 if (state.hasData && state.data!.hasUpdates && !wasOpened)
lib/src/widgets/setting_actions.dart
+6 -5
@@ -34,7 +34,7 @@ class SettingActions {
34 static SettingActions silentPaymentsSettingAction = SettingActions._(
35 key: ValueKey('dashboard_page_menu_widget_silent_payment_settings_button_key'),
36 name: (context) => S.of(context).silent_payments_settings,
37 - image: 'assets/images/bitcoin_menu.png',
37 + image: 'assets/images/crypto/bitcoin.png',
38 onTap: (BuildContext context) {
39 Navigator.of(context).pushNamed(Routes.silentPaymentsSettings);
40 },
@@ -43,16 +43,17 @@ class SettingActions {
43 static SettingActions exportOutputsAction = SettingActions._(
44 key: ValueKey('dashboard_page_menu_widget_export_outputs_settings_button_key'),
45 name: (context) => S.of(context).export_outputs,
46 - image: 'assets/images/monero_menu.png',
46 + image: 'assets/images/crypto/monero.png',
47 onTap: (BuildContext context) {
48 - Navigator.of(context).pushNamed(Routes.urqrAnimatedPage, arguments: {'export-outputs': 'export-outputs'});
48 + Navigator.of(context)
49 + .pushNamed(Routes.urqrAnimatedPage, arguments: {'export-outputs': 'export-outputs'});
50 },
51 );
51 -
52 +
53 static SettingActions litecoinMwebSettingAction = SettingActions._(
54 key: ValueKey('dashboard_page_menu_widget_litecoin_mweb_settings_button_key'),
55 name: (context) => S.of(context).litecoin_mweb_settings,
55 - image: 'assets/images/litecoin_menu.png',
56 + image: 'assets/images/crypto/litecoin.png',
57 onTap: (BuildContext context) {
58 Navigator.of(context).pushNamed(Routes.mwebSettings);
59 },
lib/src/widgets/standard_slide_button_widget.dart
+3 -8
@@ -1,6 +1,5 @@
1 import 'package:cake_wallet/src/widgets/primary_button.dart';
2 -import 'package:cake_wallet/themes/core/material_base_theme.dart';
3 -import 'package:cake_wallet/themes/utils/custom_theme_colors.dart';
2 +import 'package:cake_wallet/themes/core/theme_extension.dart';
3 import 'package:flutter/material.dart';
4
5 class StandardSlideButton extends StatefulWidget {
@@ -9,7 +8,6 @@ class StandardSlideButton extends StatefulWidget {
8 required this.onSlideComplete,
9 this.buttonText = '',
10 this.height = 48.0,
12 - required this.currentTheme,
11 required this.accessibleNavigationModeButtonText,
12 this.tileBackgroundColor,
13 this.knobColor,
@@ -18,11 +16,10 @@ class StandardSlideButton extends StatefulWidget {
16 final VoidCallback onSlideComplete;
17 final String buttonText;
18 final double height;
21 - final MaterialThemeBase currentTheme;
19 final String accessibleNavigationModeButtonText;
20 final Color? tileBackgroundColor;
21 final Color? knobColor;
25 -
22 +
23 @override
24 StandardSlideButtonState createState() => StandardSlideButtonState();
25 }
@@ -39,9 +36,7 @@ class StandardSlideButtonState extends State<StandardSlideButton> {
36 Widget build(BuildContext context) {
37 final bool accessible = MediaQuery.of(context).accessibleNavigation;
38
42 - final tileBackgroundColor = widget.currentTheme.isDark
43 - ? CustomThemeColors.backgroundGradientColorDark
44 - : CustomThemeColors.backgroundGradientColorLight;
39 + final tileBackgroundColor = context.currentTheme.customColors.backgroundGradientColor;
40
41 return accessible
42 ? PrimaryButton(
lib/src/widgets/standard_switch.dart
+11 -12
@@ -1,12 +1,16 @@
1 -import 'package:cake_wallet/themes/utils/custom_theme_colors.dart';
1 +import 'package:cake_wallet/themes/core/theme_extension.dart';
2 import 'package:flutter/material.dart';
3
4 class StandardSwitch extends StatefulWidget {
5 - const StandardSwitch({required this.value, required this.onTapped});
5 + const StandardSwitch({
6 + required this.value,
7 + required this.onTapped,
8 + this.backgroundColor,
9 + });
10
11 final bool value;
12 + final Color? backgroundColor;
13 final VoidCallback onTapped;
9 -
14 @override
15 StandardSwitchState createState() => StandardSwitchState();
16 }
@@ -14,7 +18,6 @@ class StandardSwitch extends StatefulWidget {
18 class StandardSwitchState extends State<StandardSwitch> {
19 @override
20 Widget build(BuildContext context) {
17 - final isDarkMode = Theme.of(context).brightness == Brightness.dark;
21 return Semantics(
22 toggled: widget.value,
23 child: GestureDetector(
@@ -28,20 +31,16 @@ class StandardSwitchState extends State<StandardSwitch> {
31 decoration: BoxDecoration(
32 color: widget.value
33 ? Theme.of(context).colorScheme.primary
31 - : isDarkMode
32 - ? CustomThemeColors.toggleColorOffStateDark
33 - : CustomThemeColors.toggleColorOffStateLight,
34 - borderRadius: BorderRadius.all(
35 - Radius.circular(14.0),
36 - ),
34 + : widget.backgroundColor ?? context.currentTheme.customColors.toggleColorOffState,
35 + borderRadius: BorderRadius.all(Radius.circular(14.0)),
36 ),
37 child: Container(
38 width: 24.0,
39 height: 24.0,
40 decoration: BoxDecoration(
42 - color: isDarkMode
41 + color: context.currentTheme.isDark
42 ? Theme.of(context).colorScheme.surface
44 - : CustomThemeColors.toggleKnobStateColorLight,
43 + : context.currentTheme.customColors.toggleKnobStateColor,
44 shape: BoxShape.circle,
45 ),
46 ),
lib/src/widgets/template_tile.dart
+1 -1
@@ -1,4 +1,4 @@
1 -import 'package:cake_wallet/themes/utils/custom_theme_colors.dart';
1 +import 'package:cake_wallet/themes/core/custom_theme_colors.dart';
2 import 'package:flutter/material.dart';
3
4 class TemplateTile extends StatefulWidget {
lib/src/widgets/warning_box_widget.dart
+5 -12
@@ -1,11 +1,9 @@
1 -import 'package:cake_wallet/themes/core/material_base_theme.dart';
2 -import 'package:cake_wallet/themes/utils/custom_theme_colors.dart';
1 +import 'package:cake_wallet/themes/core/theme_extension.dart';
2 import 'package:flutter/material.dart';
3
4 class WarningBox extends StatelessWidget {
5 const WarningBox({
6 required this.content,
8 - required this.currentTheme,
7 this.showBorder = true,
8 this.textColor,
9 this.textAlign,
@@ -18,7 +16,6 @@ class WarningBox extends StatelessWidget {
16 });
17
18 final String content;
21 - final MaterialThemeBase currentTheme;
19 final bool showBorder;
20 final Color? textColor;
21 final TextAlign? textAlign;
@@ -33,15 +30,11 @@ class WarningBox extends StatelessWidget {
30 return Container(
31 padding: padding ?? EdgeInsets.symmetric(horizontal: 12, vertical: 8),
32 decoration: BoxDecoration(
36 - color: currentTheme.isDark
37 - ? CustomThemeColors.warningContainerColorDark
38 - : CustomThemeColors.warningContainerColorLight,
33 + color: context.customColors.warningContainerColor,
34 borderRadius: BorderRadius.all(Radius.circular(12)),
35 border: showBorder
36 ? Border.all(
42 - color: currentTheme.isDark
43 - ? CustomThemeColors.warningOutlineColorDark
44 - : CustomThemeColors.warningOutlineColorLight,
37 + color: context.customColors.warningOutlineColor,
38 width: 2.0,
39 )
40 : null,
@@ -53,8 +46,8 @@ class WarningBox extends StatelessWidget {
46 Icons.warning_amber_rounded,
47 size: iconSize ?? 64,
48 color: textColor ?? Theme.of(context).colorScheme.onSurface,
56 - ),
57 - SizedBox(width:iconSpacing ?? 6),
49 + ),
50 + SizedBox(width: iconSpacing ?? 6),
51 Expanded(
52 child: Text(
53 content,
lib/themes/core/custom_theme_colors.dart new
+25
@@ -0,0 +1,25 @@
1 +import 'package:flutter/material.dart';
2 +
3 +/// Abstract interface for theme-specific custom colors
4 +/// Each theme implementation should provide its own custom colors
5 +abstract class CustomThemeColors {
6 + // Warning colors
7 + Color get warningContainerColor;
8 + Color get warningOutlineColor;
9 +
10 + // Background gradient colors
11 + Color get backgroundMainColor;
12 + Color get backgroundGradientColor;
13 +
14 + // Card gradient colors
15 + Color get cardGradientColorPrimary;
16 + Color get cardGradientColorSecondary;
17 +
18 + // Toggle colors
19 + Color get toggleKnobStateColor;
20 + Color get toggleColorOffState;
21 +
22 + // Sync colors (common across themes)
23 + static const syncGreen = Color(0xFFFF12A439);
24 + static const syncYellow = Color(0xFFFFFB84E);
25 +}
lib/themes/core/material_base_theme.dart
+19
@@ -1,7 +1,13 @@
1 import 'package:flutter/material.dart';
2 +import 'package:cake_wallet/themes/core/custom_theme_colors.dart';
3
4 enum ThemeType { light, dark }
5
6 +abstract interface class ThemeAccentColor {
7 + Color get color;
8 + String get name;
9 +}
10 +
11 /// Abstract base class for theme data in the app.
12 /// This class defines the contract that all theme implementations must follow.
13 abstract class MaterialThemeBase {
@@ -32,4 +38,17 @@ abstract class MaterialThemeBase {
38 ThemeData get themeData;
39
40 bool get isDark => brightness == Brightness.dark;
41 +
42 + /// Custom colors provider for theme-specific colors
43 + CustomThemeColors get customColors;
44 +
45 + /// Theme family identifier for grouping themes with accent colors
46 + String? get themeFamily;
47 +
48 + String? get accentColorId;
49 +
50 + String? get accentColorName;
51 +
52 + /// Whether this theme has accent color variants
53 + bool get hasAccentColors => themeFamily != null;
54 }
lib/themes/core/theme_extension.dart new
+11
@@ -0,0 +1,11 @@
1 +import 'package:cake_wallet/di.dart';
2 +import 'package:cake_wallet/themes/core/custom_theme_colors.dart';
3 +import 'package:cake_wallet/themes/core/material_base_theme.dart';
4 +import 'package:cake_wallet/themes/core/theme_store.dart';
5 +import 'package:flutter/material.dart';
6 +
7 +/// For access to the current theme that we would have had to do a lot of constructor pass down for.
8 +extension ThemeX on BuildContext {
9 + MaterialThemeBase get currentTheme => getIt<ThemeStore>().currentTheme;
10 + CustomThemeColors get customColors => currentTheme.customColors;
11 +}
lib/themes/core/theme_store.dart
+128 -14
@@ -7,6 +7,7 @@ import 'package:cake_wallet/themes/utils/theme_list.dart';
7 import 'package:shared_preferences/shared_preferences.dart';
8
9 import 'material_base_theme.dart';
10 +import 'package:cake_wallet/themes/theme_classes/black_theme.dart';
11
12 part 'theme_store.g.dart';
13
@@ -20,6 +21,9 @@ abstract class ThemeStoreBase with Store {
21 @observable
22 ThemeMode _themeMode = ThemeMode.system;
23
24 + @observable
25 + bool _isOled = false;
26 +
27 @computed
28 MaterialThemeBase get currentTheme => _currentTheme;
29
@@ -29,6 +33,38 @@ abstract class ThemeStoreBase with Store {
33 @computed
34 bool get isDarkMode => _currentTheme.isDark;
35
36 + @computed
37 + bool get isOled => _isOled;
38 +
39 + @computed
40 + bool get hasCustomTheme => sharedPreferences.getInt(PreferencesKey.currentTheme) != null;
41 +
42 + @computed
43 + MaterialThemeBase? get savedCustomTheme {
44 + final raw = sharedPreferences.getInt(PreferencesKey.currentTheme);
45 + return raw != null ? ThemeList.deserialize(raw: raw) : null;
46 + }
47 +
48 + @computed
49 + MaterialThemeBase? get savedDarkTheme {
50 + try {
51 + final raw = sharedPreferences.getInt(PreferencesKey.savedDarkTheme);
52 + return raw != null ? ThemeList.deserialize(raw: raw) : null;
53 + } catch (e) {
54 + return null;
55 + }
56 + }
57 +
58 + @computed
59 + MaterialThemeBase? get savedLightTheme {
60 + try {
61 + final raw = sharedPreferences.getInt(PreferencesKey.savedLightTheme);
62 + return raw != null ? ThemeList.deserialize(raw: raw) : null;
63 + } catch (e) {
64 + return null;
65 + }
66 + }
67 +
68 late SharedPreferences sharedPreferences;
69
70 @action
@@ -37,6 +73,15 @@ abstract class ThemeStoreBase with Store {
73
74 _currentTheme = theme;
75 await sharedPreferences.setInt(PreferencesKey.currentTheme, theme.raw);
76 + _isOled = theme is BlackTheme ? theme.isOled : false;
77 + await sharedPreferences.setBool(PreferencesKey.blackThemeOled, _isOled);
78 +
79 + // Save preferred themes for system mode
80 + if (theme.isDark) {
81 + await sharedPreferences.setInt(PreferencesKey.savedDarkTheme, theme.raw);
82 + } else {
83 + await sharedPreferences.setInt(PreferencesKey.savedLightTheme, theme.raw);
84 + }
85 }
86
87 @action
@@ -44,11 +89,33 @@ abstract class ThemeStoreBase with Store {
89 if (_themeMode == mode) return;
90
91 _themeMode = mode;
47 -
92 await _saveThemeModeToPrefs(mode);
93
94 if (mode == ThemeMode.system) {
51 - setTheme(getThemeFromSystem());
95 + // We'll always use getThemeFromSystem() for system mode to respect saved themes
96 + await setTheme(getThemeFromSystem());
97 + return;
98 + }
99 +
100 + if (!hasCustomTheme) return;
101 +
102 + final savedTheme = savedCustomTheme;
103 + if (savedTheme == null) return;
104 +
105 + if (_isThemeCompatibleWithMode(savedTheme, mode)) {
106 + await setTheme(savedTheme);
107 + }
108 + }
109 +
110 + @action
111 + Future<void> setOledEnabled(bool value) async {
112 + if (_isOled == value) return;
113 + _isOled = value;
114 + await sharedPreferences.setBool(PreferencesKey.blackThemeOled, value);
115 +
116 + if (_currentTheme is BlackTheme) {
117 + final current = _currentTheme as BlackTheme;
118 + await setTheme(BlackTheme(current.accentColor, isOled: value));
119 }
120 }
121
@@ -109,13 +176,22 @@ abstract class ThemeStoreBase with Store {
176 /// Loads the saved theme from SharedPreferences
177 Future<void> loadSavedTheme({bool isFromBackup = false}) async {
178 try {
112 - final savedTheme = sharedPreferences.getInt(PreferencesKey.currentTheme);
113 - if (savedTheme == null) {
179 + _isOled = sharedPreferences.getBool(PreferencesKey.blackThemeOled) ?? false;
180 + final theme = savedCustomTheme;
181 +
182 + if (!hasCustomTheme || theme == null) {
183 await _setSystemTheme();
184 return;
185 }
186
118 - final theme = ThemeList.deserialize(raw: savedTheme);
187 + if (theme is BlackTheme) {
188 + final adjusted = BlackTheme(theme.accentColor, isOled: _isOled);
189 + if (_currentTheme != adjusted) {
190 + await setTheme(adjusted);
191 + }
192 + } else if (_currentTheme != theme) {
193 + await setTheme(theme);
194 + }
195
196 final newThemeMode = _getThemeModeOnStartUp(theme, isFromBackup);
197
@@ -127,16 +203,14 @@ abstract class ThemeStoreBase with Store {
203 if (_themeMode != newThemeMode) {
204 await setThemeMode(newThemeMode);
205 }
130 -
131 - if (_currentTheme != theme) {
132 - await setTheme(theme);
133 - }
206 } catch (e) {
207 await _setSystemTheme();
208 }
209 }
210
211 Future<void> _setSystemTheme({bool isNewInstall = false}) async {
212 + if (!isNewInstall && hasCustomTheme) return;
213 +
214 final systemTheme = getThemeFromSystem();
215
216 if (_currentTheme != systemTheme) {
@@ -145,10 +219,9 @@ abstract class ThemeStoreBase with Store {
219
220 if (isNewInstall) {
221 await _saveThemeModeToPrefs(ThemeMode.system);
148 - }
149 -
150 - if (_themeMode != ThemeMode.system) {
151 - await setThemeMode(ThemeMode.system);
222 + if (_themeMode != ThemeMode.system) {
223 + await setThemeMode(ThemeMode.system);
224 + }
225 }
226 }
227
@@ -169,6 +242,47 @@ abstract class ThemeStoreBase with Store {
242
243 MaterialThemeBase getThemeFromSystem() {
244 final systemBrightness = WidgetsBinding.instance.platformDispatcher.platformBrightness;
172 - return systemBrightness == Brightness.dark ? ThemeList.darkTheme : ThemeList.lightTheme;
245 +
246 + if (systemBrightness == Brightness.dark) {
247 + // Prefer saved dark theme when available
248 + try {
249 + final savedDark = savedDarkTheme;
250 + if (savedDark != null) {
251 + if (savedDark is BlackTheme) {
252 + // We'll use the OLED flag from the saved theme itself, not from separate preference
253 + return BlackTheme(savedDark.accentColor, isOled: savedDark.isOled);
254 + }
255 + return savedDark;
256 + }
257 + } catch (_) {}
258 +
259 + // If no saved dark theme, check if current theme is BlackTheme with accent colors
260 + // and preserve it when switching to dark mode
261 + if (_currentTheme is BlackTheme) {
262 + final currentBlackTheme = _currentTheme as BlackTheme;
263 + return BlackTheme(currentBlackTheme.accentColor, isOled: currentBlackTheme.isOled);
264 + }
265 +
266 + return ThemeList.darkTheme;
267 + }
268 +
269 + // Light system preference: prefer saved light theme when available
270 + try {
271 + final savedLight = savedLightTheme;
272 + if (savedLight != null) return savedLight;
273 + } catch (_) {}
274 + return ThemeList.lightTheme;
275 + }
276 +
277 + /// Checks if a theme is compatible with a theme mode
278 + bool _isThemeCompatibleWithMode(MaterialThemeBase theme, ThemeMode mode) {
279 + switch (mode) {
280 + case ThemeMode.light:
281 + return !theme.isDark;
282 + case ThemeMode.dark:
283 + return theme.isDark;
284 + case ThemeMode.system:
285 + return true; // All themes are compatible with system mode
286 + }
287 }
288 }
lib/themes/custom_theme_colors/black_theme_custom_colors.dart new
+28
@@ -0,0 +1,28 @@
1 +import 'dart:ui';
2 +import 'package:cake_wallet/themes/core/custom_theme_colors.dart';
3 +
4 +class BlackThemeCustomColors extends CustomThemeColors {
5 + @override
6 + Color get warningContainerColor => const Color(0xFF8E5800);
7 +
8 + @override
9 + Color get warningOutlineColor => const Color(0xFFFFB84E);
10 +
11 + @override
12 + Color get backgroundMainColor => const Color(0xFF000000);
13 +
14 + @override
15 + Color get backgroundGradientColor => const Color(0xFF000000);
16 +
17 + @override
18 + Color get cardGradientColorPrimary => const Color(0xFF202023);
19 +
20 + @override
21 + Color get cardGradientColorSecondary => const Color(0xFF181819);
22 +
23 + @override
24 + Color get toggleKnobStateColor => const Color(0xFFFFFFFF);
25 +
26 + @override
27 + Color get toggleColorOffState => const Color(0xFF2B292B);
28 +}
lib/themes/custom_theme_colors/dark_theme_custom_colors.dart new
+28
@@ -0,0 +1,28 @@
1 +import 'dart:ui';
2 +import 'package:cake_wallet/themes/core/custom_theme_colors.dart';
3 +
4 +class DarkThemeCustomColors extends CustomThemeColors {
5 + @override
6 + Color get warningContainerColor => const Color(0xFF8E5800);
7 +
8 + @override
9 + Color get warningOutlineColor => const Color(0xFFFFB84E);
10 +
11 + @override
12 + Color get backgroundMainColor => const Color(0xFF000000);
13 +
14 + @override
15 + Color get backgroundGradientColor => const Color(0xFF0F1A36);
16 +
17 + @override
18 + Color get cardGradientColorPrimary => const Color(0xFF2B3A67);
19 +
20 + @override
21 + Color get cardGradientColorSecondary => const Color(0xFF1C2A4F);
22 +
23 + @override
24 + Color get toggleKnobStateColor => const Color(0xFFFFFFFF);
25 +
26 + @override
27 + Color get toggleColorOffState => const Color(0xFF3A4F88);
28 +}
lib/themes/custom_theme_colors/light_theme_custom_colors.dart new
+28
@@ -0,0 +1,28 @@
1 +import 'dart:ui';
2 +import 'package:cake_wallet/themes/core/custom_theme_colors.dart';
3 +
4 +class LightThemeCustomColors extends CustomThemeColors {
5 + @override
6 + Color get warningContainerColor => const Color(0xFFFFCC00);
7 +
8 + @override
9 + Color get warningOutlineColor => const Color(0xFF312938);
10 +
11 + @override
12 + Color get backgroundMainColor => const Color(0xFF000000);
13 +
14 + @override
15 + Color get backgroundGradientColor => const Color(0xFFE7E7FD);
16 +
17 + @override
18 + Color get cardGradientColorPrimary => const Color(0xFFFFFFFF);
19 +
20 + @override
21 + Color get cardGradientColorSecondary => const Color(0xFFF3F3FF);
22 +
23 + @override
24 + Color get toggleKnobStateColor => const Color(0xFFFFFFFF);
25 +
26 + @override
27 + Color get toggleColorOffState => const Color(0xFFCACAE7);
28 +}
lib/themes/theme_classes/black_theme.dart new
+299
@@ -0,0 +1,299 @@
1 +import 'package:flutter/material.dart';
2 +import 'package:cake_wallet/themes/core/material_base_theme.dart';
3 +import 'package:cake_wallet/themes/core/custom_theme_colors.dart';
4 +import 'package:cake_wallet/themes/custom_theme_colors/black_theme_custom_colors.dart';
5 +
6 +enum BlackThemeAccentColor implements ThemeAccentColor {
7 + cakePrimary(Color(0xFF52B6F0), 'Cake Primary'),
8 + bchGreen(Color(0xFF44BA52), 'BCH Green'),
9 + bitcoinYellow(Color(0xFFFFC107), 'Bitcoin Yellow'),
10 + moneroOrange(Color(0xFFFF6600), 'Monero Orange'),
11 + tronRed(Color(0xFFFF4242), 'Tron Red'),
12 + frostingPurple(Color(0xFFBABAF3), 'Frosting Purple');
13 +
14 + const BlackThemeAccentColor(this.color, this.name);
15 +
16 + @override
17 + final Color color;
18 +
19 + @override
20 + final String name;
21 +}
22 +
23 +class BlackTheme extends MaterialThemeBase {
24 + BlackTheme(this.accentColor, {this.isOled = false});
25 +
26 + final BlackThemeAccentColor accentColor;
27 + final bool isOled;
28 +
29 + @override
30 + Brightness get brightness => Brightness.dark;
31 +
32 + @override
33 + ThemeMode get themeMode => ThemeMode.dark;
34 +
35 + @override
36 + Color get primaryColor => accentColor.color;
37 +
38 + @override
39 + Color get secondaryColor => const Color(0xFFCCC4CD);
40 +
41 + @override
42 + Color get errorColor => const Color(0xFFFFB4AB);
43 +
44 + @override
45 + Color get surfaceColor => isOled ? const Color(0xFF000000) : const Color(0xFF131314);
46 +
47 + @override
48 + Color get tertiaryColor => const Color(0xFFDEBFC5);
49 +
50 + @override
51 + ColorScheme get colorScheme => ColorScheme.dark(
52 + primary: primaryColor,
53 + onPrimary: const Color(0xFF352D3C),
54 + primaryContainer: const Color(0xFF28212F),
55 + onPrimaryContainer: const Color(0xFFB7ABBE),
56 + secondary: secondaryColor,
57 + onSecondary: const Color(0xFF332F36),
58 + secondaryContainer: const Color(0xFF454148),
59 + onSecondaryContainer: const Color(0xFFDFD6DF),
60 + tertiary: tertiaryColor,
61 + onTertiary: const Color(0xFF3F2B30),
62 + tertiaryContainer: const Color(0xFF321F24),
63 + onTertiaryContainer: const Color(0xFFC6A8AE),
64 + error: errorColor,
65 + onError: const Color(0xFFB71919),
66 + errorContainer: const Color(0xFFC53636),
67 + onErrorContainer: const Color(0xFFFFDAD6),
68 + surface: surfaceColor,
69 + background: surfaceColor,
70 + onSurface: const Color(0xFFE6E1E3),
71 + onSurfaceVariant: const Color(0xFFB4B4B4),
72 + surfaceContainerLowest: isOled ? const Color(0xFF000000) : const Color(0xFF0F0E0F),
73 + surfaceContainerLow: Color(0xFF1C1B1C),
74 + surfaceContainer: Color(0xFF211F20),
75 + surfaceContainerHigh: Color(0xFF2B292B),
76 + surfaceContainerHighest: Color(0xFF363435),
77 + outline: const Color(0xFF958F95),
78 + outlineVariant: const Color(0xFF49454B),
79 + );
80 +
81 + static const String fontFamily = 'Lato';
82 +
83 + @override
84 + TextTheme get textTheme => TextTheme(
85 + displayLarge: TextStyle(
86 + fontSize: 57,
87 + fontWeight: FontWeight.w400,
88 + letterSpacing: -0.25,
89 + color: colorScheme.onSurface,
90 + ),
91 + displayMedium: TextStyle(
92 + fontSize: 45,
93 + fontWeight: FontWeight.w400,
94 + letterSpacing: 0,
95 + color: colorScheme.onSurface,
96 + ),
97 + displaySmall: TextStyle(
98 + fontSize: 36,
99 + fontWeight: FontWeight.w400,
100 + letterSpacing: 0,
101 + color: colorScheme.onSurface,
102 + ),
103 + headlineLarge: TextStyle(
104 + fontSize: 32,
105 + fontWeight: FontWeight.w400,
106 + letterSpacing: 0,
107 + color: colorScheme.onSurface,
108 + ),
109 + headlineMedium: TextStyle(
110 + fontSize: 28,
111 + fontWeight: FontWeight.w400,
112 + letterSpacing: 0,
113 + color: colorScheme.onSurface,
114 + ),
115 + headlineSmall: TextStyle(
116 + fontSize: 24,
117 + fontWeight: FontWeight.w400,
118 + letterSpacing: 0,
119 + color: colorScheme.onSurface,
120 + ),
121 + titleLarge: TextStyle(
122 + fontSize: 22,
123 + fontWeight: FontWeight.w400,
124 + letterSpacing: 0,
125 + color: colorScheme.onSurface,
126 + ),
127 + titleMedium: TextStyle(
128 + fontSize: 16,
129 + fontWeight: FontWeight.w500,
130 + letterSpacing: 0.15,
131 + color: colorScheme.onSurface,
132 + ),
133 + titleSmall: TextStyle(
134 + fontSize: 14,
135 + fontWeight: FontWeight.w500,
136 + letterSpacing: 0.1,
137 + color: colorScheme.onSurface,
138 + ),
139 + bodyLarge: TextStyle(
140 + fontSize: 16,
141 + fontWeight: FontWeight.w400,
142 + letterSpacing: 0.5,
143 + color: colorScheme.onSurface,
144 + ),
145 + bodyMedium: TextStyle(
146 + fontSize: 14,
147 + fontWeight: FontWeight.w400,
148 + letterSpacing: 0.25,
149 + color: colorScheme.onSurface,
150 + ),
151 + bodySmall: TextStyle(
152 + fontSize: 12,
153 + fontWeight: FontWeight.w400,
154 + letterSpacing: 0.4,
155 + color: colorScheme.onSurface,
156 + ),
157 + labelLarge: TextStyle(
158 + fontSize: 14,
159 + fontWeight: FontWeight.w500,
160 + letterSpacing: 0.1,
161 + color: colorScheme.onSurface,
162 + ),
163 + labelMedium: TextStyle(
164 + fontSize: 12,
165 + fontWeight: FontWeight.w500,
166 + letterSpacing: 0.5,
167 + color: colorScheme.onSurface,
168 + ),
169 + labelSmall: TextStyle(
170 + fontSize: 10,
171 + fontWeight: FontWeight.w500,
172 + letterSpacing: 0.5,
173 + color: colorScheme.onSurface,
174 + ),
175 + );
176 +
177 + @override
178 + ThemeData get themeData => ThemeData(
179 + useMaterial3: true,
180 + fontFamily: fontFamily,
181 + brightness: brightness,
182 + colorScheme: colorScheme,
183 + scaffoldBackgroundColor: surfaceColor,
184 + canvasColor: surfaceColor,
185 + cardColor: colorScheme.surface,
186 + textTheme: textTheme,
187 + appBarTheme: AppBarTheme(
188 + backgroundColor: surfaceColor,
189 + foregroundColor: colorScheme.onSurface,
190 + elevation: 0,
191 + ),
192 + cardTheme: CardThemeData(
193 + color: colorScheme.surface,
194 + elevation: 1,
195 + shape: RoundedRectangleBorder(
196 + borderRadius: BorderRadius.circular(12),
197 + ),
198 + ),
199 + elevatedButtonTheme: ElevatedButtonThemeData(
200 + style: ElevatedButton.styleFrom(
201 + backgroundColor: colorScheme.primary,
202 + foregroundColor: colorScheme.onPrimary,
203 + elevation: 0,
204 + shape: RoundedRectangleBorder(
205 + borderRadius: BorderRadius.circular(10),
206 + ),
207 + ),
208 + ),
209 + outlinedButtonTheme: OutlinedButtonThemeData(
210 + style: OutlinedButton.styleFrom(
211 + foregroundColor: colorScheme.primary,
212 + side: BorderSide(color: colorScheme.outline),
213 + shape: RoundedRectangleBorder(
214 + borderRadius: BorderRadius.circular(10),
215 + ),
216 + ),
217 + ),
218 + textButtonTheme: TextButtonThemeData(
219 + style: TextButton.styleFrom(
220 + foregroundColor: colorScheme.primary,
221 + shape: RoundedRectangleBorder(
222 + borderRadius: BorderRadius.circular(10),
223 + ),
224 + ),
225 + ),
226 + inputDecorationTheme: InputDecorationTheme(
227 + filled: true,
228 + fillColor: colorScheme.surfaceContainer,
229 + border: OutlineInputBorder(
230 + borderRadius: BorderRadius.circular(10),
231 + borderSide: BorderSide.none,
232 + ),
233 + enabledBorder: OutlineInputBorder(
234 + borderRadius: BorderRadius.circular(10),
235 + borderSide: BorderSide.none,
236 + ),
237 + focusedBorder: OutlineInputBorder(
238 + borderRadius: BorderRadius.circular(10),
239 + borderSide: BorderSide(color: colorScheme.primary),
240 + ),
241 + errorBorder: OutlineInputBorder(
242 + borderRadius: BorderRadius.circular(10),
243 + borderSide: BorderSide(color: colorScheme.error),
244 + ),
245 + focusedErrorBorder: OutlineInputBorder(
246 + borderRadius: BorderRadius.circular(10),
247 + borderSide: BorderSide(color: colorScheme.error),
248 + ),
249 + disabledBorder: OutlineInputBorder(
250 + borderRadius: BorderRadius.circular(10),
251 + borderSide: BorderSide.none,
252 + ),
253 + ),
254 + );
255 +
256 + @override
257 + String get title => 'Black Theme (${accentColor.name})';
258 +
259 + @override
260 + ThemeType get type => ThemeType.dark;
261 +
262 + @override
263 + int get raw {
264 + final baseValue = switch (accentColor) {
265 + BlackThemeAccentColor.cakePrimary => 12,
266 + BlackThemeAccentColor.bchGreen => 13,
267 + BlackThemeAccentColor.bitcoinYellow => 14,
268 + BlackThemeAccentColor.moneroOrange => 15,
269 + BlackThemeAccentColor.tronRed => 16,
270 + BlackThemeAccentColor.frostingPurple => 17,
271 + };
272 + if (!isOled) return baseValue;
273 + // OLED encodes as 100 + base to avoid collisions
274 + return 100 + baseValue;
275 + }
276 +
277 + @override
278 + CustomThemeColors get customColors => BlackThemeCustomColors();
279 +
280 + @override
281 + String? get themeFamily => 'BlackTheme';
282 +
283 + @override
284 + String? get accentColorId => accentColor.name.toLowerCase();
285 +
286 + @override
287 + String? get accentColorName => accentColor.name;
288 +
289 + @override
290 + bool operator ==(Object other) =>
291 + identical(this, other) ||
292 + other is BlackTheme &&
293 + runtimeType == other.runtimeType &&
294 + accentColor == other.accentColor &&
295 + isOled == other.isOled;
296 +
297 + @override
298 + int get hashCode => Object.hash(accentColor, isOled);
299 +}
lib/themes/theme_classes/dark_theme.dart
+16 -2
@@ -1,5 +1,7 @@
1 import 'package:flutter/material.dart';
2 import 'package:cake_wallet/themes/core/material_base_theme.dart';
3 +import 'package:cake_wallet/themes/core/custom_theme_colors.dart';
4 +import 'package:cake_wallet/themes/custom_theme_colors/dark_theme_custom_colors.dart';
5
6 class DarkTheme extends MaterialThemeBase {
7 @override
@@ -47,8 +49,8 @@ class DarkTheme extends MaterialThemeBase {
49 surfaceContainerLowest: Color(0xFF171C30),
50 surfaceContainerLow: Color(0xFF2D385C),
51 surfaceContainer: Color(0xFF24335B),
50 - surfaceContainerHigh: Color(0xFF212C47),
51 - surfaceContainerHighest: Color(0xFF2A3B67),
52 + surfaceContainerHigh: Color(0xFF2A3E73),
53 + surfaceContainerHighest: Color(0xFF334C8C),
54 outline: const Color(0xFF9EACC1),
55 outlineVariant: const Color(0xFF3E5579),
56 );
@@ -231,4 +233,16 @@ class DarkTheme extends MaterialThemeBase {
233
234 @override
235 int get raw => 1;
236 +
237 + @override
238 + CustomThemeColors get customColors => DarkThemeCustomColors();
239 +
240 + @override
241 + String? get themeFamily => null;
242 +
243 + @override
244 + String? get accentColorId => null;
245 +
246 + @override
247 + String? get accentColorName => null;
248 }
lib/themes/theme_classes/light_theme.dart
+14
@@ -1,5 +1,7 @@
1 import 'package:flutter/material.dart';
2 import 'package:cake_wallet/themes/core/material_base_theme.dart';
3 +import 'package:cake_wallet/themes/core/custom_theme_colors.dart';
4 +import 'package:cake_wallet/themes/custom_theme_colors/light_theme_custom_colors.dart';
5
6 class LightTheme extends MaterialThemeBase {
7 @override
@@ -228,4 +230,16 @@ class LightTheme extends MaterialThemeBase {
230
231 @override
232 int get raw => 0;
233 +
234 + @override
235 + CustomThemeColors get customColors => LightThemeCustomColors();
236 +
237 + @override
238 + String? get themeFamily => null;
239 +
240 + @override
241 + String? get accentColorId => null;
242 +
243 + @override
244 + String? get accentColorName => null;
245 }
lib/themes/utils/custom_theme_colors.dart deleted
-23
@@ -1,23 +0,0 @@
1 -import 'dart:ui';
2 -
3 -class CustomThemeColors {
4 - static const syncGreen = Color(0xFFFF12A439);
5 - static const syncYellow = Color(0xFFFFFB84E);
6 -
7 - static const warningOutlineColorDark = Color(0xFFFFB84E);
8 - static const warningContainerColorDark = Color(0xFF8E5800);
9 - static const warningContainerColorLight = Color(0xFFFFCC00);
10 - static const warningOutlineColorLight = Color(0xFF312938);
11 -
12 - static const backgroundGradientColorDark = Color(0xFF0F1A36);
13 - static const backgroundGradientColorLight = Color(0xFFE7E7FD);
14 -
15 - static const cardGradientColorPrimaryDark = Color(0xFF2B3A67);
16 - static const cardGradientColorPrimaryLight = Color(0xFFFFFFFF);
17 - static const cardGradientColorSecondaryDark = Color(0xFF1C2A4F);
18 - static const cardGradientColorSecondaryLight = Color(0xFFF3F3FF);
19 -
20 - static const toggleKnobStateColorLight = Color(0xFFFFFFFF);
21 - static const toggleColorOffStateLight = Color(0xFFCACAE7);
22 - static const toggleColorOffStateDark = Color(0xFF3A4F88);
23 -}
lib/themes/utils/theme_list.dart
+69 -1
@@ -1,16 +1,59 @@
1 import 'package:cake_wallet/themes/core/material_base_theme.dart';
2 import 'package:cake_wallet/themes/theme_classes/dark_theme.dart';
3 import 'package:cake_wallet/themes/theme_classes/light_theme.dart';
4 +import 'package:cake_wallet/themes/theme_classes/black_theme.dart';
5
6 class ThemeList {
7 static final all = [
8 darkTheme,
9 lightTheme,
10 + blackThemeCakePrimary,
11 + blackThemeBCHGreen,
12 + blackThemeBitcoinYellow,
13 + blackThemeMoneroOrange,
14 + blackThemeTronRed,
15 + blackThemeFrostingPurple,
16 ];
17
18 static final lightTheme = LightTheme();
19 static final darkTheme = DarkTheme();
20
21 + static final blackThemeCakePrimary = BlackTheme(BlackThemeAccentColor.cakePrimary);
22 + static final blackThemeCakePrimaryOled = BlackTheme(
23 + BlackThemeAccentColor.cakePrimary,
24 + isOled: true,
25 + );
26 +
27 + static final blackThemeBitcoinYellow = BlackTheme(BlackThemeAccentColor.bitcoinYellow);
28 + static final blackThemeBitcoinYellowOled = BlackTheme(
29 + BlackThemeAccentColor.bitcoinYellow,
30 + isOled: true,
31 + );
32 +
33 + static final blackThemeMoneroOrange = BlackTheme(BlackThemeAccentColor.moneroOrange);
34 + static final blackThemeMoneroOrangeOled = BlackTheme(
35 + BlackThemeAccentColor.moneroOrange,
36 + isOled: true,
37 + );
38 +
39 + static final blackThemeBCHGreen = BlackTheme(BlackThemeAccentColor.bchGreen);
40 + static final blackThemeBCHGreenOled = BlackTheme(
41 + BlackThemeAccentColor.bchGreen,
42 + isOled: true,
43 + );
44 +
45 + static final blackThemeTronRed = BlackTheme(BlackThemeAccentColor.tronRed);
46 + static final blackThemeTronRedOled = BlackTheme(
47 + BlackThemeAccentColor.tronRed,
48 + isOled: true,
49 + );
50 +
51 + static final blackThemeFrostingPurple = BlackTheme(BlackThemeAccentColor.frostingPurple);
52 + static final blackThemeFrostingPurpleOled = BlackTheme(
53 + BlackThemeAccentColor.frostingPurple,
54 + isOled: true,
55 + );
56 +
57 static MaterialThemeBase deserialize({required int raw}) {
58 switch (raw) {
59 case 0:
@@ -26,8 +69,33 @@ class ThemeList {
69 case 6:
70 case 8:
71 case 9:
29 - default:
72 return darkTheme;
73 + case 12:
74 + return blackThemeCakePrimary;
75 + case 13:
76 + return blackThemeBCHGreen;
77 + case 14:
78 + return blackThemeBitcoinYellow;
79 + case 15:
80 + return blackThemeMoneroOrange;
81 + case 16:
82 + return blackThemeTronRed;
83 + case 17:
84 + return blackThemeFrostingPurple;
85 + case 112:
86 + return blackThemeCakePrimaryOled;
87 + case 113:
88 + return blackThemeBCHGreenOled;
89 + case 114:
90 + return blackThemeBitcoinYellowOled;
91 + case 115:
92 + return blackThemeMoneroOrangeOled;
93 + case 116:
94 + return blackThemeTronRedOled;
95 + case 117:
96 + return blackThemeFrostingPurpleOled;
97 + default:
98 + return blackThemeCakePrimary;
99 }
100 }
101 }
lib/themes/utils/theme_provider.dart
+9 -2
@@ -1,5 +1,6 @@
1 import 'package:cake_wallet/themes/core/theme_store.dart';
2 import 'package:cake_wallet/themes/utils/theme_list.dart';
3 +import 'package:cake_wallet/themes/theme_classes/black_theme.dart';
4 import 'package:flutter/material.dart';
5 import 'package:flutter_mobx/flutter_mobx.dart';
6
@@ -19,10 +20,16 @@ class ThemeProvider extends StatelessWidget {
20 Widget build(BuildContext context) {
21 return Observer(
22 builder: (_) {
22 - final theme = themeStore.currentTheme.themeData;
23 - final darkTheme = ThemeList.darkTheme.themeData;
23 + final currentTheme = themeStore.currentTheme;
24 + final theme = currentTheme.themeData;
25 final themeMode = themeStore.themeMode;
26
27 + final isCustomTheme = ThemeList.all.contains(currentTheme) || currentTheme is BlackTheme;
28 + if (isCustomTheme) {
29 + return materialAppBuilder(context, theme, theme, themeMode);
30 + }
31 +
32 + final darkTheme = ThemeList.darkTheme.themeData;
33 return materialAppBuilder(context, theme, darkTheme, themeMode);
34 },
35 );
lib/view_model/buy/buy_sell_view_model.dart
-2
@@ -78,8 +78,6 @@ abstract class BuySellViewModelBase extends WalletChangeListenerViewModel with S
78 cryptoCurrency = wallet.currency;
79 }
80
81 - bool get isDarkTheme => _appStore.themeStore.currentTheme.isDark;
82 -
81 double get amount {
82 final formattedFiatAmount = double.tryParse(fiatAmount) ?? 200.0;
83 final formattedCryptoAmount =
lib/view_model/exchange/exchange_view_model.dart
+1 -1
@@ -549,7 +549,7 @@ abstract class ExchangeViewModelBase extends WalletChangeListenerViewModel with
549 if (result[i] != 0) {
550 /// add this provider as its valid for this trade
551 try {
552 - newSortedProviders[result[i]] = _providers[i];
552 + newSortedProviders[result[i]] = _providers[i];
553 } catch (e) {
554 // will throw "Concurrent modification during iteration" error if modified at the same
555 // time [createTrade] is called, as this is not a normal map, but a sorted map
lib/view_model/settings/display_settings_view_model.dart
+139 -2
@@ -3,6 +3,8 @@ import 'package:cake_wallet/entities/fiat_currency.dart';
3 import 'package:cake_wallet/entities/sync_status_display_mode.dart';
4 import 'package:cake_wallet/store/settings_store.dart';
5 import 'package:cake_wallet/themes/core/material_base_theme.dart';
6 +import 'package:cake_wallet/themes/theme_classes/black_theme.dart';
7 +import 'package:cake_wallet/themes/utils/theme_list.dart';
8 import 'package:mobx/mobx.dart';
9 import 'package:cake_wallet/entities/fiat_api_mode.dart';
10 import 'package:cake_wallet/themes/core/theme_store.dart';
@@ -34,11 +36,14 @@ abstract class DisplaySettingsViewModelBase with Store {
36 bool get shouldShowMarketPlaceInDashboard => _settingsStore.shouldShowMarketPlaceInDashboard;
37
38 @computed
37 - ThemeData get theme => _themeStore.currentTheme.themeData;
39 + MaterialThemeBase get currentTheme => _themeStore.currentTheme;
40
41 @computed
42 ThemeMode get themeMode => _themeStore.themeMode;
43
44 + @computed
45 + bool get isBlackThemeOledEnabled => _themeStore.currentTheme is BlackTheme && _themeStore.isOled;
46 +
47 @computed
48 bool get disabledFiatApiMode => _settingsStore.fiatApiMode == FiatApiMode.disabled;
49
@@ -51,6 +56,50 @@ abstract class DisplaySettingsViewModelBase with Store {
56 @computed
57 String get backgroundImage => _settingsStore.backgroundImage;
58
59 + @computed
60 + List<MaterialThemeBase> get availableThemes {
61 + List<MaterialThemeBase> themes;
62 + switch (themeMode) {
63 + case ThemeMode.light:
64 + themes = ThemeList.all.where((theme) => theme.brightness == Brightness.light).toList();
65 + break;
66 + case ThemeMode.dark:
67 + themes = ThemeList.all.where((theme) => theme.brightness == Brightness.dark).toList();
68 + break;
69 + case ThemeMode.system:
70 + final systemBrightness = WidgetsBinding.instance.platformDispatcher.platformBrightness;
71 + themes = ThemeList.all.where((theme) => theme.brightness == systemBrightness).toList();
72 + break;
73 + }
74 +
75 + List<MaterialThemeBase> groupedThemes = [];
76 + Set<String> addedThemeFamilies = {};
77 +
78 + for (final theme in themes) {
79 + if (theme.hasAccentColors) {
80 + final family = theme.themeFamily!;
81 + if (!addedThemeFamilies.contains(family)) {
82 + groupedThemes.add(theme);
83 + addedThemeFamilies.add(family);
84 + }
85 + } else {
86 + groupedThemes.add(theme);
87 + }
88 + }
89 +
90 + return groupedThemes;
91 + }
92 +
93 + @computed
94 + List<ThemeAccentColor> get availableAccentColors {
95 + if (!currentTheme.hasAccentColors) return [];
96 +
97 + if (currentTheme.themeFamily == 'BlackTheme') {
98 + return BlackThemeAccentColor.values;
99 + }
100 + return [];
101 + }
102 +
103 @action
104 void setBalanceDisplayMode(BalanceDisplayMode value) => _settingsStore.balanceDisplayMode = value;
105
@@ -70,8 +119,52 @@ abstract class DisplaySettingsViewModelBase with Store {
119
120 @action
121 Future<void> onThemeSelected(MaterialThemeBase newTheme) async {
122 + if (newTheme is BlackTheme && _themeStore.isOled) {
123 + await setTheme(BlackTheme(newTheme.accentColor, isOled: true));
124 + return;
125 + }
126 await setTheme(newTheme);
74 - await setThemeMode(newTheme.themeMode);
127 + }
128 +
129 + @action
130 + Future<void> onAccentColorSelected(String accentColorId) async {
131 + if (!currentTheme.hasAccentColors) return;
132 +
133 + try {
134 + final newTheme = ThemeList.all.firstWhere(
135 + (theme) =>
136 + theme.hasAccentColors &&
137 + theme.themeFamily == currentTheme.themeFamily &&
138 + theme.accentColorId == accentColorId,
139 + );
140 +
141 + if (newTheme != currentTheme) {
142 + if (newTheme is BlackTheme && _themeStore.isOled) {
143 + await onThemeSelected(BlackTheme(newTheme.accentColor, isOled: true));
144 + } else {
145 + await onThemeSelected(newTheme);
146 + }
147 + }
148 + } catch (_) {}
149 + }
150 +
151 + @action
152 + Future<void> setBlackThemeOled(bool value) async {
153 + if (_themeStore.currentTheme is BlackTheme) {
154 + await _themeStore.setOledEnabled(value);
155 + }
156 + }
157 +
158 + bool isThemeSelected(MaterialThemeBase theme) {
159 + if (!theme.hasAccentColors) return currentTheme == theme;
160 +
161 + return currentTheme.hasAccentColors && currentTheme.themeFamily == theme.themeFamily;
162 + }
163 +
164 + bool isAccentColorSelected(String accentColorId) {
165 + if (!currentTheme.hasAccentColors) return false;
166 +
167 + return currentTheme.accentColorId == accentColorId;
168 }
169
170 @action
@@ -79,9 +172,35 @@ abstract class DisplaySettingsViewModelBase with Store {
172 await _themeStore.setTheme(newTheme);
173 }
174
175 + MaterialThemeBase? getFirstMatchingTheme(ThemeMode mode) {
176 + List<MaterialThemeBase> themes;
177 + switch (mode) {
178 + case ThemeMode.light:
179 + themes = ThemeList.all.where((theme) => theme.brightness == Brightness.light).toList();
180 + break;
181 + case ThemeMode.dark:
182 + themes = ThemeList.all.where((theme) => theme.brightness == Brightness.dark).toList();
183 + break;
184 + case ThemeMode.system:
185 + final systemBrightness = WidgetsBinding.instance.platformDispatcher.platformBrightness;
186 + themes = ThemeList.all.where((theme) => theme.brightness == systemBrightness).toList();
187 + break;
188 + }
189 +
190 + return themes.isNotEmpty ? themes.first : null;
191 + }
192 +
193 @action
194 Future<void> setThemeMode(ThemeMode value) async {
195 await _themeStore.setThemeMode(value);
196 + // We won't override the saved custom theme when switching to system mode.
197 + // We'll just let the ThemeStore resolve it based on system brightness and saved theme.
198 + if (value != ThemeMode.system) {
199 + final matchingTheme = getFirstMatchingTheme(value);
200 + if (matchingTheme != null) {
201 + await setTheme(matchingTheme);
202 + }
203 + }
204 }
205
206 @action
@@ -101,4 +220,22 @@ abstract class DisplaySettingsViewModelBase with Store {
220
221 @action
222 void setBackgroundImage(String path) => _settingsStore.backgroundImage = path;
223 +
224 + String getImageForTheme(MaterialThemeBase theme) {
225 + switch (theme.title) {
226 + case 'Dark Theme':
227 + return 'assets/images/dark.svg';
228 + case 'Light Theme':
229 + return 'assets/images/light.svg';
230 + case 'Black Theme (Cake Primary)':
231 + case 'Black Theme (BCH Green)':
232 + case 'Black Theme (Bitcoin Yellow)':
233 + case 'Black Theme (Monero Orange)':
234 + case 'Black Theme (Tron Red)':
235 + case 'Black Theme (Frosting Purple)':
236 + return 'assets/images/black_accent.svg';
237 + default:
238 + return 'assets/images/dark.svg';
239 + }
240 + }
241 }
pubspec_base.yaml
+2 -1
@@ -105,7 +105,7 @@ dependencies:
105 git:
106 url: https://github.com/LacticWhale/socks_dart
107 ref: 27ad7c2efae8d7460325c74b90f660085cbd0685
108 - flutter_svg: ^2.0.9
108 + flutter_svg: ^2.2.0
109 polyseed: ^0.0.7
110 nostr_tools:
111 git:
@@ -215,6 +215,7 @@ flutter:
215 - assets/images/
216 - assets/images/flags/
217 - assets/images/hardware_wallet/
218 + - assets/images/crypto/
219 - assets/node_list.yml
220 - assets/haven_node_list.yml
221 - assets/bitcoin_electrum_server_list.yml
res/values/strings_ar.arb
+4 -1
@@ -1,5 +1,6 @@
1 {
2 "about_cake_pay": "يتيح لك Cake Pay شراء بطاقات هدايا بأصول افتراضية بسهولة ، ويمكن إنفاقها على الفور لدى أكثر من 150,000 تاجر في الولايات المتحدة.",
3 + "accent_color": "لون لهجة",
4 "account": "حساب",
5 "accounts": "حسابتي",
6 "accounts_subaddresses": "الحسابات والعناوين الفرعية",
@@ -55,6 +56,7 @@
56 "and": "و",
57 "anonpay_description": "توليد ${type}. يمكن للمستلم ${method} بأي عملة مشفرة مدعومة ، وستتلقى أموالاً في هذه",
58 "apk_update": "تحديث APK",
59 + "appearance": "مظهر",
60 "approve": "ﺪﻤﺘﻌﻳ",
61 "approve_request": "الموافقة على الطلب",
62 "approve_tokens": "الموافقة على الرموز",
@@ -568,6 +570,7 @@
570 "offline": "غير متصل على الانترنت",
571 "ok": "حسناً",
572 "old_fee": "الرسوم القديمة",
573 + "oled_mode": "وضع OLED",
574 "onion_link": "رابط البصل",
575 "online": "متصل",
576 "onramper_option_description": "شراء بسرعة التشفير مع العديد من طرق الدفع. متوفر في معظم البلدان. ينتشر وتختلف الرسوم.",
@@ -1149,4 +1152,4 @@
1152 "youCanGoBackToYourDapp": "يمكنك العودة إلى DAPP الخاص بك الآن",
1153 "your": "لك",
1154 "yy": "YY"
1152 -}
1155 +}
\ No newline at end of file
res/values/strings_bg.arb
+4 -1
@@ -1,5 +1,6 @@
1 {
2 "about_cake_pay": "Cake Pay Ви позволява лесно да купувате предплатени карти, които веднага могат да се използват с над 150,000 търговци на територията на САЩ.",
3 + "accent_color": "Цвят на акцент",
4 "account": "Профил",
5 "accounts": "Профили",
6 "accounts_subaddresses": "Профили и подадреси",
@@ -55,6 +56,7 @@
56 "and": "и",
57 "anonpay_description": "Генерирайте ${type}. Получателят може да ${method} с всяка поддържана криптовалута и вие ще получите средства в този портфейл.",
58 "apk_update": "APK ъпдейт",
59 + "appearance": "Външен вид",
60 "approve": "Одобряване",
61 "approve_request": "Одобрете искане",
62 "approve_tokens": "Одобрете жетоните",
@@ -568,6 +570,7 @@
570 "offline": "Офлайн",
571 "ok": "Ок",
572 "old_fee": "Стара такса",
573 + "oled_mode": "OLED режим",
574 "onion_link": "Лукова връзка",
575 "online": "Онлайн",
576 "onramper_option_description": "Бързо купувайте криптовалута с много методи за плащане. Предлага се в повечето страни. Разпространенията и таксите варират.",
@@ -1149,4 +1152,4 @@
1152 "youCanGoBackToYourDapp": "Можете да се върнете при вашия Dapp сега",
1153 "your": "Вашия",
1154 "yy": "гг"
1152 -}
1155 +}
\ No newline at end of file
res/values/strings_cs.arb
+4 -1
@@ -1,5 +1,6 @@
1 {
2 "about_cake_pay": "Cake Pay umožňuje jednoduše nakupovat dárkové karty pomocí virtuálních prostředků, které lze okamžitě uplatnit u více než 150 000 obchodníků ve Spojených státech.",
3 + "accent_color": "Accent Color",
4 "account": "Účet",
5 "accounts": "Účty",
6 "accounts_subaddresses": "Účty a subadresy",
@@ -55,6 +56,7 @@
56 "and": "a",
57 "anonpay_description": "Vygenerujte ${type}. Příjemce může ${method} s jakoukoli podporovanou kryptoměnou a vy obdržíte prostředky v této peněžence.",
58 "apk_update": "aktualizace APK",
59 + "appearance": "Vzhled",
60 "approve": "Schvalovat",
61 "approve_request": "Schválit žádost",
62 "approve_tokens": "Schválit tokeny",
@@ -568,6 +570,7 @@
570 "offline": "Offline",
571 "ok": "OK",
572 "old_fee": "Starý poplatek",
573 + "oled_mode": "OLED režim",
574 "onion_link": "Cibulový odkaz",
575 "online": "Online",
576 "onramper_option_description": "Rychle si koupte krypto s mnoha metodami plateb. K dispozici ve většině zemí. Rozpětí a poplatky se liší.",
@@ -1149,4 +1152,4 @@
1152 "youCanGoBackToYourDapp": "Nyní se můžete vrátit do svého dappu",
1153 "your": "Vaše",
1154 "yy": "YY"
1152 -}
1155 +}
\ No newline at end of file
res/values/strings_de.arb
+4 -1
@@ -1,5 +1,6 @@
1 {
2 "about_cake_pay": "Mit Cake Pay können Sie ganz einfach Geschenkkarten mit virtuellen Vermögenswerten kaufen, die Sie sofort bei über 150.000 Händlern in den Vereinigten Staaten ausgeben können.",
3 + "accent_color": "Akzentfarbe",
4 "account": "Konto",
5 "accounts": "Konten",
6 "accounts_subaddresses": "Konten und Unteradressen",
@@ -55,6 +56,7 @@
56 "and": "Und",
57 "anonpay_description": "Generieren Sie ${type}. Der Empfänger kann ${method} mit jeder unterstützten Kryptowährung verwenden, und Sie erhalten Geld in dieser Wallet.",
58 "apk_update": "APK-Update",
59 + "appearance": "Aussehen",
60 "approve": "Genehmigen",
61 "approve_request": "Anfrage genehmigen",
62 "approve_tokens": "Token genehmigen",
@@ -568,6 +570,7 @@
570 "offline": "offline",
571 "ok": "OK",
572 "old_fee": "Alte Gebühr",
573 + "oled_mode": "OLED -Modus",
574 "onion_link": "Onion-Link",
575 "online": "online",
576 "onramper_option_description": "Kaufen Sie schnell Krypto mit vielen Zahlungsmethoden. In den meisten Ländern erhältlich. Spreads und Gebühren variieren.",
@@ -1152,4 +1155,4 @@
1155 "youCanGoBackToYourDapp": "Sie können jetzt zu Ihrem Dapp zurückkehren",
1156 "your": "Dein",
1157 "yy": "YY"
1155 -}
1158 +}
\ No newline at end of file
res/values/strings_en.arb
+4 -1
@@ -1,5 +1,6 @@
1 {
2 "about_cake_pay": "Cake Pay allows you to easily buy gift cards with virtual assets, spendable instantly at over 150,000 merchants in the United States.",
3 + "accent_color": "Accent color",
4 "account": "Account",
5 "accounts": "Accounts",
6 "accounts_subaddresses": "Accounts and subaddresses",
@@ -55,6 +56,7 @@
56 "and": "and",
57 "anonpay_description": "Generate ${type}. The recipient can ${method} with any supported cryptocurrency, and you will receive funds in this wallet.",
58 "apk_update": "APK update",
59 + "appearance": "Appearance",
60 "approve": "Approve",
61 "approve_request": "Approve Request",
62 "approve_tokens": "Approve tokens",
@@ -568,6 +570,7 @@
570 "offline": "Offline",
571 "ok": "OK",
572 "old_fee": "Old fee",
573 + "oled_mode": "OLED mode",
574 "onion_link": "Onion link",
575 "online": "Online",
576 "onramper_option_description": "Quickly buy crypto with many payment methods. Available in most countries. Spreads and fees vary.",
@@ -1150,4 +1153,4 @@
1153 "youCanGoBackToYourDapp": "You can go back to your dApp now",
1154 "your": "Your",
1155 "yy": "YY"
1153 -}
1156 +}
\ No newline at end of file
res/values/strings_es.arb
+4 -1
@@ -1,5 +1,6 @@
1 {
2 "about_cake_pay": "Cake Pay te permite comprar fácilmente tarjetas de regalo con activos virtuales, gastables instantáneamente en más de 150,000 comerciantes en los Estados Unidos.",
3 + "accent_color": "Color acento",
4 "account": "Cuenta",
5 "accounts": "Cuentas",
6 "accounts_subaddresses": "Cuentas y subdirecciones",
@@ -55,6 +56,7 @@
56 "and": "y",
57 "anonpay_description": "Genera ${type}. El destinatario puede ${method} con cualquier criptomoneda admitida, y recibirá fondos en esta billetera.",
58 "apk_update": "Actualización de APK",
59 + "appearance": "Apariencia",
60 "approve": "Aprobar",
61 "approve_request": "Aprobar la solicitud",
62 "approve_tokens": "Aprobar tokens",
@@ -568,6 +570,7 @@
570 "offline": "fuera de línea",
571 "ok": "OK",
572 "old_fee": "Tarifa antigua",
573 + "oled_mode": "Modo OLED",
574 "onion_link": "Enlace de cebolla (Tor)",
575 "online": "En línea",
576 "onramper_option_description": "Compra rápidamente cripto con muchos métodos de pago. Disponible en la mayoría de los países. Los diferenciales y las tarifas varían.",
@@ -1151,4 +1154,4 @@
1154 "youCanGoBackToYourDapp": "Puedes volver a tu dapp ahora",
1155 "your": "Su",
1156 "yy": "YY"
1154 -}
1157 +}
\ No newline at end of file
res/values/strings_fr.arb
+4 -1
@@ -1,5 +1,6 @@
1 {
2 "about_cake_pay": "Cake Pay vous permet d'acheter facilement des cartes-cadeaux avec des actifs virtuels, utilisables instantanément chez plus de 150 000 marchands aux États-Unis.",
3 + "accent_color": "Couleur accent",
4 "account": "Compte",
5 "accounts": "Comptes",
6 "accounts_subaddresses": "Comptes et sous-adresses",
@@ -55,6 +56,7 @@
56 "and": "et",
57 "anonpay_description": "Générez ${type}. Le destinataire peut ${method} avec n'importe quelle crypto-monnaie prise en charge, et vous recevrez des fonds dans ce portefeuille (wallet).",
58 "apk_update": "Mise à jour de l'APK",
59 + "appearance": "Apparence",
60 "approve": "Approuver",
61 "approve_request": "Approuver la demande",
62 "approve_tokens": "Approuver les jetons",
@@ -568,6 +570,7 @@
570 "offline": "Hors ligne",
571 "ok": "OK",
572 "old_fee": "Anciens",
573 + "oled_mode": "Mode OLED",
574 "onion_link": "Lien .onion",
575 "online": "En ligne",
576 "onramper_option_description": "Achetez rapidement des cryptomonnaies avec de nombreuses méthodes de paiement. Disponible dans la plupart des pays. Les spreads et les frais peuvent varier.",
@@ -1149,4 +1152,4 @@
1152 "youCanGoBackToYourDapp": "Vous pouvez retourner à votre Dapp maintenant",
1153 "your": "Ton",
1154 "yy": "AA"
1152 -}
1155 +}
\ No newline at end of file
res/values/strings_ha.arb
+4 -1
@@ -1,5 +1,6 @@
1 {
2 "about_cake_pay": "Biyan Cake yana ba ku damar sauƙin siyan katunan kyauta tare da kadarorin kama-da-wane, wanda za'a iya kashewa nan take a sama da yan kasuwa 150,000 a Amurka.",
3 + "accent_color": "Launi mai launi",
4 "account": "Asusu",
5 "accounts": "Lissafi",
6 "accounts_subaddresses": "Accounts da subaddresses",
@@ -55,6 +56,7 @@
56 "and": "kuma",
57 "anonpay_description": "Ƙirƙirar ${type}. Maƙiyantun mai nasara zai iya ${method} da duk abubuwan da ke samun lambar waya, kuma zaku samu kuɗin dama a wannan kashi.",
58 "apk_update": "apk sabunta",
59 + "appearance": "Bayyanawa",
60 "approve": "Amincewa",
61 "approve_request": "Amince da bukata",
62 "approve_tokens": "Amince da Alamu",
@@ -568,6 +570,7 @@
570 "offline": "Offline",
571 "ok": "OK",
572 "old_fee": "Tsohon kudin",
573 + "oled_mode": "Yanayin Oled",
574 "onion_link": "Lambar onion",
575 "online": "Kan layi",
576 "onramper_option_description": "Da sauri sayi Crypto tare da hanyoyin biyan kuɗi da yawa. Akwai a yawancin ƙasashe. Yaduwa da kudade sun bambanta.",
@@ -1152,4 +1155,4 @@
1155 "youCanGoBackToYourDapp": "Kuna iya komawa zuwa DPP ɗinku yanzu",
1156 "your": "Naku",
1157 "yy": "YY"
1155 -}
1158 +}
\ No newline at end of file
res/values/strings_hi.arb
+4 -1
@@ -1,5 +1,6 @@
1 {
2 "about_cake_pay": "केक पे आपको वर्चुअल संपत्ति के साथ आसानी से उपहार कार्ड खरीदने की अनुमति देता है, जिसे संयुक्त राज्य में 150,000 से अधिक व्यापारियों पर तुरंत खर्च किया जा सकता है।",
3 + "accent_color": "उच्चारण रंग",
4 "account": "लेखा",
5 "accounts": "हिसाब किताब",
6 "accounts_subaddresses": "लेखा और उपदेस",
@@ -55,6 +56,7 @@
56 "and": "और",
57 "anonpay_description": "${type} उत्पन्न करें। प्राप्तकर्ता किसी भी समर्थित क्रिप्टोकरेंसी के साथ ${method} कर सकता है, और आपको इस वॉलेट में धन प्राप्त होगा।",
58 "apk_update": "APK अद्यतन",
59 + "appearance": "उपस्थिति",
60 "approve": "मंज़ूरी देना",
61 "approve_request": "अनुरोध को स्वीकृत करें",
62 "approve_tokens": "टोकन को मंजूरी देना",
@@ -568,6 +570,7 @@
570 "offline": "ऑफ़लाइन",
571 "ok": "ठीक है",
572 "old_fee": "पुराना फीस",
573 + "oled_mode": "OLED मोड",
574 "onion_link": "प्याज का लिंक",
575 "online": "ऑनलाइन",
576 "onramper_option_description": "जल्दी से कई भुगतान विधियों के साथ क्रिप्टो खरीदें। अधिकांश देशों में उपलब्ध है। फैलता है और फीस अलग -अलग होती है।",
@@ -1151,4 +1154,4 @@
1154 "youCanGoBackToYourDapp": "अब आप अपने DAPP पर वापस जा सकते हैं",
1155 "your": "आपका",
1156 "yy": "वाईवाई"
1154 -}
1157 +}
\ No newline at end of file
res/values/strings_hr.arb
+4 -1
@@ -1,5 +1,6 @@
1 {
2 "about_cake_pay": "Cake Pay vam omogućuje jednostavnu kupnju darovnih kartica s virtualnim sredstvima, koja se trenutno mogu potrošiti kod više od 150 000 trgovaca u Sjedinjenim Državama.",
3 + "accent_color": "Naglašena boja",
4 "account": "Račun",
5 "accounts": "Računi",
6 "accounts_subaddresses": "Računi i podadrese",
@@ -55,6 +56,7 @@
56 "and": "i",
57 "anonpay_description": "Generiraj ${type}. Primatelj može ${method} s bilo kojom podržanom kriptovalutom, a vi ćete primiti sredstva u ovaj novčanik.",
58 "apk_update": "APK ažuriranje",
59 + "appearance": "Izgled",
60 "approve": "Odobriti",
61 "approve_request": "Odobriti zahtjev",
62 "approve_tokens": "Odobriti tokene",
@@ -568,6 +570,7 @@
570 "offline": "izvan mreže",
571 "ok": "OK",
572 "old_fee": "Stara naknada",
573 + "oled_mode": "OLED način",
574 "onion_link": "Poveznica luka",
575 "online": "Na mreži",
576 "onramper_option_description": "Brzo kupite kriptovalute s mnogim načinima plaćanja. Dostupno u većini zemalja. Širenja i naknade variraju.",
@@ -1149,4 +1152,4 @@
1152 "youCanGoBackToYourDapp": "Sada se možete vratiti na svoj dapp",
1153 "your": "Vaš",
1154 "yy": "GG"
1152 -}
1155 +}
\ No newline at end of file
res/values/strings_hy.arb
+4 -1
@@ -1,5 +1,6 @@
1 {
2 "about_cake_pay": "Cake Pay-ը Ձեզ թույլ է տալիս հեշտությամբ գնել նվեր քարտեր վիրտուալ ակտիվներով, որոնք անմիջապես ծախսվում են ԱՄՆ-ի 150,000-ից ավելի առևտրականների մոտ:",
3 + "accent_color": "Շեշտադրիչ գույն",
4 "account": "Հաշիվ",
5 "accounts": "Հաշիվներ",
6 "accounts_subaddresses": "Հաշիվներ և ենթահասցեներ",
@@ -55,6 +56,7 @@
56 "and": "և",
57 "anonpay_description": "${type} ստեղծել: Ստացողը կարող է ${method} ցանկացած աջակցվող կրիպտոարժույթով, և դուք կստանաք միջոցներ այս դրամապանակում։",
58 "apk_update": "APK թարմացում",
59 + "appearance": "Արտաքին տեսք",
60 "approve": "Հաստատել",
61 "approve_request": "Հաստատում է հայցը",
62 "approve_tokens": "Հաստատում է նշանները",
@@ -567,6 +569,7 @@
569 "offline": "Անցանց",
570 "ok": "Լավ",
571 "old_fee": "Հին վճար",
572 + "oled_mode": "OLED ռեժիմ",
573 "onion_link": "Onion հղում",
574 "online": "Առցանց",
575 "onramper_option_description": "Արագ գնեք կրիպտոցուլեր շատ վճարման մեթոդներով։ Հասանելի է մեծ մասամբ երկրներում։ Տարածված և վճարները փոփոխվում են",
@@ -1147,4 +1150,4 @@
1150 "youCanGoBackToYourDapp": "Այժմ կարող եք վերադառնալ ձեր DAPP- ին",
1151 "your": "Քո",
1152 "yy": "ՏՏ"
1150 -}
1153 +}
\ No newline at end of file
res/values/strings_id.arb
+4 -1
@@ -1,5 +1,6 @@
1 {
2 "about_cake_pay": "Cake Pay memungkinkan Anda untuk dengan mudah membeli kartu hadiah dengan aset virtual, yang dapat digunakan segera di lebih dari 150.000 pedagang di Amerika Serikat.",
3 + "accent_color": "Warna aksen",
4 "account": "Akun",
5 "accounts": "Akun",
6 "accounts_subaddresses": "Akun dan sub-alamat",
@@ -55,6 +56,7 @@
56 "and": "dan",
57 "anonpay_description": "Hasilkan ${type}. Penerima dapat ${method} dengan cryptocurrency apa pun yang didukung, dan Anda akan menerima dana di dompet ini.",
58 "apk_update": "Pembaruan APK",
59 + "appearance": "Penampilan",
60 "approve": "Menyetujui",
61 "approve_request": "Menyetujui permintaan",
62 "approve_tokens": "Menyetujui token",
@@ -568,6 +570,7 @@
570 "offline": "Offline",
571 "ok": "OK",
572 "old_fee": "Biaya lama",
573 + "oled_mode": "Mode OLED",
574 "onion_link": "Tautan bawang",
575 "online": "Online",
576 "onramper_option_description": "Beli crypto dengan cepat dengan banyak metode pembayaran. Tersedia di sebagian besar negara. Spread dan biaya bervariasi.",
@@ -1152,4 +1155,4 @@
1155 "youCanGoBackToYourDapp": "Anda dapat kembali ke dapp Anda sekarang",
1156 "your": "Milikmu",
1157 "yy": "YY"
1155 -}
1158 +}
\ No newline at end of file
res/values/strings_it.arb
+4 -1
@@ -1,5 +1,6 @@
1 {
2 "about_cake_pay": "Cake Pay ti consente di acquistare facilmente buoni regalo con asset virtuali, spendibili istantaneamente presso oltre 150.000 commercianti negli Stati Uniti.",
3 + "accent_color": "Colore accento",
4 "account": "Conto",
5 "accounts": "Conti",
6 "accounts_subaddresses": "Accounts e sottoindirizzi",
@@ -55,6 +56,7 @@
56 "and": "e",
57 "anonpay_description": "Genera ${type}. Il destinatario può ${method} con qualsiasi criptovaluta supportata, e riceverai fondi in questo portafoglio.",
58 "apk_update": "Aggiornamento APK",
59 + "appearance": "Aspetto",
60 "approve": "Approvare",
61 "approve_request": "Approvare la richiesta",
62 "approve_tokens": "Approvare i token",
@@ -568,6 +570,7 @@
570 "offline": "Offline",
571 "ok": "OK",
572 "old_fee": "Vecchia commissione",
573 + "oled_mode": "Modalità OLED",
574 "onion_link": "Link Onion",
575 "online": "in linea",
576 "onramper_option_description": "Acquista rapidamente la criptovaluta con molti metodi di pagamento. Disponibile nella maggior parte dei paesi. Gli spread e le commissioni variano.",
@@ -1152,4 +1155,4 @@
1155 "youCanGoBackToYourDapp": "Puoi tornare al tuo DApp ora",
1156 "your": "Tuo",
1157 "yy": "YY"
1155 -}
1158 +}
\ No newline at end of file
res/values/strings_ja.arb
+4 -1
@@ -1,5 +1,6 @@
1 {
2 "about_cake_pay": "Cake Payを使用すると、仮想資産を含むギフトカードを簡単に購入でき、米国内の150,000を超える加盟店ですぐに利用できます。",
3 + "accent_color": "アクセント色",
4 "account": "アカウント",
5 "accounts": "アカウント",
6 "accounts_subaddresses": "アカウントとサブアドレス",
@@ -55,6 +56,7 @@
56 "and": "と",
57 "anonpay_description": "${type} を生成します。受取人はサポートされている任意の暗号通貨で ${method} でき、あなたはこのウォレットで資金を受け取ります。",
58 "apk_update": "APKアップデート",
59 + "appearance": "外観",
60 "approve": "承認する",
61 "approve_request": "リクエストを承認します",
62 "approve_tokens": "トークンを承認します",
@@ -569,6 +571,7 @@
571 "offline": "オフライン",
572 "ok": "OK",
573 "old_fee": "古い料金",
574 + "oled_mode": "OLEDモード",
575 "onion_link": "オニオンリンク",
576 "online": "オンライン",
577 "onramper_option_description": "多くの支払い方法で暗号をすばやく購入してください。ほとんどの国で利用可能です。スプレッドと料金は異なります。",
@@ -1150,4 +1153,4 @@
1153 "youCanGoBackToYourDapp": "あなたは今あなたのダップに戻ることができます",
1154 "your": "あなたの",
1155 "yy": "YY"
1153 -}
1156 +}
\ No newline at end of file
res/values/strings_ko.arb
+4 -1
@@ -1,5 +1,6 @@
1 {
2 "about_cake_pay": "Cake Pay를 사용하면 가상 자산으로 기프트 카드를 쉽게 구매하여 미국 내 150,000개 이상의 가맹점에서 즉시 사용할 수 있습니다.",
3 + "accent_color": "악센트 색상",
4 "account": "계정",
5 "accounts": "계정",
6 "accounts_subaddresses": "계정 및 하위 주소",
@@ -55,6 +56,7 @@
56 "and": "및",
57 "anonpay_description": "${type} 생성. 수신자는 지원되는 모든 암호화폐로 ${method}할 수 있으며, 귀하는 이 지갑으로 자금을 받게 됩니다.",
58 "apk_update": "APK 업데이트",
59 + "appearance": "모습",
60 "approve": "승인",
61 "approve_request": "요청 승인",
62 "approve_tokens": "토큰을 승인합니다",
@@ -568,6 +570,7 @@
570 "offline": "오프라인",
571 "ok": "확인",
572 "old_fee": "이전 수수료",
573 + "oled_mode": "OLED 모드",
574 "onion_link": "Onion 링크",
575 "online": "온라인",
576 "onramper_option_description": "다양한 결제 방법으로 빠르게 암호화폐 구매. 대부분의 국가에서 사용 가능. 스프레드 및 수수료는 다양함.",
@@ -1150,4 +1153,4 @@
1153 "youCanGoBackToYourDapp": "이제 dApp으로 돌아갈 수 있습니다",
1154 "your": "당신의",
1155 "yy": "YY"
1153 -}
1156 +}
\ No newline at end of file
res/values/strings_my.arb
+4 -1
@@ -1,5 +1,6 @@
1 {
2 "about_cake_pay": "Cake Pay သည် အမေရိကန်ပြည်ထောင်စုရှိ ကုန်သည် 150,000 ကျော်တွင် လက်ဆောင်ကတ်များကို လက်ဆောင်ကတ်များကို အလွယ်တကူ ဝယ်ယူနိုင်စေပါသည်။",
3 + "accent_color": "အသံထွက်အရောင်",
4 "account": "အကောင့်",
5 "accounts": "အကောင့်များ",
6 "accounts_subaddresses": "အကောင့်များနှင့် လိပ်စာများ",
@@ -55,6 +56,7 @@
56 "and": "နှင့်",
57 "anonpay_description": "${type} ကို ဖန်တီးပါ။ လက်ခံသူက ${method} ကို ပံ့ပိုးပေးထားသည့် cryptocurrency တစ်ခုခုဖြင့် လုပ်ဆောင်နိုင်ပြီး၊ သင်သည် ဤပိုက်ဆံအိတ်တွင် ရံပုံငွေများ ရရှိမည်ဖြစ်သည်။",
58 "apk_update": "APK အပ်ဒိတ်",
59 + "appearance": "ဖြစ်ပေါ်လာခြင်း",
60 "approve": "လက်မခံပါ။",
61 "approve_request": "တောင်းဆိုမှုကိုအတည်ပြု",
62 "approve_tokens": "တိုကင်အတည်ပြု",
@@ -568,6 +570,7 @@
570 "offline": "အော့ဖ်လိုင်း",
571 "ok": "ရလား",
572 "old_fee": "ကြေးဟောင်း",
573 + "oled_mode": "OLED mode ကို",
574 "onion_link": "ကြက်သွန်လင့်",
575 "online": "အွန်လိုင်း",
576 "onramper_option_description": "ငွေပေးချေမှုနည်းလမ်းများစွာဖြင့် Crypto ကိုလျင်မြန်စွာ 0 ယ်ပါ။ နိုင်ငံအများစုတွင်ရရှိနိုင်ပါသည်။ ဖြန့်ဖြူးနှင့်အခကြေးငွေကွဲပြားခြားနားသည်။",
@@ -1149,4 +1152,4 @@
1152 "youCanGoBackToYourDapp": "သငျသညျယခုသင်၏ dapp ကိုပြန်သွားနိုင်ပါတယ်",
1153 "your": "ခင်ဗျားတို့၏",
1154 "yy": "YY"
1152 -}
1155 +}
\ No newline at end of file
res/values/strings_nl.arb
+4 -1
@@ -1,5 +1,6 @@
1 {
2 "about_cake_pay": "Met Cake Pay kunt u eenvoudig cadeaubonnen kopen met virtuele activa, die direct kunnen worden uitgegeven bij meer dan 150.000 handelaren in de Verenigde Staten.",
3 + "accent_color": "Accentkleur",
4 "account": "Account",
5 "accounts": "Accounts",
6 "accounts_subaddresses": "Accounts en subadressen",
@@ -55,6 +56,7 @@
56 "and": "en",
57 "anonpay_description": "Genereer ${type}. De ontvanger kan ${method} gebruiken met elke ondersteunde cryptocurrency en u ontvangt geld in deze portemonnee",
58 "apk_update": "APK-update",
59 + "appearance": "Verschijning",
60 "approve": "Goedkeuren",
61 "approve_request": "Het verzoek goedkeuren",
62 "approve_tokens": "Tokens goedkeuren",
@@ -568,6 +570,7 @@
570 "offline": "Offline",
571 "ok": "OK",
572 "old_fee": "Oude vergoeding",
573 + "oled_mode": "OLED -modus",
574 "onion_link": "Ui koppeling",
575 "online": "online",
576 "onramper_option_description": "Koop snel crypto met veel betaalmethoden. Beschikbaar in de meeste landen. Spreads en vergoedingen variëren.",
@@ -1150,4 +1153,4 @@
1153 "youCanGoBackToYourDapp": "U kunt nu terug naar uw DApp gaan",
1154 "your": "Jouw",
1155 "yy": "JJ"
1153 -}
1156 +}
\ No newline at end of file
res/values/strings_pl.arb
+4 -1
@@ -1,5 +1,6 @@
1 {
2 "about_cake_pay": "Cake Pay umożliwia łatwe kupowanie kart podarunkowych z wirtualnymi saldami, które można natychmiast wydać u ponad 150 000 sprzedawców.",
3 + "accent_color": "Kolor akcentu",
4 "account": "Konto",
5 "accounts": "Konta",
6 "accounts_subaddresses": "Konta i podadresy",
@@ -55,6 +56,7 @@
56 "and": "i",
57 "anonpay_description": "Wygeneruj ${type}. Odbiorca może ${method} z dowolną obsługiwaną kryptowalutą, a Ty otrzymasz środki w tym portfelu.",
58 "apk_update": "Aktualizacja APK",
59 + "appearance": "Wygląd",
60 "approve": "Zatwierdzić",
61 "approve_request": "Zatwierdzić żądanie",
62 "approve_tokens": "Zatwierdzić tokeny",
@@ -568,6 +570,7 @@
570 "offline": "Offline",
571 "ok": "Ok",
572 "old_fee": "Stara opłata",
573 + "oled_mode": "Tryb OLED",
574 "onion_link": "Link .onion",
575 "online": "online",
576 "onramper_option_description": "Szybko kup kryptowaluty z wieloma metodami płatności. Dostępne w większości krajów. Ceny i opłaty różnią się.",
@@ -1149,4 +1152,4 @@
1152 "youCanGoBackToYourDapp": "Możesz teraz wrócić do swojego dapp",
1153 "your": "Twój",
1154 "yy": "RR"
1152 -}
1155 +}
\ No newline at end of file
res/values/strings_pt.arb
+4 -1
@@ -1,5 +1,6 @@
1 {
2 "about_cake_pay": "O Cake Pay permite que você compre facilmente cartões-presente com ativos virtuais, que podem ser gastos instantaneamente em mais de 150.000 comerciantes nos Estados Unidos.",
3 + "accent_color": "Cor de destaque",
4 "account": "Conta",
5 "accounts": "Contas",
6 "accounts_subaddresses": "Contas e sub-endereços",
@@ -55,6 +56,7 @@
56 "and": "e",
57 "anonpay_description": "Gere ${type}. O destinatário pode ${method} com qualquer criptomoeda suportada e você receberá fundos nesta carteira.",
58 "apk_update": "Atualização de APK",
59 + "appearance": "Aparência",
60 "approve": "Aprovar",
61 "approve_request": "Aprovar solicitação",
62 "approve_tokens": "Aprovar tokens",
@@ -569,6 +571,7 @@
571 "offline": "offline",
572 "ok": "Ok",
573 "old_fee": "Taxa antiga",
574 + "oled_mode": "Modo OLED",
575 "onion_link": "ligação de cebola",
576 "online": "Online",
577 "onramper_option_description": "Compre rapidamente criptografia com muitos métodos de pagamento. Disponível na maioria dos países. Os spreads e taxas variam.",
@@ -1152,4 +1155,4 @@
1155 "youCanGoBackToYourDapp": "Você pode voltar para o seu dapp agora",
1156 "your": "Seu",
1157 "yy": "aa"
1155 -}
1158 +}
\ No newline at end of file
res/values/strings_ru.arb
+4 -1
@@ -1,5 +1,6 @@
1 {
2 "about_cake_pay": "Cake Pay позволяет вам легко покупать подарочные карты с виртуальными активами, которые можно мгновенно потратить в более чем 150 000 продавцов в Соединенных Штатах.",
3 + "accent_color": "Акцентный цвет",
4 "account": "Аккаунт",
5 "accounts": "Аккаунты",
6 "accounts_subaddresses": "Аккаунты и субадреса",
@@ -55,6 +56,7 @@
56 "and": "и",
57 "anonpay_description": "Создайте ${type}. Получатель может использовать ${method} с любой поддерживаемой криптовалютой, и вы получите средства на этот кошелек.",
58 "apk_update": "Обновление APK",
59 + "appearance": "Появление",
60 "approve": "Утвердить",
61 "approve_request": "Утвердить запрос",
62 "approve_tokens": "Одобрить токены",
@@ -568,6 +570,7 @@
570 "offline": "Не в сети",
571 "ok": "OK",
572 "old_fee": "Старая плата",
573 + "oled_mode": "OLED -режим",
574 "onion_link": "Луковая ссылка",
575 "online": "Онлайн",
576 "onramper_option_description": "Быстро купите крипто со многими способами оплаты. Доступно в большинстве стран. Спреды и сборы различаются.",
@@ -1150,4 +1153,4 @@
1153 "youCanGoBackToYourDapp": "Вы можете вернуться к своему даппу сейчас",
1154 "your": "Твой",
1155 "yy": "ГГ"
1153 -}
1156 +}
\ No newline at end of file
res/values/strings_th.arb
+4 -1
@@ -1,5 +1,6 @@
1 {
2 "about_cake_pay": "Cake Pay ช่วยให้คุณสามารถซื้อบัตรของขวัญง่ายๆ ด้วยการใช้สินทรัพย์อนุกรม ซื้อใช้ได้ทันทีกับมากกว่า 150,000 ร้านค้าในสหรัฐอเมริกา",
3 + "accent_color": "สีเน้น",
4 "account": "บัญชี",
5 "accounts": "บัญชี",
6 "accounts_subaddresses": "บัญชีและที่อยู่ย่อย",
@@ -55,6 +56,7 @@
56 "and": "และ",
57 "anonpay_description": "สร้าง ${type} ผู้รับสามารถ ${method} ด้วยสกุลเงินดิจิทัลที่รองรับ และคุณจะได้รับเงินในกระเป๋าสตางค์นี้",
58 "apk_update": "ปรับปรุง APK",
59 + "appearance": "รูปร่าง",
60 "approve": "อนุมัติ",
61 "approve_request": "อนุมัติคำขอ",
62 "approve_tokens": "อนุมัติโทเค็น",
@@ -568,6 +570,7 @@
570 "offline": "ออฟไลน์",
571 "ok": "ตกลง",
572 "old_fee": "ค่าธรรมเนียมเก่า",
573 + "oled_mode": "โหมด OLED",
574 "onion_link": "ลิงค์หัวหอม",
575 "online": "ออนไลน์",
576 "onramper_option_description": "ซื้อ crypto อย่างรวดเร็วด้วยวิธีการชำระเงินจำนวนมาก มีให้บริการในประเทศส่วนใหญ่ สเปรดและค่าธรรมเนียมแตกต่างกันไป",
@@ -1149,4 +1152,4 @@
1152 "youCanGoBackToYourDapp": "คุณสามารถกลับไปที่ dapp ของคุณได้ทันที",
1153 "your": "ของคุณ",
1154 "yy": "ปี"
1152 -}
1155 +}
\ No newline at end of file
res/values/strings_tl.arb
+4 -1
@@ -1,5 +1,6 @@
1 {
2 "about_cake_pay": "Binibigyan-daan ka ng Cake Pay na madaling makabili ng mga gift card na may mga virtual na asset na magagastos kaagad sa mahigit na 150,000 merchant sa United States.",
3 + "accent_color": "Kulay ng accent",
4 "account": "Account",
5 "accounts": "Mga Account",
6 "accounts_subaddresses": "Mga account at mga subaddress",
@@ -55,6 +56,7 @@
56 "and": "at",
57 "anonpay_description": "Bumuo ng ${type}. Ang tatanggap ay maaaring ${method} na may anumang suportadong cryptocurrency, at makakatanggap ka ng mga pondo sa wallet na ito.",
58 "apk_update": "APK update",
59 + "appearance": "Hitsura",
60 "approve": "Aprubahan",
61 "approve_request": "Aprubahan ang kahilingan",
62 "approve_tokens": "Aprubahan ang mga token",
@@ -568,6 +570,7 @@
570 "offline": "Offline",
571 "ok": "OK",
572 "old_fee": "Dating fee",
573 + "oled_mode": "OLED mode",
574 "onion_link": "Onion link",
575 "online": "Online",
576 "onramper_option_description": "Mabilis na bumili ng crypto na may maraming paraan ng pagbabayad. Available sa karamihan ng mga bansa. Iba-iba ang mga spread at fee.",
@@ -1149,4 +1152,4 @@
1152 "youCanGoBackToYourDapp": "Maaari kang bumalik sa iyong dapp ngayon",
1153 "your": "IYONG",
1154 "yy": "YY"
1152 -}
1155 +}
\ No newline at end of file
res/values/strings_tr.arb
+4 -1
@@ -1,5 +1,6 @@
1 {
2 "about_cake_pay": "Cake Pay, Amerika Birleşik Devletleri'ndeki 150.000'den fazla işyerinde anında harcanabilen sanal varlıklarla kolayca hediye kartları satın almanızı sağlar.",
3 + "accent_color": "Aksan rengi",
4 "account": "Hesap",
5 "accounts": "Hesaplar",
6 "accounts_subaddresses": "Hesaplar ve alt adresler",
@@ -55,6 +56,7 @@
56 "and": "ve",
57 "anonpay_description": "${type} oluşturun. Alıcı, desteklenen herhangi bir kripto para birimi ile ${method} yapabilir ve bu cüzdanda para alırsınız.",
58 "apk_update": "APK güncellemesi",
59 + "appearance": "Dış görünüş",
60 "approve": "Onaylamak",
61 "approve_request": "Talebi Onaylama",
62 "approve_tokens": "Jetonları onaylayın",
@@ -568,6 +570,7 @@
570 "offline": "Çevrimdışı",
571 "ok": "Tamam",
572 "old_fee": "Eski ücret",
573 + "oled_mode": "OLED modu",
574 "onion_link": "soğan bağlantısı",
575 "online": "Çevrimiçi",
576 "onramper_option_description": "Birçok ödeme yöntemi ile hızlı bir şekilde kripto satın alın. Çoğu ülkede mevcuttur. Forma ve ücretler değişir.",
@@ -1149,4 +1152,4 @@
1152 "youCanGoBackToYourDapp": "Şimdi Dapp'ınıza geri dönebilirsin",
1153 "your": "Senin",
1154 "yy": "YY"
1152 -}
1155 +}
\ No newline at end of file
res/values/strings_uk.arb
+4 -1
@@ -1,5 +1,6 @@
1 {
2 "about_cake_pay": "Cake Pay дозволяє вам легко купувати подарункові картки з віртуальними активами, які можна миттєво витратити в понад 150 000 продавців у Сполучених Штатах.",
3 + "accent_color": "Акцентний колір",
4 "account": "Акаунт",
5 "accounts": "Акаунти",
6 "accounts_subaddresses": "Акаунти та субадреси",
@@ -55,6 +56,7 @@
56 "and": "і",
57 "anonpay_description": "Згенерувати ${type}. Одержувач може ${method} будь-якою підтримуваною криптовалютою, і ви отримаєте кошти на цей гаманець.",
58 "apk_update": "Оновлення APK",
59 + "appearance": "Зовнішність",
60 "approve": "Затвердити",
61 "approve_request": "Запитайте запит",
62 "approve_tokens": "Затвердити токени",
@@ -568,6 +570,7 @@
570 "offline": "Офлайн",
571 "ok": "OK",
572 "old_fee": "Стара комісія",
573 + "oled_mode": "ОЛЕД -режим",
574 "onion_link": "Посилання на цибулю",
575 "online": "Онлайн",
576 "onramper_option_description": "Швидко купуйте криптовалюту з багатьма методами оплати. Доступний у більшості країн. Поширення та збори різняться.",
@@ -1150,4 +1153,4 @@
1153 "youCanGoBackToYourDapp": "Ви можете повернутися до свого DAPP зараз",
1154 "your": "Ваш",
1155 "yy": "YY"
1153 -}
1156 +}
\ No newline at end of file
res/values/strings_ur.arb
+4 -1
@@ -1,5 +1,6 @@
1 {
2 "about_cake_pay": "Cake پے آپ کو ورچوئل اثاثوں کے ساتھ گفٹ کارڈز آسانی سے خریدنے کی اجازت دیتا ہے، جو ریاستہائے متحدہ میں 150,000 سے زیادہ تاجروں پر فوری طور پر خرچ کیے جا سکتے ہیں۔",
3 + "accent_color": "لہجہ رنگ",
4 "account": "کھاتہ",
5 "accounts": "اکاؤنٹس",
6 "accounts_subaddresses": "اکاؤنٹس اور ذیلی پتے",
@@ -55,6 +56,7 @@
56 "and": "اور",
57 "anonpay_description": "${type} بنائیں۔ وصول کنندہ کسی بھی تعاون یافتہ کرپٹو کرنسی کے ساتھ ${method} کرسکتا ہے، اور آپ کو اس بٹوے میں فنڈز موصول ہوں گے۔",
58 "apk_update": "APK اپ ڈیٹ",
59 + "appearance": "ظاہری شکل",
60 "approve": "ﻭﺮﮐ ﺭﻮﻈﻨﻣ",
61 "approve_request": "درخواست کو منظور کریں",
62 "approve_tokens": "ٹوکن کو منظور کریں",
@@ -568,6 +570,7 @@
570 "offline": "آف لائن",
571 "ok": "ٹھیک ہے",
572 "old_fee": "پرانی فیس",
573 + "oled_mode": "OLED موڈ",
574 "onion_link": "پیاز کا لنک",
575 "online": "آن لائن",
576 "onramper_option_description": "ادائیگی کے بہت سے طریقوں سے جلدی سے کرپٹو خریدیں۔ زیادہ تر ممالک میں دستیاب ہے۔ پھیلاؤ اور فیس مختلف ہوتی ہے۔",
@@ -1151,4 +1154,4 @@
1154 "youCanGoBackToYourDapp": "اب آپ اپنے ڈی اے پی پی پر واپس جاسکتے ہیں",
1155 "your": "آپ کا",
1156 "yy": "YY"
1154 -}
1157 +}
\ No newline at end of file
res/values/strings_vi.arb
+4 -1
@@ -1,5 +1,6 @@
1 {
2 "about_cake_pay": "Cake Pay cho phép bạn dễ dàng mua thẻ quà tặng bằng tài sản ảo, có thể sử dụng ngay lập tức tại hơn 150.000 cửa hàng tại Hoa Kỳ.",
3 + "accent_color": "Màu nhấn",
4 "account": "Tài khoản",
5 "accounts": "Tài khoản",
6 "accounts_subaddresses": "Tài khoản và địa chỉ phụ",
@@ -55,6 +56,7 @@
56 "and": "và",
57 "anonpay_description": "Tạo ${type}. Người nhận có thể ${method} với bất kỳ loại tiền điện tử nào được hỗ trợ, và bạn sẽ nhận được tiền trong ví này.",
58 "apk_update": "Cập nhật APK",
59 + "appearance": "Vẻ bề ngoài",
60 "approve": "Phê duyệt",
61 "approve_request": "Phê duyệt yêu cầu",
62 "approve_tokens": "Phê duyệt mã thông báo",
@@ -566,6 +568,7 @@
568 "offline": "Ngoại tuyến",
569 "ok": "OK",
570 "old_fee": "Phí cũ",
571 + "oled_mode": "Chế độ OLED",
572 "onion_link": "Liên kết Onion",
573 "online": "Trực tuyến",
574 "onramper_option_description": "Mua tiền điện tử nhanh chóng với nhiều phương thức thanh toán. Có sẵn ở hầu hết các quốc gia. Chênh lệch và phí thay đổi.",
@@ -1146,4 +1149,4 @@
1149 "youCanGoBackToYourDapp": "Bạn có thể quay lại DAPP của mình ngay bây giờ",
1150 "your": "Của bạn",
1151 "yy": "YY"
1149 -}
1152 +}
\ No newline at end of file
res/values/strings_yo.arb
+4 -1
@@ -1,5 +1,6 @@
1 {
2 "about_cake_pay": "Cake Pay jẹ́ kí ẹ lè fi owó wẹ́ẹ̀bù ra àwọn káàdì ìrajà t'á lò nínú iye ìtajà kan. Ẹ lè san wọn láìpẹ́ nítajà 150,000 nínú Amẹ́ríkà.",
3 + "accent_color": "Awọ ara",
4 "account": "Àkáǹtì",
5 "accounts": "Àwọn àkáǹtì",
6 "accounts_subaddresses": "Àwọn àkáǹtì àti àwọn àdírẹ́sì kékeré",
@@ -55,6 +56,7 @@
56 "and": "àti",
57 "anonpay_description": "Ṣe akọkọ ${type}. Awọn alabara le ${method} pẹlu eyikeyi iwo ise ati owo yoo wọle si iwe iwe yii.",
58 "apk_update": "Àtúnse áàpù títun wà",
59 + "appearance": "Ifarahan",
60 "approve": "Fi ọwọ si",
61 "approve_request": "IKILỌ RẸ",
62 "approve_tokens": "Ṣe fọwọsi awọn àmi",
@@ -569,6 +571,7 @@
571 "offline": "kò wà lórí ayélujára",
572 "ok": "Ó dáa",
573 "old_fee": "Oya atijọ",
574 + "oled_mode": "Ipo OED",
575 "onion_link": "Kọja ilọ alubosa",
576 "online": "Lórí ayélujára",
577 "onramper_option_description": "Ni kiakia Ra Crypto pẹlu ọpọlọpọ awọn ọna isanwo. Wa ni ọpọlọpọ awọn orilẹ-ede. Itankale ati awọn idiyele yatọ.",
@@ -1150,4 +1153,4 @@
1153 "youCanGoBackToYourDapp": "O le pada si tapla rẹ bayi",
1154 "your": "Rẹ",
1155 "yy": "Ọd"
1153 -}
1156 +}
\ No newline at end of file
res/values/strings_zh.arb
+4 -1
@@ -1,5 +1,6 @@
1 {
2 "about_cake_pay": "Cake Pay 让您可以轻松购买带有虚拟资产的礼品卡,可立即在美国超过 150,000 家商家消费。",
3 + "accent_color": "口音颜色",
4 "account": "帐户",
5 "accounts": "账户",
6 "accounts_subaddresses": "账户和子地址",
@@ -55,6 +56,7 @@
56 "and": "和",
57 "anonpay_description": "生成 ${type}。收款人可以使用任何受支持的加密货币 ${method},您将在此钱包中收到资金。",
58 "apk_update": "APK更新",
59 + "appearance": "外貌",
60 "approve": "批准",
61 "approve_request": "批准请求",
62 "approve_tokens": "批准令牌",
@@ -568,6 +570,7 @@
570 "offline": "离线",
571 "ok": "确认",
572 "old_fee": "旧费用",
573 + "oled_mode": "OLED模式",
574 "onion_link": "洋葱链接",
575 "online": "在线",
576 "onramper_option_description": "快速使用许多付款方式购买加密货币。在大多数国家 /地区可用。利差和费用各不相同。",
@@ -1149,4 +1152,4 @@
1152 "youCanGoBackToYourDapp": "您现在可以回到DAPP",
1153 "your": "你的",
1154 "yy": "YY"
1152 -}
1155 +}
\ No newline at end of file