What changed, and why it matters
This is a large user-interface refresh for the Cake Wallet app. It adds a new black/OLED theme, lets users pick accent colors, swaps many old PNG icons for new ones, and refactors how widgets access theme colors. There is no indication this change fixes a security bug or introduces a security vulnerability.
No security action required. Treat as a normal UI feature release; verify visually that theme previews and accent colors render correctly.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The commit is a UI-only feature branch merged as ‘UI updates (#2368)’. It introduces custom theme color support (CustomThemeColors, ThemeX extension), a BlackTheme with OLED mode, new SVG theme previews, updated crypto icons under assets/images/crypto/, and removes the old currentTheme parameter plumbing in favor of context-based theme access. The diff shows purely cosmetic and refactoring changes across Dart UI files and assets. No cryptographic, networking, storage, or permission-related code changes are present.
Changed components
lib/themes/*lib/src/screens/*lib/src/widgets/*assets/images/*cw_core/lib/crypto_currency.dartInspect captured patch +2145 / −1332
diff --git a/assets/images/2.0x/Twitter.png b/assets/images/2.0x/Twitter.png
deleted file mode 100644
index 642e8eb..0000000
Binary files a/assets/images/2.0x/Twitter.png and /dev/null differ
diff --git a/assets/images/2.0x/back_arrow.png b/assets/images/2.0x/back_arrow.png
deleted file mode 100644
index 065eecf..0000000
Binary files a/assets/images/2.0x/back_arrow.png and /dev/null differ
diff --git a/assets/images/2.0x/back_arrow_dark_theme.png b/assets/images/2.0x/back_arrow_dark_theme.png
deleted file mode 100644
index f1e790f..0000000
Binary files a/assets/images/2.0x/back_arrow_dark_theme.png and /dev/null differ
diff --git a/assets/images/2.0x/back_vector.png b/assets/images/2.0x/back_vector.png
deleted file mode 100644
index 8d9239a..0000000
Binary files a/assets/images/2.0x/back_vector.png and /dev/null differ
diff --git a/assets/images/2.0x/backup.png b/assets/images/2.0x/backup.png
deleted file mode 100644
index 5cf40bb..0000000
Binary files a/assets/images/2.0x/backup.png and /dev/null differ
diff --git a/assets/images/2.0x/bitcoin.png b/assets/images/2.0x/bitcoin.png
deleted file mode 100644
index 169c734..0000000
Binary files a/assets/images/2.0x/bitcoin.png and /dev/null differ
diff --git a/assets/images/2.0x/bitcoin_menu.png b/assets/images/2.0x/bitcoin_menu.png
deleted file mode 100644
index 7afe772..0000000
Binary files a/assets/images/2.0x/bitcoin_menu.png and /dev/null differ
diff --git a/assets/images/2.0x/bitmap.png b/assets/images/2.0x/bitmap.png
deleted file mode 100644
index b080918..0000000
Binary files a/assets/images/2.0x/bitmap.png and /dev/null differ
diff --git a/assets/images/2.0x/cake_arrow.png b/assets/images/2.0x/cake_arrow.png
deleted file mode 100644
index cb72693..0000000
Binary files a/assets/images/2.0x/cake_arrow.png and /dev/null differ
diff --git a/assets/images/2.0x/cake_logo.png b/assets/images/2.0x/cake_logo.png
deleted file mode 100644
index 2778168..0000000
Binary files a/assets/images/2.0x/cake_logo.png and /dev/null differ
diff --git a/assets/images/2.0x/china.png b/assets/images/2.0x/china.png
deleted file mode 100644
index d199532..0000000
Binary files a/assets/images/2.0x/china.png and /dev/null differ
diff --git a/assets/images/2.0x/coins.png b/assets/images/2.0x/coins.png
deleted file mode 100644
index c96e6e4..0000000
Binary files a/assets/images/2.0x/coins.png and /dev/null differ
diff --git a/assets/images/2.0x/crypto_lock.png b/assets/images/2.0x/crypto_lock.png
deleted file mode 100644
index c93941b..0000000
Binary files a/assets/images/2.0x/crypto_lock.png and /dev/null differ
diff --git a/assets/images/2.0x/crypto_lock_light.png b/assets/images/2.0x/crypto_lock_light.png
deleted file mode 100644
index 2937b20..0000000
Binary files a/assets/images/2.0x/crypto_lock_light.png and /dev/null differ
diff --git a/assets/images/2.0x/decred.png b/assets/images/2.0x/decred.png
deleted file mode 100644
index 2f4919c..0000000
Binary files a/assets/images/2.0x/decred.png and /dev/null differ
diff --git a/assets/images/2.0x/germany.png b/assets/images/2.0x/germany.png
deleted file mode 100644
index e2d0b90..0000000
Binary files a/assets/images/2.0x/germany.png and /dev/null differ
diff --git a/assets/images/2.0x/holland.png b/assets/images/2.0x/holland.png
deleted file mode 100644
index 5934a23..0000000
Binary files a/assets/images/2.0x/holland.png and /dev/null differ
diff --git a/assets/images/2.0x/india.png b/assets/images/2.0x/india.png
deleted file mode 100644
index af1e056..0000000
Binary files a/assets/images/2.0x/india.png and /dev/null differ
diff --git a/assets/images/2.0x/japan.png b/assets/images/2.0x/japan.png
deleted file mode 100644
index ba2fac6..0000000
Binary files a/assets/images/2.0x/japan.png and /dev/null differ
diff --git a/assets/images/2.0x/keysIco.png b/assets/images/2.0x/keysIco.png
deleted file mode 100644
index 00c2879..0000000
Binary files a/assets/images/2.0x/keysIco.png and /dev/null differ
diff --git a/assets/images/2.0x/litecoin.png b/assets/images/2.0x/litecoin.png
deleted file mode 100644
index ea6d0e6..0000000
Binary files a/assets/images/2.0x/litecoin.png and /dev/null differ
diff --git a/assets/images/2.0x/menu_button.png b/assets/images/2.0x/menu_button.png
deleted file mode 100644
index a0f391b..0000000
Binary files a/assets/images/2.0x/menu_button.png and /dev/null differ
diff --git a/assets/images/2.0x/monero.png b/assets/images/2.0x/monero.png
deleted file mode 100644
index 01b0d0a..0000000
Binary files a/assets/images/2.0x/monero.png and /dev/null differ
diff --git a/assets/images/2.0x/monero_menu.png b/assets/images/2.0x/monero_menu.png
deleted file mode 100644
index b92733a..0000000
Binary files a/assets/images/2.0x/monero_menu.png and /dev/null differ
diff --git a/assets/images/2.0x/poland.png b/assets/images/2.0x/poland.png
deleted file mode 100644
index 30e2d4c..0000000
Binary files a/assets/images/2.0x/poland.png and /dev/null differ
diff --git a/assets/images/2.0x/portugal.png b/assets/images/2.0x/portugal.png
deleted file mode 100644
index 08928da..0000000
Binary files a/assets/images/2.0x/portugal.png and /dev/null differ
diff --git a/assets/images/2.0x/pre_seed_dark.png b/assets/images/2.0x/pre_seed_dark.png
deleted file mode 100755
index 2bb3b8e..0000000
Binary files a/assets/images/2.0x/pre_seed_dark.png and /dev/null differ
diff --git a/assets/images/2.0x/pre_seed_light.png b/assets/images/2.0x/pre_seed_light.png
deleted file mode 100755
index b198eff..0000000
Binary files a/assets/images/2.0x/pre_seed_light.png and /dev/null differ
diff --git a/assets/images/2.0x/restoreSeed.png b/assets/images/2.0x/restoreSeed.png
deleted file mode 100644
index c25928f..0000000
Binary files a/assets/images/2.0x/restoreSeed.png and /dev/null differ
diff --git a/assets/images/2.0x/restore_keys.png b/assets/images/2.0x/restore_keys.png
deleted file mode 100644
index 6a90ef2..0000000
Binary files a/assets/images/2.0x/restore_keys.png and /dev/null differ
diff --git a/assets/images/2.0x/restore_seed.png b/assets/images/2.0x/restore_seed.png
deleted file mode 100644
index 2bbea22..0000000
Binary files a/assets/images/2.0x/restore_seed.png and /dev/null differ
diff --git a/assets/images/2.0x/restore_wallet_image.png b/assets/images/2.0x/restore_wallet_image.png
deleted file mode 100644
index 3e3aecb..0000000
Binary files a/assets/images/2.0x/restore_wallet_image.png and /dev/null differ
diff --git a/assets/images/2.0x/russia.png b/assets/images/2.0x/russia.png
deleted file mode 100644
index c72a0df..0000000
Binary files a/assets/images/2.0x/russia.png and /dev/null differ
diff --git a/assets/images/2.0x/seedIco.png b/assets/images/2.0x/seedIco.png
deleted file mode 100644
index 650f2fe..0000000
Binary files a/assets/images/2.0x/seedIco.png and /dev/null differ
diff --git a/assets/images/2.0x/seedKeys.png b/assets/images/2.0x/seedKeys.png
deleted file mode 100644
index 10bee8b..0000000
Binary files a/assets/images/2.0x/seedKeys.png and /dev/null differ
diff --git a/assets/images/2.0x/seed_image.png b/assets/images/2.0x/seed_image.png
deleted file mode 100644
index 795b0ab..0000000
Binary files a/assets/images/2.0x/seed_image.png and /dev/null differ
diff --git a/assets/images/2.0x/south_korea.png b/assets/images/2.0x/south_korea.png
deleted file mode 100644
index 93aca42..0000000
Binary files a/assets/images/2.0x/south_korea.png and /dev/null differ
diff --git a/assets/images/2.0x/spain.png b/assets/images/2.0x/spain.png
deleted file mode 100644
index e145850..0000000
Binary files a/assets/images/2.0x/spain.png and /dev/null differ
diff --git a/assets/images/2.0x/usa.png b/assets/images/2.0x/usa.png
deleted file mode 100644
index 5517c9e..0000000
Binary files a/assets/images/2.0x/usa.png and /dev/null differ
diff --git a/assets/images/2.0x/wallet_name.png b/assets/images/2.0x/wallet_name.png
deleted file mode 100644
index f5593af..0000000
Binary files a/assets/images/2.0x/wallet_name.png and /dev/null differ
diff --git a/assets/images/2.0x/wallet_name_light.png b/assets/images/2.0x/wallet_name_light.png
deleted file mode 100644
index b59e4c4..0000000
Binary files a/assets/images/2.0x/wallet_name_light.png and /dev/null differ
diff --git a/assets/images/2.0x/wallet_type.png b/assets/images/2.0x/wallet_type.png
deleted file mode 100644
index a3bbfdf..0000000
Binary files a/assets/images/2.0x/wallet_type.png and /dev/null differ
diff --git a/assets/images/2.0x/wallet_type_light.png b/assets/images/2.0x/wallet_type_light.png
deleted file mode 100644
index 791c3a8..0000000
Binary files a/assets/images/2.0x/wallet_type_light.png and /dev/null differ
diff --git a/assets/images/2.0x/welcome.png b/assets/images/2.0x/welcome.png
deleted file mode 100644
index 8ff0241..0000000
Binary files a/assets/images/2.0x/welcome.png and /dev/null differ
diff --git a/assets/images/2.0x/welcomeImg.png b/assets/images/2.0x/welcomeImg.png
deleted file mode 100644
index d4c76fc..0000000
Binary files a/assets/images/2.0x/welcomeImg.png and /dev/null differ
diff --git a/assets/images/2.0x/welcome_light.png b/assets/images/2.0x/welcome_light.png
deleted file mode 100644
index 8386d25..0000000
Binary files a/assets/images/2.0x/welcome_light.png and /dev/null differ
diff --git a/assets/images/3.0x/Twitter.png b/assets/images/3.0x/Twitter.png
deleted file mode 100644
index 6a6b5f3..0000000
Binary files a/assets/images/3.0x/Twitter.png and /dev/null differ
diff --git a/assets/images/3.0x/back_arrow.png b/assets/images/3.0x/back_arrow.png
deleted file mode 100644
index b5b7fde..0000000
Binary files a/assets/images/3.0x/back_arrow.png and /dev/null differ
diff --git a/assets/images/3.0x/back_arrow_dark_theme.png b/assets/images/3.0x/back_arrow_dark_theme.png
deleted file mode 100644
index 724ed23..0000000
Binary files a/assets/images/3.0x/back_arrow_dark_theme.png and /dev/null differ
diff --git a/assets/images/3.0x/back_vector.png b/assets/images/3.0x/back_vector.png
deleted file mode 100644
index d01030e..0000000
Binary files a/assets/images/3.0x/back_vector.png and /dev/null differ
diff --git a/assets/images/3.0x/backup.png b/assets/images/3.0x/backup.png
deleted file mode 100644
index 5971200..0000000
Binary files a/assets/images/3.0x/backup.png and /dev/null differ
diff --git a/assets/images/3.0x/bitcoin.png b/assets/images/3.0x/bitcoin.png
deleted file mode 100644
index 9fd49e6..0000000
Binary files a/assets/images/3.0x/bitcoin.png and /dev/null differ
diff --git a/assets/images/3.0x/bitcoin_menu.png b/assets/images/3.0x/bitcoin_menu.png
deleted file mode 100644
index a278fa2..0000000
Binary files a/assets/images/3.0x/bitcoin_menu.png and /dev/null differ
diff --git a/assets/images/3.0x/bitmap.png b/assets/images/3.0x/bitmap.png
deleted file mode 100644
index 337bcf0..0000000
Binary files a/assets/images/3.0x/bitmap.png and /dev/null differ
diff --git a/assets/images/3.0x/cake_arrow.png b/assets/images/3.0x/cake_arrow.png
deleted file mode 100644
index b92ec35..0000000
Binary files a/assets/images/3.0x/cake_arrow.png and /dev/null differ
diff --git a/assets/images/3.0x/cake_logo.png b/assets/images/3.0x/cake_logo.png
deleted file mode 100644
index 87dd05c..0000000
Binary files a/assets/images/3.0x/cake_logo.png and /dev/null differ
diff --git a/assets/images/3.0x/china.png b/assets/images/3.0x/china.png
deleted file mode 100644
index fd0a753..0000000
Binary files a/assets/images/3.0x/china.png and /dev/null differ
diff --git a/assets/images/3.0x/coins.png b/assets/images/3.0x/coins.png
deleted file mode 100644
index 86ea55a..0000000
Binary files a/assets/images/3.0x/coins.png and /dev/null differ
diff --git a/assets/images/3.0x/crypto_lock.png b/assets/images/3.0x/crypto_lock.png
deleted file mode 100644
index 51e04af..0000000
Binary files a/assets/images/3.0x/crypto_lock.png and /dev/null differ
diff --git a/assets/images/3.0x/crypto_lock_light.png b/assets/images/3.0x/crypto_lock_light.png
deleted file mode 100644
index 9ec7964..0000000
Binary files a/assets/images/3.0x/crypto_lock_light.png and /dev/null differ
diff --git a/assets/images/3.0x/decred.png b/assets/images/3.0x/decred.png
deleted file mode 100644
index b2c9ac8..0000000
Binary files a/assets/images/3.0x/decred.png and /dev/null differ
diff --git a/assets/images/3.0x/decred_menu.png b/assets/images/3.0x/decred_menu.png
deleted file mode 100644
index e55b3fb..0000000
Binary files a/assets/images/3.0x/decred_menu.png and /dev/null differ
diff --git a/assets/images/3.0x/germany.png b/assets/images/3.0x/germany.png
deleted file mode 100644
index c01baca..0000000
Binary files a/assets/images/3.0x/germany.png and /dev/null differ
diff --git a/assets/images/3.0x/header.png b/assets/images/3.0x/header.png
deleted file mode 100644
index 9a86d24..0000000
Binary files a/assets/images/3.0x/header.png and /dev/null differ
diff --git a/assets/images/3.0x/holland.png b/assets/images/3.0x/holland.png
deleted file mode 100644
index 14b47e1..0000000
Binary files a/assets/images/3.0x/holland.png and /dev/null differ
diff --git a/assets/images/3.0x/india.png b/assets/images/3.0x/india.png
deleted file mode 100644
index 3d80e26..0000000
Binary files a/assets/images/3.0x/india.png and /dev/null differ
diff --git a/assets/images/3.0x/japan.png b/assets/images/3.0x/japan.png
deleted file mode 100644
index 9a9b487..0000000
Binary files a/assets/images/3.0x/japan.png and /dev/null differ
diff --git a/assets/images/3.0x/keysIco.png b/assets/images/3.0x/keysIco.png
deleted file mode 100644
index a44186d..0000000
Binary files a/assets/images/3.0x/keysIco.png and /dev/null differ
diff --git a/assets/images/3.0x/litecoin.png b/assets/images/3.0x/litecoin.png
deleted file mode 100644
index 56ca3f6..0000000
Binary files a/assets/images/3.0x/litecoin.png and /dev/null differ
diff --git a/assets/images/3.0x/menu_button.png b/assets/images/3.0x/menu_button.png
deleted file mode 100644
index 97f28ae..0000000
Binary files a/assets/images/3.0x/menu_button.png and /dev/null differ
diff --git a/assets/images/3.0x/monero.png b/assets/images/3.0x/monero.png
deleted file mode 100644
index 94eed50..0000000
Binary files a/assets/images/3.0x/monero.png and /dev/null differ
diff --git a/assets/images/3.0x/monero_menu.png b/assets/images/3.0x/monero_menu.png
deleted file mode 100644
index 7d81566..0000000
Binary files a/assets/images/3.0x/monero_menu.png and /dev/null differ
diff --git a/assets/images/3.0x/poland.png b/assets/images/3.0x/poland.png
deleted file mode 100644
index a345e23..0000000
Binary files a/assets/images/3.0x/poland.png and /dev/null differ
diff --git a/assets/images/3.0x/portugal.png b/assets/images/3.0x/portugal.png
deleted file mode 100644
index 0f2840e..0000000
Binary files a/assets/images/3.0x/portugal.png and /dev/null differ
diff --git a/assets/images/3.0x/pre_seed_dark.png b/assets/images/3.0x/pre_seed_dark.png
deleted file mode 100755
index 632f2bb..0000000
Binary files a/assets/images/3.0x/pre_seed_dark.png and /dev/null differ
diff --git a/assets/images/3.0x/pre_seed_light.png b/assets/images/3.0x/pre_seed_light.png
deleted file mode 100755
index 329fce1..0000000
Binary files a/assets/images/3.0x/pre_seed_light.png and /dev/null differ
diff --git a/assets/images/3.0x/restoreSeed.png b/assets/images/3.0x/restoreSeed.png
deleted file mode 100644
index 8fc5b1f..0000000
Binary files a/assets/images/3.0x/restoreSeed.png and /dev/null differ
diff --git a/assets/images/3.0x/restore_keys.png b/assets/images/3.0x/restore_keys.png
deleted file mode 100644
index 1d73012..0000000
Binary files a/assets/images/3.0x/restore_keys.png and /dev/null differ
diff --git a/assets/images/3.0x/restore_seed.png b/assets/images/3.0x/restore_seed.png
deleted file mode 100644
index de1a10b..0000000
Binary files a/assets/images/3.0x/restore_seed.png and /dev/null differ
diff --git a/assets/images/3.0x/restore_wallet_image.png b/assets/images/3.0x/restore_wallet_image.png
deleted file mode 100644
index 6a6fdd7..0000000
Binary files a/assets/images/3.0x/restore_wallet_image.png and /dev/null differ
diff --git a/assets/images/3.0x/russia.png b/assets/images/3.0x/russia.png
deleted file mode 100644
index 7726067..0000000
Binary files a/assets/images/3.0x/russia.png and /dev/null differ
diff --git a/assets/images/3.0x/seedIco.png b/assets/images/3.0x/seedIco.png
deleted file mode 100644
index 174a943..0000000
Binary files a/assets/images/3.0x/seedIco.png and /dev/null differ
diff --git a/assets/images/3.0x/seedKeys.png b/assets/images/3.0x/seedKeys.png
deleted file mode 100644
index 50b31c2..0000000
Binary files a/assets/images/3.0x/seedKeys.png and /dev/null differ
diff --git a/assets/images/3.0x/seed_image.png b/assets/images/3.0x/seed_image.png
deleted file mode 100644
index 0431af1..0000000
Binary files a/assets/images/3.0x/seed_image.png and /dev/null differ
diff --git a/assets/images/3.0x/south_korea.png b/assets/images/3.0x/south_korea.png
deleted file mode 100644
index 3e0c889..0000000
Binary files a/assets/images/3.0x/south_korea.png and /dev/null differ
diff --git a/assets/images/3.0x/spain.png b/assets/images/3.0x/spain.png
deleted file mode 100644
index cf53086..0000000
Binary files a/assets/images/3.0x/spain.png and /dev/null differ
diff --git a/assets/images/3.0x/usa.png b/assets/images/3.0x/usa.png
deleted file mode 100644
index 628094f..0000000
Binary files a/assets/images/3.0x/usa.png and /dev/null differ
diff --git a/assets/images/3.0x/wallet_name.png b/assets/images/3.0x/wallet_name.png
deleted file mode 100644
index c02d9ef..0000000
Binary files a/assets/images/3.0x/wallet_name.png and /dev/null differ
diff --git a/assets/images/3.0x/wallet_name_light.png b/assets/images/3.0x/wallet_name_light.png
deleted file mode 100644
index 5fecf8f..0000000
Binary files a/assets/images/3.0x/wallet_name_light.png and /dev/null differ
diff --git a/assets/images/3.0x/wallet_type.png b/assets/images/3.0x/wallet_type.png
deleted file mode 100644
index 3c63414..0000000
Binary files a/assets/images/3.0x/wallet_type.png and /dev/null differ
diff --git a/assets/images/3.0x/wallet_type_light.png b/assets/images/3.0x/wallet_type_light.png
deleted file mode 100644
index 5ece280..0000000
Binary files a/assets/images/3.0x/wallet_type_light.png and /dev/null differ
diff --git a/assets/images/3.0x/welcome.png b/assets/images/3.0x/welcome.png
deleted file mode 100644
index c939cf3..0000000
Binary files a/assets/images/3.0x/welcome.png and /dev/null differ
diff --git a/assets/images/3.0x/welcomeImg.png b/assets/images/3.0x/welcomeImg.png
deleted file mode 100644
index d78387d..0000000
Binary files a/assets/images/3.0x/welcomeImg.png and /dev/null differ
diff --git a/assets/images/3.0x/welcome_light.png b/assets/images/3.0x/welcome_light.png
deleted file mode 100644
index 8b682ed..0000000
Binary files a/assets/images/3.0x/welcome_light.png and /dev/null differ
diff --git a/assets/images/Twitter.png b/assets/images/Twitter.png
deleted file mode 100644
index 4821abf..0000000
Binary files a/assets/images/Twitter.png and /dev/null differ
diff --git a/assets/images/back_arrow.png b/assets/images/back_arrow.png
deleted file mode 100644
index 30e599b..0000000
Binary files a/assets/images/back_arrow.png and /dev/null differ
diff --git a/assets/images/back_arrow_dark_theme.png b/assets/images/back_arrow_dark_theme.png
deleted file mode 100644
index e78cf34..0000000
Binary files a/assets/images/back_arrow_dark_theme.png and /dev/null differ
diff --git a/assets/images/back_vector.png b/assets/images/back_vector.png
deleted file mode 100644
index 8717a34..0000000
Binary files a/assets/images/back_vector.png and /dev/null differ
diff --git a/assets/images/backup.png b/assets/images/backup.png
deleted file mode 100644
index 665128a..0000000
Binary files a/assets/images/backup.png and /dev/null differ
diff --git a/assets/images/bch.png b/assets/images/bch.png
deleted file mode 100644
index 1787273..0000000
Binary files a/assets/images/bch.png and /dev/null differ
diff --git a/assets/images/bch_icon.png b/assets/images/bch_icon.png
deleted file mode 100644
index d3d2ba8..0000000
Binary files a/assets/images/bch_icon.png and /dev/null differ
diff --git a/assets/images/bitcoin.png b/assets/images/bitcoin.png
deleted file mode 100644
index 1c30fa3..0000000
Binary files a/assets/images/bitcoin.png and /dev/null differ
diff --git a/assets/images/bitcoin_icon.png b/assets/images/bitcoin_icon.png
deleted file mode 100644
index 69211b9..0000000
Binary files a/assets/images/bitcoin_icon.png and /dev/null differ
diff --git a/assets/images/bitcoin_menu.png b/assets/images/bitcoin_menu.png
deleted file mode 100644
index ed0ea00..0000000
Binary files a/assets/images/bitcoin_menu.png and /dev/null differ
diff --git a/assets/images/bitmap.png b/assets/images/bitmap.png
deleted file mode 100644
index 525522b..0000000
Binary files a/assets/images/bitmap.png and /dev/null differ
diff --git a/assets/images/black_accent.svg b/assets/images/black_accent.svg
new file mode 100644
index 0000000..7e22d3b
--- /dev/null
+++ b/assets/images/black_accent.svg
@@ -0,0 +1,13 @@
+<svg width="92" height="173" viewBox="0 0 92 173" fill="none" xmlns="http://www.w3.org/2000/svg">
+<rect width="92" height="173" rx="10" fill="#131314"/>
+<rect x="16" y="8" width="59" height="9" rx="4.5" fill="#211F20"/>
+<rect x="8" y="152" width="75" height="14" rx="7" fill="#211F20"/>
+<rect x="8" y="37" width="75" height="30" rx="4" fill="#211F20"/>
+<rect x="10" y="31" width="16" height="3" fill="#B4B4B4"/>
+<rect x="12" y="41" width="34" height="3" fill="#B4B4B4"/>
+<rect x="12" y="46" width="34" height="3" fill="#B4B4B4"/>
+<rect x="12" y="51" width="26" height="3" fill="#B4B4B4"/>
+<rect x="12" y="56" width="26" height="3" fill="#B4B4B4"/>
+<rect x="71" y="54" width="8" height="3" fill="#B4B4B4"/>
+<rect x="71" y="44" width="8" height="8" rx="4" fill="#52B6F0"/>
+</svg>
diff --git a/assets/images/bnb.png b/assets/images/bnb.png
deleted file mode 100644
index 45fe9ad..0000000
Binary files a/assets/images/bnb.png and /dev/null differ
diff --git a/assets/images/btc.png b/assets/images/btc.png
deleted file mode 100644
index 7bcff6b..0000000
Binary files a/assets/images/btc.png and /dev/null differ
diff --git a/assets/images/cake_arrow.png b/assets/images/cake_arrow.png
deleted file mode 100644
index 26648d3..0000000
Binary files a/assets/images/cake_arrow.png and /dev/null differ
diff --git a/assets/images/cakepay.png b/assets/images/cakepay.png
new file mode 100644
index 0000000..2d1c12c
Binary files /dev/null and b/assets/images/cakepay.png differ
diff --git a/assets/images/crypto/bitcoin-cash.png b/assets/images/crypto/bitcoin-cash.png
new file mode 100644
index 0000000..ee02b61
Binary files /dev/null and b/assets/images/crypto/bitcoin-cash.png differ
diff --git a/assets/images/crypto/bitcoin.png b/assets/images/crypto/bitcoin.png
new file mode 100644
index 0000000..7e88aa5
Binary files /dev/null and b/assets/images/crypto/bitcoin.png differ
diff --git a/assets/images/crypto/dai.png b/assets/images/crypto/dai.png
new file mode 100644
index 0000000..29f7f5f
Binary files /dev/null and b/assets/images/crypto/dai.png differ
diff --git a/assets/images/crypto/decred.png b/assets/images/crypto/decred.png
new file mode 100644
index 0000000..a636dd4
Binary files /dev/null and b/assets/images/crypto/decred.png differ
diff --git a/assets/images/crypto/deuro.png b/assets/images/crypto/deuro.png
new file mode 100644
index 0000000..9118238
Binary files /dev/null and b/assets/images/crypto/deuro.png differ
diff --git a/assets/images/crypto/dogecoin.png b/assets/images/crypto/dogecoin.png
new file mode 100644
index 0000000..26f17fb
Binary files /dev/null and b/assets/images/crypto/dogecoin.png differ
diff --git a/assets/images/crypto/ethereum.png b/assets/images/crypto/ethereum.png
new file mode 100644
index 0000000..41fee06
Binary files /dev/null and b/assets/images/crypto/ethereum.png differ
diff --git a/assets/images/crypto/litecoin.png b/assets/images/crypto/litecoin.png
new file mode 100644
index 0000000..83bf1bd
Binary files /dev/null and b/assets/images/crypto/litecoin.png differ
diff --git a/assets/images/crypto/monero.png b/assets/images/crypto/monero.png
new file mode 100644
index 0000000..1520b56
Binary files /dev/null and b/assets/images/crypto/monero.png differ
diff --git a/assets/images/crypto/nano.png b/assets/images/crypto/nano.png
new file mode 100644
index 0000000..67c0f1e
Binary files /dev/null and b/assets/images/crypto/nano.png differ
diff --git a/assets/images/crypto/polygon.png b/assets/images/crypto/polygon.png
new file mode 100644
index 0000000..db721f6
Binary files /dev/null and b/assets/images/crypto/polygon.png differ
diff --git a/assets/images/crypto/solana.png b/assets/images/crypto/solana.png
new file mode 100644
index 0000000..7b5fba5
Binary files /dev/null and b/assets/images/crypto/solana.png differ
diff --git a/assets/images/crypto/tether.png b/assets/images/crypto/tether.png
new file mode 100644
index 0000000..46115ef
Binary files /dev/null and b/assets/images/crypto/tether.png differ
diff --git a/assets/images/crypto/tron.png b/assets/images/crypto/tron.png
new file mode 100644
index 0000000..08f181d
Binary files /dev/null and b/assets/images/crypto/tron.png differ
diff --git a/assets/images/crypto/usdc.png b/assets/images/crypto/usdc.png
new file mode 100644
index 0000000..f7cb798
Binary files /dev/null and b/assets/images/crypto/usdc.png differ
diff --git a/assets/images/crypto/wbtc.png b/assets/images/crypto/wbtc.png
new file mode 100644
index 0000000..236cb13
Binary files /dev/null and b/assets/images/crypto/wbtc.png differ
diff --git a/assets/images/crypto/wownero.png b/assets/images/crypto/wownero.png
new file mode 100644
index 0000000..54f3d0f
Binary files /dev/null and b/assets/images/crypto/wownero.png differ
diff --git a/assets/images/crypto/zano.png b/assets/images/crypto/zano.png
new file mode 100644
index 0000000..1467c7f
Binary files /dev/null and b/assets/images/crypto/zano.png differ
diff --git a/assets/images/crypto_lock.png b/assets/images/crypto_lock.png
deleted file mode 100644
index 89eadee..0000000
Binary files a/assets/images/crypto_lock.png and /dev/null differ
diff --git a/assets/images/dai.png b/assets/images/dai.png
deleted file mode 100644
index 698ffc4..0000000
Binary files a/assets/images/dai.png and /dev/null differ
diff --git a/assets/images/dai_icon.png b/assets/images/dai_icon.png
index 9aaa956..29f7f5f 100644
Binary files a/assets/images/dai_icon.png and b/assets/images/dai_icon.png differ
diff --git a/assets/images/dark.svg b/assets/images/dark.svg
new file mode 100644
index 0000000..20baf68
--- /dev/null
+++ b/assets/images/dark.svg
@@ -0,0 +1,13 @@
+<svg width="92" height="173" viewBox="0 0 92 173" fill="none" xmlns="http://www.w3.org/2000/svg">
+<rect width="92" height="173" rx="10" fill="#1B284A"/>
+<rect x="16" y="8" width="59" height="9" rx="4.5" fill="#233461"/>
+<rect x="8" y="152" width="75" height="14" rx="7" fill="#233461"/>
+<rect x="8" y="37" width="75" height="30" rx="4" fill="#233461"/>
+<rect x="10" y="31" width="16" height="3" fill="#8C9FBB"/>
+<rect x="12" y="41" width="34" height="3" fill="#8C9FBB"/>
+<rect x="12" y="46" width="34" height="3" fill="#8C9FBB"/>
+<rect x="12" y="51" width="26" height="3" fill="#8C9FBB"/>
+<rect x="12" y="56" width="26" height="3" fill="#8C9FBB"/>
+<rect x="71" y="54" width="8" height="3" fill="#8C9FBB"/>
+<rect x="71" y="44" width="8" height="8" rx="4" fill="#91B0FF"/>
+</svg>
diff --git a/assets/images/dash.png b/assets/images/dash.png
deleted file mode 100644
index 0856db1..0000000
Binary files a/assets/images/dash.png and /dev/null differ
diff --git a/assets/images/dcr_icon.png b/assets/images/dcr_icon.png
deleted file mode 100644
index 757cd03..0000000
Binary files a/assets/images/dcr_icon.png and /dev/null differ
diff --git a/assets/images/decred.png b/assets/images/decred.png
deleted file mode 100644
index 0b12f2e..0000000
Binary files a/assets/images/decred.png and /dev/null differ
diff --git a/assets/images/decred_icon.png b/assets/images/decred_icon.png
deleted file mode 100644
index 9391abc..0000000
Binary files a/assets/images/decred_icon.png and /dev/null differ
diff --git a/assets/images/decred_menu.png b/assets/images/decred_menu.png
deleted file mode 100644
index 5c67923..0000000
Binary files a/assets/images/decred_menu.png and /dev/null differ
diff --git a/assets/images/doge_icon.png b/assets/images/doge_icon.png
deleted file mode 100644
index b6292c1..0000000
Binary files a/assets/images/doge_icon.png and /dev/null differ
diff --git a/assets/images/eth_icon.png b/assets/images/eth_icon.png
deleted file mode 100644
index c96f24c..0000000
Binary files a/assets/images/eth_icon.png and /dev/null differ
diff --git a/assets/images/header.png b/assets/images/header.png
deleted file mode 100644
index a3e8169..0000000
Binary files a/assets/images/header.png and /dev/null differ
diff --git a/assets/images/light.svg b/assets/images/light.svg
new file mode 100644
index 0000000..183a13f
--- /dev/null
+++ b/assets/images/light.svg
@@ -0,0 +1,13 @@
+<svg width="92" height="173" viewBox="0 0 92 173" fill="none" xmlns="http://www.w3.org/2000/svg">
+<rect width="92" height="173" rx="10" fill="#EFEFF8"/>
+<rect x="16" y="8" width="59" height="9" rx="4.5" fill="#FBFBFD"/>
+<rect x="8" y="152" width="75" height="14" rx="7" fill="#FBFBFD"/>
+<rect x="8" y="37" width="75" height="30" rx="4" fill="#FBFBFD"/>
+<rect x="10" y="31" width="16" height="3" fill="#6C6772"/>
+<rect x="12" y="41" width="34" height="3" fill="#6C6772"/>
+<rect x="12" y="46" width="34" height="3" fill="#6C6772"/>
+<rect x="12" y="51" width="26" height="3" fill="#6C6772"/>
+<rect x="12" y="56" width="26" height="3" fill="#6C6772"/>
+<rect x="71" y="54" width="8" height="3" fill="#6C6772"/>
+<rect x="71" y="44" width="8" height="8" rx="4" fill="#4EBEFF"/>
+</svg>
diff --git a/assets/images/litecoin-ltc_icon.png b/assets/images/litecoin-ltc_icon.png
deleted file mode 100644
index a9f5606..0000000
Binary files a/assets/images/litecoin-ltc_icon.png and /dev/null differ
diff --git a/assets/images/litecoin.png b/assets/images/litecoin.png
deleted file mode 100644
index 53e0202..0000000
Binary files a/assets/images/litecoin.png and /dev/null differ
diff --git a/assets/images/litecoin_icon.png b/assets/images/litecoin_icon.png
deleted file mode 100644
index 9cc47b6..0000000
Binary files a/assets/images/litecoin_icon.png and /dev/null differ
diff --git a/assets/images/litecoin_img.png b/assets/images/litecoin_img.png
deleted file mode 100644
index 8bf55f7..0000000
Binary files a/assets/images/litecoin_img.png and /dev/null differ
diff --git a/assets/images/live_support.png b/assets/images/live_support.png
deleted file mode 100644
index 89ad61f..0000000
Binary files a/assets/images/live_support.png and /dev/null differ
diff --git a/assets/images/matic_icon.png b/assets/images/matic_icon.png
deleted file mode 100644
index 7f54933..0000000
Binary files a/assets/images/matic_icon.png and /dev/null differ
diff --git a/assets/images/monero_icon.png b/assets/images/monero_icon.png
deleted file mode 100644
index 7b6f74d..0000000
Binary files a/assets/images/monero_icon.png and /dev/null differ
diff --git a/assets/images/monero_logo.png b/assets/images/monero_logo.png
deleted file mode 100644
index d1ebfc0..0000000
Binary files a/assets/images/monero_logo.png and /dev/null differ
diff --git a/assets/images/monero_menu.png b/assets/images/monero_menu.png
deleted file mode 100644
index 51b1e22..0000000
Binary files a/assets/images/monero_menu.png and /dev/null differ
diff --git a/assets/images/more_links.png b/assets/images/more_links.png
deleted file mode 100644
index 97891f3..0000000
Binary files a/assets/images/more_links.png and /dev/null differ
diff --git a/assets/images/nano_icon.png b/assets/images/nano_icon.png
index 8937b8e..e961b08 100644
Binary files a/assets/images/nano_icon.png and b/assets/images/nano_icon.png differ
diff --git a/assets/images/nanogpt.png b/assets/images/nanogpt.png
index 9584004..765271b 100644
Binary files a/assets/images/nanogpt.png and b/assets/images/nanogpt.png differ
diff --git a/assets/images/pre_seed_dark.png b/assets/images/pre_seed_dark.png
deleted file mode 100755
index ed12c73..0000000
Binary files a/assets/images/pre_seed_dark.png and /dev/null differ
diff --git a/assets/images/pre_seed_light.png b/assets/images/pre_seed_light.png
deleted file mode 100755
index bb95a65..0000000
Binary files a/assets/images/pre_seed_light.png and /dev/null differ
diff --git a/assets/images/receive_icon.png b/assets/images/receive_icon.png
deleted file mode 100755
index 8701cc6..0000000
Binary files a/assets/images/receive_icon.png and /dev/null differ
diff --git a/assets/images/receive_icon_raw.png b/assets/images/receive_icon_raw.png
deleted file mode 100644
index 741ed4e..0000000
Binary files a/assets/images/receive_icon_raw.png and /dev/null differ
diff --git a/assets/images/red_badge_discount.png b/assets/images/red_badge_discount.png
deleted file mode 100644
index 4f5dc56..0000000
Binary files a/assets/images/red_badge_discount.png and /dev/null differ
diff --git a/assets/images/restoreSeed.png b/assets/images/restoreSeed.png
deleted file mode 100644
index a51ea11..0000000
Binary files a/assets/images/restoreSeed.png and /dev/null differ
diff --git a/assets/images/restore_keys.png b/assets/images/restore_keys.png
deleted file mode 100644
index bbb7890..0000000
Binary files a/assets/images/restore_keys.png and /dev/null differ
diff --git a/assets/images/restore_seed.png b/assets/images/restore_seed.png
deleted file mode 100644
index 938cac4..0000000
Binary files a/assets/images/restore_seed.png and /dev/null differ
diff --git a/assets/images/restore_seeds.png b/assets/images/restore_seeds.png
new file mode 100644
index 0000000..9f3d147
Binary files /dev/null and b/assets/images/restore_seeds.png differ
diff --git a/assets/images/restore_wallet_image.png b/assets/images/restore_wallet_image.png
deleted file mode 100644
index 9fee53f..0000000
Binary files a/assets/images/restore_wallet_image.png and /dev/null differ
diff --git a/assets/images/seedIco.png b/assets/images/seedIco.png
deleted file mode 100644
index d40fe1f..0000000
Binary files a/assets/images/seedIco.png and /dev/null differ
diff --git a/assets/images/seedKeys.png b/assets/images/seedKeys.png
deleted file mode 100644
index 7cdc42d..0000000
Binary files a/assets/images/seedKeys.png and /dev/null differ
diff --git a/assets/images/seed_verified.png b/assets/images/seed_verified.png
deleted file mode 100644
index e037061..0000000
Binary files a/assets/images/seed_verified.png and /dev/null differ
diff --git a/assets/images/setup_2fa_img.png b/assets/images/setup_2fa_img.png
deleted file mode 100644
index ce6f0d7..0000000
Binary files a/assets/images/setup_2fa_img.png and /dev/null differ
diff --git a/assets/images/sol_icon.png b/assets/images/sol_icon.png
deleted file mode 100644
index c9a9f3b..0000000
Binary files a/assets/images/sol_icon.png and /dev/null differ
diff --git a/assets/images/trx_icon.png b/assets/images/trx_icon.png
deleted file mode 100644
index c5d2b45..0000000
Binary files a/assets/images/trx_icon.png and /dev/null differ
diff --git a/assets/images/usdc_icon.png b/assets/images/usdc_icon.png
index 283533b..f7cb798 100644
Binary files a/assets/images/usdc_icon.png and b/assets/images/usdc_icon.png differ
diff --git a/assets/images/usdt.png b/assets/images/usdt.png
deleted file mode 100644
index c7f7119..0000000
Binary files a/assets/images/usdt.png and /dev/null differ
diff --git a/assets/images/usdt_icon.png b/assets/images/usdt_icon.png
deleted file mode 100644
index c1bfa0f..0000000
Binary files a/assets/images/usdt_icon.png and /dev/null differ
diff --git a/assets/images/usdtbsc_icon.png b/assets/images/usdtbsc_icon.png
deleted file mode 100644
index 9f2cda2..0000000
Binary files a/assets/images/usdtbsc_icon.png and /dev/null differ
diff --git a/assets/images/usdterc.png b/assets/images/usdterc.png
deleted file mode 100644
index 212b301..0000000
Binary files a/assets/images/usdterc.png and /dev/null differ
diff --git a/assets/images/usdterc20_icon.png b/assets/images/usdterc20_icon.png
index 63482a8..46115ef 100644
Binary files a/assets/images/usdterc20_icon.png and b/assets/images/usdterc20_icon.png differ
diff --git a/assets/images/usdterc_icon.png b/assets/images/usdterc_icon.png
index e2e736a..46115ef 100644
Binary files a/assets/images/usdterc_icon.png and b/assets/images/usdterc_icon.png differ
diff --git a/assets/images/usdttrc20_icon.png b/assets/images/usdttrc20_icon.png
deleted file mode 100644
index 4d3f156..0000000
Binary files a/assets/images/usdttrc20_icon.png and /dev/null differ
diff --git a/assets/images/wallet_guides.png b/assets/images/wallet_guides.png
deleted file mode 100644
index 3f2d9f2..0000000
Binary files a/assets/images/wallet_guides.png and /dev/null differ
diff --git a/assets/images/wbtc_icon.png b/assets/images/wbtc_icon.png
index d836eb3..236cb13 100644
Binary files a/assets/images/wbtc_icon.png and b/assets/images/wbtc_icon.png differ
diff --git a/assets/images/wownero_icon.png b/assets/images/wownero_icon.png
deleted file mode 100644
index a3da77b..0000000
Binary files a/assets/images/wownero_icon.png and /dev/null differ
diff --git a/assets/images/wownero_menu.png b/assets/images/wownero_menu.png
deleted file mode 100644
index a3da77b..0000000
Binary files a/assets/images/wownero_menu.png and /dev/null differ
diff --git a/assets/images/xmr_btc.png b/assets/images/xmr_btc.png
deleted file mode 100644
index 8586642..0000000
Binary files a/assets/images/xmr_btc.png and /dev/null differ
diff --git a/assets/images/zano_bg_icon.png b/assets/images/zano_bg_icon.png
deleted file mode 100644
index 5ea593b..0000000
Binary files a/assets/images/zano_bg_icon.png and /dev/null differ
diff --git a/assets/images/zano_icon.png b/assets/images/zano_icon.png
deleted file mode 100644
index fd48fd6..0000000
Binary files a/assets/images/zano_icon.png and /dev/null differ
diff --git a/cw_core/lib/crypto_currency.dart b/cw_core/lib/crypto_currency.dart
index 39e62b4..a5c2a81 100644
--- a/cw_core/lib/crypto_currency.dart
+++ b/cw_core/lib/crypto_currency.dart
@@ -134,20 +134,20 @@ class CryptoCurrency extends EnumerableItem<int> with Serializable<int> implemen
];
// title, tag (if applicable), fullName (if unique), raw, name, iconPath
- static const xmr = CryptoCurrency(title: 'XMR', fullName: 'Monero', raw: 0, name: 'xmr', iconPath: 'assets/images/monero_icon.png', decimals: 12);
+ static const xmr = CryptoCurrency(title: 'XMR', fullName: 'Monero', raw: 0, name: 'xmr', iconPath: 'assets/images/crypto/monero.png', decimals: 12);
static const ada = CryptoCurrency(title: 'ADA', fullName: 'Cardano', raw: 1, name: 'ada', iconPath: 'assets/images/ada_icon.png', decimals: 6);
- static const bch = CryptoCurrency(title: 'BCH', fullName: 'Bitcoin Cash', raw: 2, name: 'bch', iconPath: 'assets/images/bch_icon.png', decimals: 8);
+ static const bch = CryptoCurrency(title: 'BCH', fullName: 'Bitcoin Cash', raw: 2, name: 'bch', iconPath: 'assets/images/crypto/bitcoin-cash.png', decimals: 8);
static const bnb = CryptoCurrency(title: 'BNB', tag: 'BSC', fullName: 'Binance Coin', raw: 3, name: 'bnb', iconPath: 'assets/images/bnb_icon.png', decimals: 8);
- static const btc = CryptoCurrency(title: 'BTC', fullName: 'Bitcoin', raw: 4, name: 'btc', iconPath: 'assets/images/btc.png', decimals: 8);
- static const dai = CryptoCurrency(title: 'DAI', tag: 'ETH', fullName: 'Dai', raw: 5, name: 'dai', iconPath: 'assets/images/dai_icon.png', decimals: 18);
+ static const btc = CryptoCurrency(title: 'BTC', fullName: 'Bitcoin', raw: 4, name: 'btc', iconPath: 'assets/images/crypto/bitcoin.png', decimals: 8);
+ static const dai = CryptoCurrency(title: 'DAI', tag: 'ETH', fullName: 'Dai', raw: 5, name: 'dai', iconPath: 'assets/images/crypto/dai.png', decimals: 18);
static const dash = CryptoCurrency(title: 'DASH', fullName: 'Dash', raw: 6, name: 'dash', iconPath: 'assets/images/dash_icon.png', decimals: 8);
static const eos = CryptoCurrency(title: 'EOS', fullName: 'EOS', raw: 7, name: 'eos', iconPath: 'assets/images/eos_icon.png', decimals: 4);
- static const eth = CryptoCurrency(title: 'ETH', fullName: 'Ethereum', raw: 8, name: 'eth', iconPath: 'assets/images/eth_icon.png', decimals: 18);
- static const ltc = CryptoCurrency(title: 'LTC', fullName: 'Litecoin', raw: 9, name: 'ltc', iconPath: 'assets/images/litecoin-ltc_icon.png', decimals: 8);
- static const nano = CryptoCurrency(title: 'XNO', fullName: 'Nano', raw: 10, name: 'xno', iconPath: 'assets/images/nano_icon.png', decimals: 30);
- static const trx = CryptoCurrency(title: 'TRX', fullName: 'TRON', raw: 11, name: 'trx', iconPath: 'assets/images/trx_icon.png', decimals: 6);
- static const usdt = CryptoCurrency(title: 'USDT', tag: 'OMNI', fullName: 'USDT Tether', raw: 12, name: 'usdt', iconPath: 'assets/images/usdt_icon.png', decimals: 6);
- static const usdterc20 = CryptoCurrency(title: 'USDT', tag: 'ETH', fullName: 'USDT Tether', raw: 13, name: 'usdterc20', iconPath: 'assets/images/usdterc20_icon.png', decimals: 6);
+ static const eth = CryptoCurrency(title: 'ETH', fullName: 'Ethereum', raw: 8, name: 'eth', iconPath: 'assets/images/crypto/ethereum.png', decimals: 18);
+ static const ltc = CryptoCurrency(title: 'LTC', fullName: 'Litecoin', raw: 9, name: 'ltc', iconPath: 'assets/images/crypto/litecoin.png', decimals: 8);
+ static const nano = CryptoCurrency(title: 'XNO', fullName: 'Nano', raw: 10, name: 'xno', iconPath: 'assets/images/crypto/nano.png', decimals: 30);
+ static const trx = CryptoCurrency(title: 'TRX', fullName: 'TRON', raw: 11, name: 'trx', iconPath: 'assets/images/crypto/tron.png', decimals: 6);
+ static const usdt = CryptoCurrency(title: 'USDT', tag: 'OMNI', fullName: 'USDT Tether', raw: 12, name: 'usdt', iconPath: 'assets/images/crypto/tether.png', decimals: 6);
+ static const usdterc20 = CryptoCurrency(title: 'USDT', tag: 'ETH', fullName: 'USDT Tether', raw: 13, name: 'usdterc20', iconPath: 'assets/images/crypto/tether.png', decimals: 6);
static const xlm = CryptoCurrency(title: 'XLM', fullName: 'Stellar', raw: 14, name: 'xlm', iconPath: 'assets/images/xlm_icon.png', decimals: 7);
static const xrp = CryptoCurrency(title: 'XRP', fullName: 'Ripple', raw: 15, name: 'xrp', iconPath: 'assets/images/xrp_icon.png', decimals: 6);
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
static const avaxc = CryptoCurrency(title: 'AVAX', tag: 'AVAXC', fullName: 'Avalanche', raw: 31, name: 'avaxc', iconPath: 'assets/images/avaxc_icon.png', decimals: 9);
static const btt = CryptoCurrency(title: 'BTT', tag: 'ETH', fullName: 'BitTorrent', raw: 32, name: 'btt', iconPath: 'assets/images/btt_icon.png', decimals: 18);
static const bttc = CryptoCurrency(title: 'BTTC', tag: 'TRX', fullName: 'BitTorrent-NEW', raw: 33, name: 'bttc', iconPath: 'assets/images/btt_icon.png', decimals: 18);
- static const doge = CryptoCurrency(title: 'DOGE', fullName: 'Dogecoin', raw: 34, name: 'doge', iconPath: 'assets/images/doge_icon.png', decimals: 8);
+ static const doge = CryptoCurrency(title: 'DOGE', fullName: 'Dogecoin', raw: 34, name: 'doge', iconPath: 'assets/images/crypto/dogecoin.png', decimals: 8);
static const firo = CryptoCurrency(title: 'FIRO', raw: 35, name: 'firo', iconPath: 'assets/images/firo_icon.png', decimals: 8);
- static const usdttrc20 = CryptoCurrency(title: 'USDT', tag: 'TRX', fullName: 'USDT Tether', raw: 36, name: 'usdttrc20', iconPath: 'assets/images/usdttrc20_icon.png', decimals: 6);
+ static const usdttrc20 = CryptoCurrency(title: 'USDT', tag: 'TRX', fullName: 'USDT Tether', raw: 36, name: 'usdttrc20', iconPath: 'assets/images/crypto/tether.png', decimals: 6);
static const hbar = CryptoCurrency(title: 'HBAR', fullName: 'Hedera', raw: 37, name: 'hbar', iconPath: 'assets/images/hbar_icon.png', decimals: 8);
static const sc = CryptoCurrency(title: 'SC', fullName: 'Siacoin', raw: 38, name: 'sc', iconPath: 'assets/images/sc_icon.png', decimals: 16);
- static const sol = CryptoCurrency(title: 'SOL', fullName: 'Solana', raw: 39, name: 'sol', iconPath: 'assets/images/sol_icon.png', decimals: 9);
- static const usdc = CryptoCurrency(title: 'USDC', tag: 'ETH', fullName: 'USD Coin', raw: 40, name: 'usdc', iconPath: 'assets/images/usdc_icon.png', decimals: 6);
- static const usdcsol = CryptoCurrency(title: 'USDC', tag: 'SOL', fullName: 'USDC Coin', raw: 41, name: 'usdcsol', iconPath: 'assets/images/usdc_icon.png', decimals: 6);
+ static const sol = CryptoCurrency(title: 'SOL', fullName: 'Solana', raw: 39, name: 'sol', iconPath: 'assets/images/crypto/solana.png', decimals: 9);
+ static const usdc = CryptoCurrency(title: 'USDC', tag: 'ETH', fullName: 'USD Coin', raw: 40, name: 'usdc', iconPath: 'assets/images/crypto/usdc.png', decimals: 6);
+ static const usdcsol = CryptoCurrency(title: 'USDC', tag: 'SOL', fullName: 'USDC Coin', raw: 41, name: 'usdcsol', iconPath: 'assets/images/crypto/usdc.png', decimals: 6);
static const zaddr = CryptoCurrency(title: 'ZZEC', tag: 'ZEC', fullName: 'Shielded Zcash', raw: 42, name: 'zaddr', iconPath: 'assets/images/zec_icon.png', decimals: 8);
static const zec = CryptoCurrency(title: 'TZEC', tag: 'ZEC', fullName: 'Transparent Zcash', raw: 43, name: 'zec', iconPath: 'assets/images/zec_icon.png', decimals: 8);
static const zen = CryptoCurrency(title: 'ZEN', fullName: 'Horizen', raw: 44, name: 'zen', iconPath: 'assets/images/zen_icon.png', decimals: 8);
static const xvg = CryptoCurrency(title: 'XVG', fullName: 'Verge', raw: 45, name: 'xvg', iconPath: 'assets/images/xvg_icon.png', decimals: 8);
- static const usdcpoly = CryptoCurrency(title: 'USDC', tag: 'POL', fullName: 'USD Coin', raw: 46, name: 'usdcpoly', iconPath: 'assets/images/usdc_icon.png', decimals: 6);
- static const dcr = CryptoCurrency(title: 'DCR', fullName: 'Decred', raw: 47, name: 'dcr', iconPath: 'assets/images/dcr_icon.png', decimals: 8);
+ static const usdcpoly = CryptoCurrency(title: 'USDC', tag: 'POL', fullName: 'USD Coin', raw: 46, name: 'usdcpoly', iconPath: 'assets/images/crypto/usdc.png', decimals: 6);
+ static const dcr = CryptoCurrency(title: 'DCR', fullName: 'Decred', raw: 47, name: 'dcr', iconPath: 'assets/images/crypto/decred.png', decimals: 8);
static const kmd = CryptoCurrency(title: 'KMD', fullName: 'Komodo', raw: 48, name: 'kmd', iconPath: 'assets/images/kmd_icon.png', decimals: 8);
static const mana = CryptoCurrency(title: 'MANA', tag: 'ETH', fullName: 'Decentraland', raw: 49, name: 'mana', iconPath: 'assets/images/mana_icon.png', decimals: 18);
- static const maticpoly = CryptoCurrency(title: 'POL', tag: 'POL', fullName: 'Polygon', raw: 50, name: 'maticpoly', iconPath: 'assets/images/matic_icon.png', decimals: 18);
- static const matic = CryptoCurrency(title: 'MATIC', tag: 'ETH', fullName: 'Polygon', raw: 51, name: 'matic', iconPath: 'assets/images/matic_icon.png', decimals: 18);
+ static const maticpoly = CryptoCurrency(title: 'POL', tag: 'POL', fullName: 'Polygon', raw: 50, name: 'maticpoly', iconPath: 'assets/images/crypto/polygon.png', decimals: 18);
+ static const matic = CryptoCurrency(title: 'MATIC', tag: 'ETH', fullName: 'Polygon', raw: 51, name: 'matic', iconPath: 'assets/images/crypto/polygon.png', decimals: 18);
static const mkr = CryptoCurrency(title: 'MKR', tag: 'ETH', fullName: 'Maker', raw: 52, name: 'mkr', iconPath: 'assets/images/mkr_icon.png', decimals: 18);
static const near = CryptoCurrency(title: 'NEAR', fullName: 'NEAR Protocol', raw: 53, name: 'near', iconPath: 'assets/images/near_icon.png', decimals: 24);
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
static const scrt = CryptoCurrency(title: 'SCRT', fullName: 'Secret Network', raw: 59, name: 'scrt', iconPath: 'assets/images/scrt_icon.png', decimals: 6);
static const uni = CryptoCurrency(title: 'UNI', tag: 'ETH', fullName: 'Uniswap', raw: 60, name: 'uni', iconPath: 'assets/images/uni_icon.png', decimals: 18);
static const stx = CryptoCurrency(title: 'STX', fullName: 'Stacks', raw: 61, name: 'stx', iconPath: 'assets/images/stx_icon.png', decimals: 8);
- static const btcln = CryptoCurrency(title: 'BTC', tag: 'LN', fullName: 'Bitcoin Lightning Network', raw: 62, name: 'btcln', iconPath: 'assets/images/btc.png', decimals: 8);
+ static const btcln = CryptoCurrency(title: 'BTC', tag: 'LN', fullName: 'Bitcoin Lightning Network', raw: 62, name: 'btcln', iconPath: 'assets/images/crypto/bitcoin.png', decimals: 8);
static const shib = CryptoCurrency(title: 'SHIB', tag: 'ETH', fullName: 'Shiba Inu', raw: 63, name: 'shib', iconPath: 'assets/images/shib_icon.png', decimals: 18);
static const aave = CryptoCurrency(title: 'AAVE', tag: 'ETH', fullName: 'Aave', raw: 64, name: 'aave', iconPath: 'assets/images/aave_icon.png', decimals: 18);
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
static const pepe = CryptoCurrency(title: 'PEPE', tag: 'ETH', fullName: 'Pepe', raw: 78, name: 'pepe', iconPath: 'assets/images/pepe_icon.png', decimals: 18);
static const storj = CryptoCurrency(title: 'STORJ', tag: 'ETH', fullName: 'Storj', raw: 79, name: 'storj', iconPath: 'assets/images/storj_icon.png', decimals: 8);
static const tusd = CryptoCurrency(title: 'TUSD', tag: 'ETH', fullName: 'TrueUSD', raw: 80, name: 'tusd', iconPath: 'assets/images/tusd_icon.png', decimals: 18);
- static const wbtc = CryptoCurrency(title: 'WBTC', tag: 'ETH', fullName: 'Wrapped Bitcoin', raw: 81, name: 'wbtc', iconPath: 'assets/images/wbtc_icon.png', decimals: 8);
+ static const wbtc = CryptoCurrency(title: 'WBTC', tag: 'ETH', fullName: 'Wrapped Bitcoin', raw: 81, name: 'wbtc', iconPath: 'assets/images/crypto/wbtc.png', decimals: 8);
static const weth = CryptoCurrency(title: 'WETH', tag: 'ETH', fullName: 'Wrapped Ethereum', raw: 82, name: 'weth', iconPath: 'assets/images/weth_icon.png', decimals: 18);
static const zrx = CryptoCurrency(title: 'ZRX', tag: 'ETH', fullName: '0x Protocol', raw: 83, name: 'zrx', iconPath: 'assets/images/zrx_icon.png', decimals: 18);
static const dydx = CryptoCurrency(title: 'DYDX', tag: 'ETH', fullName: 'dYdX', raw: 84, name: 'dydx', iconPath: 'assets/images/dydx_icon.png', decimals: 18);
static const steth = CryptoCurrency(title: 'STETH', tag: 'ETH', fullName: 'Lido Staked Ethereum', raw: 85, name: 'steth', iconPath: 'assets/images/steth_icon.png', decimals: 18);
static const banano = CryptoCurrency(title: 'BAN', fullName: 'Banano', raw: 86, name: 'banano', iconPath: 'assets/images/nano_icon.png', decimals: 29);
- static const usdtPoly = CryptoCurrency(title: 'USDT', tag: 'POL', fullName: 'Tether USD (PoS)', raw: 87, name: 'usdtpoly', iconPath: 'assets/images/usdt_icon.png', decimals: 6);
- 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);
+ static const usdtPoly = CryptoCurrency(title: 'USDT', tag: 'POL', fullName: 'Tether USD (PoS)', raw: 87, name: 'usdtpoly', iconPath: 'assets/images/crypto/tether.png', decimals: 6);
+ 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);
static const kaspa = CryptoCurrency(title: 'KAS', fullName: 'Kaspa', raw: 89, name: 'kas', iconPath: 'assets/images/kaspa_icon.png', decimals: 8);
static const digibyte = CryptoCurrency(title: 'DGB', fullName: 'DigiByte', raw: 90, name: 'dgb', iconPath: 'assets/images/digibyte.png', decimals: 8);
- static const usdtSol = CryptoCurrency(title: 'USDT', tag: 'SOL', fullName: 'USDT Tether', raw: 91, name: 'usdtsol', iconPath: 'assets/images/usdt_icon.png', decimals: 6);
- static const usdcTrc20 = CryptoCurrency(title: 'USDC', tag: 'TRX', fullName: 'USDC Coin', raw: 92, name: 'usdctrc20', iconPath: 'assets/images/usdc_icon.png', decimals: 6);
+ static const usdtSol = CryptoCurrency(title: 'USDT', tag: 'SOL', fullName: 'USDT Tether', raw: 91, name: 'usdtsol', iconPath: 'assets/images/crypto/tether.png', decimals: 6);
+ static const usdcTrc20 = CryptoCurrency(title: 'USDC', tag: 'TRX', fullName: 'USDC Coin', raw: 92, name: 'usdctrc20', iconPath: 'assets/images/crypto/usdc.png', decimals: 6);
static const tbtc = CryptoCurrency(title: 'tBTC', fullName: 'Testnet Bitcoin', raw: 93, name: 'tbtc', iconPath: 'assets/images/tbtc.png', decimals: 8);
- static const wow = CryptoCurrency(title: 'WOW', fullName: 'Wownero', raw: 94, name: 'wow', iconPath: 'assets/images/wownero_icon.png', decimals: 11);
+ static const wow = CryptoCurrency(title: 'WOW', fullName: 'Wownero', raw: 94, name: 'wow', iconPath: 'assets/images/crypto/wownero.png', decimals: 11);
static const ton = CryptoCurrency(title: 'TON', fullName: 'Toncoin', raw: 95, name: 'ton', iconPath: 'assets/images/ton_icon.png', decimals: 8);
- static const zano = CryptoCurrency(title: 'ZANO', tag: 'ZANO', fullName: 'Zano', raw: 96, name: 'zano', iconPath: 'assets/images/zano_icon.png', decimals: 12);
+ static const zano = CryptoCurrency(title: 'ZANO', tag: 'ZANO', fullName: 'Zano', raw: 96, name: 'zano', iconPath: 'assets/images/crypto/zano.png', decimals: 12);
static const flip = CryptoCurrency(title: 'FLIP', tag: 'ETH', fullName: 'Chainflip', raw: 97, name: 'flip', iconPath: 'assets/images/flip_icon.png', decimals: 18);
static const deuro = CryptoCurrency(title: 'DEURO', tag: 'ETH', fullName: 'Decentralized Euro', raw: 98, name: 'deuro', iconPath: 'assets/images/deuro_icon.png', decimals: 18);
- static const usdtbsc = CryptoCurrency(title: 'USDT', tag: 'BSC', fullName: 'USDT Binance coin', raw: 99, name: 'usdtbsc', iconPath: 'assets/images/usdtbsc_icon.png', decimals: 18);
+ static const usdtbsc = CryptoCurrency(title: 'USDT', tag: 'BSC', fullName: 'USDT Binance coin', raw: 99, name: 'usdtbsc', iconPath: 'assets/images/crypto/tether.png', decimals: 18);
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);
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);
static const kbtc = CryptoCurrency(title: 'KBTC', tag: 'ETH', fullName: 'Kraken Wrapped Bitcoin', raw: 102, name: 'kbtc', iconPath: 'assets/images/kbtc_icon.png', decimals: 8);
diff --git a/lib/cake_pay/src/cards/cake_pay_buy_card_page.dart b/lib/cake_pay/src/cards/cake_pay_buy_card_page.dart
index 1d53f9b..1d24a5a 100644
--- a/lib/cake_pay/src/cards/cake_pay_buy_card_page.dart
+++ b/lib/cake_pay/src/cards/cake_pay_buy_card_page.dart
@@ -39,9 +39,8 @@ import 'package:keyboard_actions/keyboard_actions.dart';
import 'package:mobx/mobx.dart';
class CakePayBuyCardPage extends BasePage {
- CakePayBuyCardPage(
- this.cakePayBuyCardViewModel
- ) : _sendViewModel = cakePayBuyCardViewModel.sendViewModel,
+ CakePayBuyCardPage(this.cakePayBuyCardViewModel)
+ : _sendViewModel = cakePayBuyCardViewModel.sendViewModel,
_amountFieldFocus = FocusNode(),
_amountController = TextEditingController(),
_quantityFieldFocus = FocusNode(),
@@ -303,7 +302,8 @@ class CakePayBuyCardPage extends BasePage {
methods.length <= 1 || selected == null
? const SizedBox.shrink()
: _buildPaymentMethodWidget(methods, selected),
- if (_sendViewModel.walletType == WalletType.litecoin && _sendViewModel.isMwebEnabled)
+ if (_sendViewModel.walletType == WalletType.litecoin &&
+ _sendViewModel.isMwebEnabled)
Observer(
builder: (_) => Padding(
padding: EdgeInsets.only(top: 10, bottom: 0, right: 20, left: 20),
@@ -323,8 +323,7 @@ class CakePayBuyCardPage extends BasePage {
captionColor: Theme.of(context).colorScheme.onSurfaceVariant,
borderColor: Theme.of(context).colorScheme.primary,
iconColor: Theme.of(context).colorScheme.primary,
- value:
- _sendViewModel.coinTypeToSpendFrom == UnspentCoinType.any,
+ value: _sendViewModel.coinTypeToSpendFrom == UnspentCoinType.any,
onChanged: (bool? value) {
_sendViewModel.setAllowMwebCoins(value ?? false);
},
@@ -351,9 +350,8 @@ class CakePayBuyCardPage extends BasePage {
text: '(Dev) Simulate Purchasing Gift Card',
isDisabled: !cakePayBuyCardViewModel.isAmountSufficient ||
cakePayBuyCardViewModel.isPurchasing,
- isLoading:
- _sendViewModel.state is IsExecutingState ||
- cakePayBuyCardViewModel.isPurchasing,
+ isLoading: _sendViewModel.state is IsExecutingState ||
+ cakePayBuyCardViewModel.isPurchasing,
color: Theme.of(context).colorScheme.primary,
textColor: Theme.of(context).colorScheme.onPrimary,
),
@@ -600,7 +598,7 @@ class CakePayBuyCardPage extends BasePage {
profileName: order?.cards.first.cardName ?? 'Cake Pay',
profileImageUrl: order?.cards.first.cardImagePath ?? '',
),
- fiatAmount: '${order?.totalReceiveAmount}',
+ fiatAmount: '${order?.totalReceiveAmount}',
))
.toList();
@@ -613,7 +611,6 @@ class CakePayBuyCardPage extends BasePage {
return ConfirmSendingBottomSheet(
key: ValueKey('cake_pay_buy_page_confirm_sending_dialog_key'),
titleText: S.of(bottomSheetContext).confirm_transaction,
- currentTheme: currentTheme,
cakePayBuyCardViewModel: cakePayBuyCardViewModel,
paymentId: S.of(bottomSheetContext).payment_id,
paymentIdValue: cakePayBuyCardViewModel.order?.orderId,
@@ -627,7 +624,7 @@ class CakePayBuyCardPage extends BasePage {
fiatAmountValue: _sendViewModel.pendingTransactionFiatAmountFormatted,
fee: S.of(bottomSheetContext).send_fee,
feeValue: _sendViewModel.pendingTransaction!.feeFormatted,
- feeFiatAmount:_sendViewModel.pendingTransactionFeeFiatAmountFormatted,
+ feeFiatAmount: _sendViewModel.pendingTransactionFeeFiatAmountFormatted,
outputs: displayingOutputs,
footerType: FooterType.slideActionButton,
slideActionButtonText:
@@ -732,7 +729,6 @@ class CakePayBuyCardPage extends BasePage {
context: context,
isDismissible: false,
builder: (BuildContext bottomSheetContext) => InfoBottomSheet(
- currentTheme: currentTheme,
footerType: FooterType.singleActionButton,
titleText: S.of(bottomSheetContext).proceed_on_device,
contentImage: 'assets/images/hardware_wallet/ledger_nano_x.png',
diff --git a/lib/cake_pay/src/cards/cake_pay_cards_page.dart b/lib/cake_pay/src/cards/cake_pay_cards_page.dart
index adc850f..cee2ea2 100644
--- a/lib/cake_pay/src/cards/cake_pay_cards_page.dart
+++ b/lib/cake_pay/src/cards/cake_pay_cards_page.dart
@@ -10,13 +10,10 @@ import 'package:cake_wallet/cake_pay/src/widgets/card_item.dart';
import 'package:cake_wallet/src/screens/dashboard/widgets/filter_widget.dart';
import 'package:cake_wallet/src/widgets/bottom_sheet/base_bottom_sheet_widget.dart';
import 'package:cake_wallet/src/widgets/bottom_sheet/cake_pay_card_info_bottom_sheet_widget.dart';
-import 'package:cake_wallet/src/widgets/cake_scrollbar.dart';
import 'package:cake_wallet/src/widgets/gradient_background.dart';
import 'package:cake_wallet/src/widgets/picker.dart';
import 'package:cake_wallet/src/widgets/tab_view_wrapper_widget.dart';
-import 'package:cake_wallet/themes/core/material_base_theme.dart';
import 'package:cake_wallet/typography.dart';
-import 'package:cake_wallet/utils/debounce.dart';
import 'package:cake_wallet/utils/feature_flag.dart';
import 'package:cake_wallet/utils/responsive_layout_util.dart';
import 'package:cake_wallet/utils/show_pop_up.dart';
@@ -94,10 +91,7 @@ class CakePayCardsPage extends BasePage {
@override
Widget body(BuildContext context) {
- return CakePayCardsPageBody(
- cardsListViewModel: _cardsListViewModel,
- currentTheme: currentTheme,
- titleColor: titleColor);
+ return CakePayCardsPageBody(cardsListViewModel: _cardsListViewModel, titleColor: titleColor);
}
}
@@ -105,12 +99,10 @@ class CakePayCardsPageBody extends StatefulWidget {
const CakePayCardsPageBody({
super.key,
required CakePayCardsListViewModel cardsListViewModel,
- required this.currentTheme,
required this.titleColor,
}) : _cardsListViewModel = cardsListViewModel;
final CakePayCardsListViewModel _cardsListViewModel;
- final MaterialThemeBase currentTheme;
final Color? Function(BuildContext) titleColor;
@override
@@ -188,8 +180,8 @@ class _CakePayCardsPageBodyState extends State<CakePayCardsPageBody> {
],
views: [
_MyCardsTab(
- cardsListViewModel: widget._cardsListViewModel,
- currentTheme: widget.currentTheme),
+ cardsListViewModel: widget._cardsListViewModel,
+ ),
_ShopTab(cardsListViewModel: widget._cardsListViewModel)
]),
)
@@ -258,10 +250,9 @@ class _TrailingIcon extends StatelessWidget {
}
class _MyCardsTab extends StatefulWidget {
- const _MyCardsTab({required this.cardsListViewModel, required this.currentTheme});
+ const _MyCardsTab({required this.cardsListViewModel});
final CakePayCardsListViewModel cardsListViewModel;
- final MaterialThemeBase currentTheme;
@override
State<_MyCardsTab> createState() => _MyCardsTabState();
@@ -322,18 +313,20 @@ class _MyCardsTabState extends State<_MyCardsTab> {
logoUrl: card.cardImageUrl,
title: card.name,
subTitle: '\$100',
- onTap: () => _showCardInfoBottomSheet(context, card, widget.currentTheme),
+ onTap: () => _showCardInfoBottomSheet(context, card),
);
},
),
],
);
- return showThumb ? Scrollbar(
- key: ValueKey('cake_pay_my_cards_tab_scrollbar_key'),
- thumbVisibility: true,
- trackVisibility: true,
- child: userCardsList,
- ) : userCardsList;
+ return showThumb
+ ? Scrollbar(
+ key: ValueKey('cake_pay_my_cards_tab_scrollbar_key'),
+ thumbVisibility: true,
+ trackVisibility: true,
+ child: userCardsList,
+ )
+ : userCardsList;
}),
),
],
@@ -342,8 +335,7 @@ class _MyCardsTabState extends State<_MyCardsTab> {
}
}
-Future<void> _showCardInfoBottomSheet(
- BuildContext context, CakePayCard card, MaterialThemeBase currentTheme) async {
+Future<void> _showCardInfoBottomSheet(BuildContext context, CakePayCard card) async {
bool isReloadable = false; // TODO: replace with real logic
if (card.name.toLowerCase().contains('prepaid')) {
isReloadable = true;
@@ -360,7 +352,6 @@ Future<void> _showCardInfoBottomSheet(
titleText: 'Reloadable Card',
balance: '100 USD',
howToUse: card.howToUse,
- currentTheme: currentTheme,
footerType: FooterType.doubleActionButton,
applyBoxShadow: true,
contentImage: card.cardImageUrl,
@@ -376,7 +367,6 @@ Future<void> _showCardInfoBottomSheet(
titleText: card.name,
balance: '500 USD',
howToUse: card.howToUse,
- currentTheme: currentTheme,
footerType: FooterType.singleActionButton,
applyBoxShadow: true,
contentImage: card.cardImageUrl,
@@ -400,7 +390,6 @@ class _ShopTab extends StatefulWidget {
class _ShopTabState extends State<_ShopTab> {
late final ScrollController _scroll;
-
@override
void initState() {
super.initState();
@@ -466,8 +455,7 @@ class _ShopTabState extends State<_ShopTab> {
return const _Loading();
}
- if (vendors.isEmpty)
- return Center(child: Text(S.of(context).no_cards_found));
+ if (vendors.isEmpty) return Center(child: Text(S.of(context).no_cards_found));
final loadingMore = viewModel.isLoadingNextPage;
final showThumb = vendors.length > 3;
diff --git a/lib/di.dart b/lib/di.dart
index 61d478a..3587d17 100644
--- a/lib/di.dart
+++ b/lib/di.dart
@@ -1169,7 +1169,6 @@ Future<void> setup({
getIt.registerFactoryParam<SwapConfirmationBottomSheet, PaymentFlowResult, void>(
(paymentFlowResult, _) => SwapConfirmationBottomSheet(
paymentFlowResult: paymentFlowResult,
- currentTheme: getIt.get<AppStore>().themeStore.currentTheme,
exchangeViewModel: getIt.get<ExchangeViewModel>(),
authService: getIt.get<AuthService>(),
),
@@ -1177,7 +1176,6 @@ Future<void> setup({
getIt.registerFactory<SwapDetailsBottomSheet>(
() => SwapDetailsBottomSheet(
- currentTheme: getIt.get<AppStore>().themeStore.currentTheme,
exchangeTradeViewModel: getIt.get<ExchangeTradeViewModel>(),
),
);
diff --git a/lib/entities/preferences_key.dart b/lib/entities/preferences_key.dart
index 36022a9..b607ce7 100644
--- a/lib/entities/preferences_key.dart
+++ b/lib/entities/preferences_key.dart
@@ -37,6 +37,9 @@ class PreferencesKey {
static const exchangeStatusKey = 'exchange_status';
static const currentTheme = 'current_theme';
static const themeMode = 'theme_mode';
+ static const blackThemeOled = 'black_theme_oled_enabled';
+ static const savedDarkTheme = 'saved_dark_theme';
+ static const savedLightTheme = 'saved_light_theme';
static const displayActionListModeKey = 'display_list_mode';
static const currentPinLength = 'current_pin_length';
static const currentLanguageCode = 'language_code';
diff --git a/lib/nostr/nostr_api.dart b/lib/nostr/nostr_api.dart
index be59f0e..8d9164e 100644
--- a/lib/nostr/nostr_api.dart
+++ b/lib/nostr/nostr_api.dart
@@ -29,7 +29,10 @@ class NostrProfileHandler {
}
static Future<UserMetadata?> processRelays(
- BuildContext context, ProfilePointer profile, String nip05Address) async {
+ BuildContext context,
+ ProfilePointer profile,
+ String nip05Address,
+ ) async {
String userDomain = _extractDomain(nip05Address);
const int metaData = 0;
@@ -45,7 +48,8 @@ class NostrProfileHandler {
}
await _showErrorDialog(context, S.of(context).no_relays, S.of(context).no_relay_on_domain);
- String? chosenRelayUrl = await _showRelayChoiceDialog(context, profile.relays ?? []);
+ String? chosenRelayUrl =
+ await _showRelayChoiceDialog(context, profile.relays ?? []);
if (chosenRelayUrl != null) {
final userData = await _fetchInfoFromRelay(chosenRelayUrl, profile.pubkey, [metaData]);
if (userData != null) {
@@ -121,7 +125,10 @@ class NostrProfileHandler {
}
}
- static Future<String?> _showRelayChoiceDialog(BuildContext context, List<String> relays) async {
+ static Future<String?> _showRelayChoiceDialog(
+ BuildContext context,
+ List<String> relays,
+ ) async {
String? selectedRelay;
if (context.mounted) {
diff --git a/lib/src/screens/base_page.dart b/lib/src/screens/base_page.dart
index 149598d..5adf565 100644
--- a/lib/src/screens/base_page.dart
+++ b/lib/src/screens/base_page.dart
@@ -72,7 +72,7 @@ abstract class BasePage extends StatelessWidget {
Widget backButton(BuildContext context) => Icon(
Icons.arrow_back_ios,
- color: pageIconColor(context),
+ color: Theme.of(context).colorScheme.primary,
size: 16,
);
diff --git a/lib/src/screens/buy/buy_sell_page.dart b/lib/src/screens/buy/buy_sell_page.dart
index c14df4d..af29d02 100644
--- a/lib/src/screens/buy/buy_sell_page.dart
+++ b/lib/src/screens/buy/buy_sell_page.dart
@@ -78,11 +78,10 @@ class BuySellPage extends BasePage {
Widget? leading(BuildContext context) {
final _backButton = Icon(
Icons.arrow_back_ios,
- color: Theme.of(context).colorScheme.onSurface,
+ color: Theme.of(context).colorScheme.primary,
size: 16,
);
- final _closeButton =
- buySellViewModel.isDarkTheme ? closeButtonImageDarkTheme : closeButtonImage;
+ final _closeButton = currentTheme.isDark ? closeButtonImageDarkTheme : closeButtonImage;
bool isMobileView = responsiveLayoutUtil.shouldRenderMobileUI;
@@ -211,7 +210,7 @@ class BuySellPage extends BasePage {
borderRadius: 30,
padding: EdgeInsets.symmetric(horizontal: 24, vertical: 8),
leadingIcon: Icons.arrow_forward_ios,
- isDarkTheme: buySellViewModel.isDarkTheme);
+ isDarkTheme: currentTheme.isDark);
}
if (buySellViewModel.paymentMethodState is PaymentMethodFailed) {
return OptionTilePlaceholder(errorText: 'No payment methods available', borderRadius: 30);
@@ -225,7 +224,7 @@ class BuySellPage extends BasePage {
title: selectedPaymentMethod.title,
onPressed: () => _pickPaymentMethod(context),
leadingIcon: Icons.arrow_forward_ios,
- isLightMode: !buySellViewModel.isDarkTheme,
+ isLightMode: !currentTheme.isDark,
borderRadius: 30,
padding: EdgeInsets.symmetric(horizontal: 24, vertical: 8),
titleTextStyle: Theme.of(context).textTheme.titleMedium?.copyWith(
@@ -321,8 +320,8 @@ class BuySellPage extends BasePage {
_cryptoAddressFocus.addListener(() async {
if (!_cryptoAddressFocus.hasFocus && cryptoAddressController.text.isNotEmpty) {
final domain = cryptoAddressController.text;
- buySellViewModel.cryptoCurrencyAddress =
- await fetchParsedAddress(context, domain, buySellViewModel.cryptoCurrency);
+ buySellViewModel.cryptoCurrencyAddress = await fetchParsedAddress(
+ context, domain, buySellViewModel.cryptoCurrency);
}
});
@@ -404,7 +403,7 @@ class BuySellPage extends BasePage {
onCurrencySelected: (currency) => buySellViewModel.changeFiatCurrency(currency: currency),
imageArrow: Image.asset(
'assets/images/arrow_bottom_purple_icon.png',
- color: Theme.of(context).colorScheme.onSurface,
+ color: Theme.of(context).colorScheme.primary,
height: 8,
),
currencyButtonColor: Colors.transparent,
@@ -441,7 +440,7 @@ class BuySellPage extends BasePage {
onCurrencySelected: (currency) => buySellViewModel.changeCryptoCurrency(currency: currency),
imageArrow: Image.asset(
'assets/images/arrow_bottom_cake_green.png',
- color: Theme.of(context).colorScheme.onSurface,
+ color: Theme.of(context).colorScheme.primary,
height: 8,
),
currencyButtonColor: Colors.transparent,
@@ -508,8 +507,12 @@ class BuySellPage extends BasePage {
}
Future<String> fetchParsedAddress(
- BuildContext context, String domain, CryptoCurrency currency) async {
- final parsedAddress = await getIt.get<AddressResolver>().resolve(context, domain, currency);
+ BuildContext context,
+ String domain,
+ CryptoCurrency currency,
+ ) async {
+ final parsedAddress =
+ await getIt.get<AddressResolver>().resolve(context, domain, currency);
final address = await extractAddressFromParsed(context, parsedAddress);
return address;
}
diff --git a/lib/src/screens/connect_device/connect_device_page.dart b/lib/src/screens/connect_device/connect_device_page.dart
index 784a501..7bde274 100644
--- a/lib/src/screens/connect_device/connect_device_page.dart
+++ b/lib/src/screens/connect_device/connect_device_page.dart
@@ -316,7 +316,6 @@ class ConnectDevicePageBodyState extends State<ConnectDevicePageBody> {
isScrollControlled: true,
builder: (BuildContext bottomSheetContext) => InfoStepsBottomSheet(
titleText: S.of(context).how_to_connect,
- currentTheme: widget.currentTheme,
steps: [
InfoStep('${S.of(context).step} 1', S.of(context).connect_hw_info_step_1),
InfoStep('${S.of(context).step} 2', S.of(context).connect_hw_info_step_2),
diff --git a/lib/src/screens/connect_device/monero_hardware_wallet_options_page.dart b/lib/src/screens/connect_device/monero_hardware_wallet_options_page.dart
index d73d910..a129d6f 100644
--- a/lib/src/screens/connect_device/monero_hardware_wallet_options_page.dart
+++ b/lib/src/screens/connect_device/monero_hardware_wallet_options_page.dart
@@ -31,7 +31,7 @@ class _MoneroHardwareWalletOptionsForm extends StatefulWidget {
const _MoneroHardwareWalletOptionsForm(this._walletHardwareRestoreVM);
final WalletHardwareRestoreViewModel _walletHardwareRestoreVM;
-
+
@override
_MoneroHardwareWalletOptionsFormState createState() =>
_MoneroHardwareWalletOptionsFormState(_walletHardwareRestoreVM);
diff --git a/lib/src/screens/connect_device/select_device_manufacturer_page.dart b/lib/src/screens/connect_device/select_device_manufacturer_page.dart
index b1192ac..920e8e7 100644
--- a/lib/src/screens/connect_device/select_device_manufacturer_page.dart
+++ b/lib/src/screens/connect_device/select_device_manufacturer_page.dart
@@ -109,7 +109,6 @@ class SelectDeviceManufacturerPage extends BasePage {
arguments: [manufacturer.hardwareWalletType]);
}
},
- isDarkTheme: currentTheme.isDark,
),
),
),
@@ -127,7 +126,6 @@ class SelectDeviceManufacturerPage extends BasePage {
onPressed: () =>
Fluttertoast.showToast(msg: 'One more tap and it might work'),
// Ester egg
- isDarkTheme: currentTheme.isDark,
isUnavailable: true,
),
),
diff --git a/lib/src/screens/connect_device/widgets/manufacturer_option_tile.dart b/lib/src/screens/connect_device/widgets/manufacturer_option_tile.dart
index 6e49ae9..235d70c 100644
--- a/lib/src/screens/connect_device/widgets/manufacturer_option_tile.dart
+++ b/lib/src/screens/connect_device/widgets/manufacturer_option_tile.dart
@@ -1,11 +1,10 @@
-import 'package:cake_wallet/themes/utils/custom_theme_colors.dart';
+import 'package:cake_wallet/themes/core/theme_extension.dart';
import 'package:flutter/material.dart';
class ManufacturerOptionTile extends StatelessWidget {
const ManufacturerOptionTile({
required this.onPressed,
required this.image,
- required this.isDarkTheme,
this.tag,
this.isUnavailable = false,
});
@@ -14,7 +13,6 @@ class ManufacturerOptionTile extends StatelessWidget {
final Widget image;
final String? tag;
final bool isUnavailable;
- final bool isDarkTheme;
@override
Widget build(BuildContext context) => GestureDetector(
@@ -28,12 +26,8 @@ class ManufacturerOptionTile extends StatelessWidget {
borderRadius: BorderRadius.circular(12),
gradient: LinearGradient(
colors: [
- isDarkTheme
- ? CustomThemeColors.cardGradientColorPrimaryDark
- : CustomThemeColors.cardGradientColorPrimaryLight,
- isDarkTheme
- ? CustomThemeColors.cardGradientColorSecondaryDark
- : CustomThemeColors.cardGradientColorSecondaryLight,
+ context.customColors.cardGradientColorPrimary,
+ context.customColors.cardGradientColorSecondary,
],
begin: Alignment.topCenter,
end: Alignment.bottomCenter,
diff --git a/lib/src/screens/contact/contact_page.dart b/lib/src/screens/contact/contact_page.dart
index 2b54736..1cc030f 100644
--- a/lib/src/screens/contact/contact_page.dart
+++ b/lib/src/screens/contact/contact_page.dart
@@ -144,13 +144,14 @@ class ContactPage extends BasePage {
void _presentCurrencyPicker(BuildContext context) {
showPopUp<void>(
builder: (_) => CurrencyPicker(
- selectedAtIndex: contactViewModel.currency != null
- ? contactViewModel.currencies.indexOf(contactViewModel.currency!)
- : -1,
- items: contactViewModel.currencies,
- title: S.of(context).please_select,
- hintText: S.of(context).search_currency,
- onItemSelected: (Currency item) => contactViewModel.currency = item as CryptoCurrency),
+ selectedAtIndex: contactViewModel.currency != null
+ ? contactViewModel.currencies.indexOf(contactViewModel.currency!)
+ : -1,
+ items: contactViewModel.currencies,
+ title: S.of(context).please_select,
+ hintText: S.of(context).search_currency,
+ onItemSelected: (Currency item) => contactViewModel.currency = item as CryptoCurrency,
+ ),
context: context,
);
}
diff --git a/lib/src/screens/dashboard/dashboard_page.dart b/lib/src/screens/dashboard/dashboard_page.dart
index 98cb2f2..107024a 100644
--- a/lib/src/screens/dashboard/dashboard_page.dart
+++ b/lib/src/screens/dashboard/dashboard_page.dart
@@ -174,7 +174,7 @@ class _DashboardPageView extends BasePage {
label: S.of(context).wallet_menu,
child: SvgPicture.asset(
'assets/images/menu.svg',
- color: Theme.of(context).colorScheme.onSurface,
+ color: Theme.of(context).colorScheme.primary,
),
),
),
@@ -262,7 +262,6 @@ class _DashboardPageView extends BasePage {
),
NavigationDock(
dashboardViewModel: dashboardViewModel,
- currentTheme: currentTheme,
)
],
),
diff --git a/lib/src/screens/dashboard/desktop_widgets/desktop_wallet_selection_dropdown.dart b/lib/src/screens/dashboard/desktop_widgets/desktop_wallet_selection_dropdown.dart
index 74e7570..a83f212 100644
--- a/lib/src/screens/dashboard/desktop_widgets/desktop_wallet_selection_dropdown.dart
+++ b/lib/src/screens/dashboard/desktop_widgets/desktop_wallet_selection_dropdown.dart
@@ -30,22 +30,22 @@ class DesktopWalletSelectionDropDown extends StatefulWidget {
}
class _DesktopWalletSelectionDropDownState extends State<DesktopWalletSelectionDropDown> {
- final moneroIcon = Image.asset('assets/images/monero_logo.png', height: 24, width: 24);
- final bitcoinIcon = Image.asset('assets/images/bitcoin.png', height: 24, width: 24);
+ final moneroIcon = Image.asset('assets/images/crypto/monero.png', height: 24, width: 24);
+ final bitcoinIcon = Image.asset('assets/images/crypto/bitcoin.png', height: 24, width: 24);
final tBitcoinIcon = Image.asset('assets/images/tbtc.png', height: 24, width: 24);
- final litecoinIcon = Image.asset('assets/images/litecoin_icon.png', height: 24, width: 24);
+ final litecoinIcon = Image.asset('assets/images/crypto/litecoin.png', height: 24, width: 24);
final havenIcon = Image.asset('assets/images/haven_logo.png', height: 24, width: 24);
- final ethereumIcon = Image.asset('assets/images/eth_icon.png', height: 24, width: 24);
- final polygonIcon = Image.asset('assets/images/matic_icon.png', height: 24, width: 24);
- final bitcoinCashIcon = Image.asset('assets/images/bch_icon.png', height: 24, width: 24);
- final nanoIcon = Image.asset('assets/images/nano_icon.png', height: 24, width: 24);
- final bananoIcon = Image.asset('assets/images/nano_icon.png', height: 24, width: 24);
- final solanaIcon = Image.asset('assets/images/sol_icon.png', height: 24, width: 24);
- final tronIcon = Image.asset('assets/images/trx_icon.png', height: 24, width: 24);
- final wowneroIcon = Image.asset('assets/images/wownero_icon.png', height: 24, width: 24);
- final zanoIcon = Image.asset('assets/images/zano_icon.png', height: 24, width: 24);
- final decredIcon = Image.asset('assets/images/decred_icon.png', height: 24, width: 24);
- final dogeIcon = Image.asset('assets/images/doge_icon.png', height: 24, width: 24);
+ final ethereumIcon = Image.asset('assets/images/crypto/ethereum.png', height: 24, width: 24);
+ final polygonIcon = Image.asset('assets/images/crypto/polygon.png', height: 24, width: 24);
+ final bitcoinCashIcon = Image.asset('assets/images/crypto/bitcoin-cash.png', height: 24, width: 24);
+ final nanoIcon = Image.asset('assets/images/crypto/nano.png', height: 24, width: 24);
+ final bananoIcon = Image.asset('assets/images/crypto/nano.png', height: 24, width: 24);
+ final solanaIcon = Image.asset('assets/images/crypto/solana.png', height: 24, width: 24);
+ final tronIcon = Image.asset('assets/images/crypto/tron.png', height: 24, width: 24);
+ final wowneroIcon = Image.asset('assets/images/crypto/wownero.png', height: 24, width: 24);
+ final zanoIcon = Image.asset('assets/images/crypto/zano.png', height: 24, width: 24);
+ final decredIcon = Image.asset('assets/images/crypto/decred.png', height: 24, width: 24);
+ final dogeIcon = Image.asset('assets/images/crypto/dogecoin.png', height: 24, width: 24);
final nonWalletTypeIcon = Image.asset('assets/images/close.png', height: 24, width: 24);
Image _newWalletImage(BuildContext context) => Image.asset(
diff --git a/lib/src/screens/dashboard/edit_token_page.dart b/lib/src/screens/dashboard/edit_token_page.dart
index 777519f..7399ac0 100644
--- a/lib/src/screens/dashboard/edit_token_page.dart
+++ b/lib/src/screens/dashboard/edit_token_page.dart
@@ -10,8 +10,7 @@ import 'package:cake_wallet/src/widgets/checkbox_widget.dart';
import 'package:cake_wallet/src/widgets/primary_button.dart';
import 'package:cake_wallet/src/widgets/scollable_with_bottom_section.dart';
import 'package:cake_wallet/src/widgets/warning_box_widget.dart';
-import 'package:cake_wallet/themes/core/material_base_theme.dart';
-import 'package:cake_wallet/themes/utils/custom_theme_colors.dart';
+import 'package:cake_wallet/themes/core/theme_extension.dart';
import 'package:cake_wallet/utils/show_pop_up.dart';
import 'package:cake_wallet/view_model/dashboard/home_settings_view_model.dart';
import 'package:cw_core/crypto_currency.dart';
@@ -44,7 +43,6 @@ class EditTokenPage extends BasePage {
homeSettingsViewModel: homeSettingsViewModel,
token: token,
initialContractAddress: initialContractAddress,
- currentTheme: currentTheme,
);
}
}
@@ -55,13 +53,11 @@ class EditTokenPageBody extends StatefulWidget {
required this.homeSettingsViewModel,
this.token,
this.initialContractAddress,
- required this.currentTheme,
}) : super(key: key);
final HomeSettingsViewModel homeSettingsViewModel;
final CryptoCurrency? token;
final String? initialContractAddress;
- final MaterialThemeBase currentTheme;
@override
State<EditTokenPageBody> createState() => _EditTokenPageBodyState();
@@ -128,8 +124,7 @@ class _EditTokenPageBodyState extends State<EditTokenPageBody> {
void _checkIfTokenIsVerified(String? contractAddress) {
if (contractAddress == null) return;
- final isVerified =
- widget.homeSettingsViewModel.checkIfTokenIsWhitelisted(contractAddress);
+ final isVerified = widget.homeSettingsViewModel.checkIfTokenIsWhitelisted(contractAddress);
if (!mounted) return;
setState(() {
@@ -151,13 +146,10 @@ class _EditTokenPageBodyState extends State<EditTokenPageBody> {
WarningBox(
padding: EdgeInsets.all(16),
content: S.of(context).add_token_warning,
- currentTheme: widget.currentTheme,
showBorder: false,
textWeight: FontWeight.w500,
textAlign: TextAlign.start,
- textColor: widget.currentTheme.isDark
- ? CustomThemeColors.warningOutlineColorDark
- : CustomThemeColors.warningOutlineColorLight,
+ textColor: context.customColors.warningOutlineColor,
iconSize: 22,
iconSpacing: 16,
),
@@ -443,12 +435,9 @@ class _EditTokenPageBodyState extends State<EditTokenPageBody> {
? WarningBox(
padding: EdgeInsets.all(16),
content: S.of(context).tokens_strong_warning,
- currentTheme: widget.currentTheme,
showBorder: false,
textWeight: FontWeight.w500,
- textColor: widget.currentTheme.isDark
- ? CustomThemeColors.warningOutlineColorDark
- : CustomThemeColors.warningOutlineColorLight,
+ textColor: context.customColors.warningOutlineColor,
showIcon: false,
)
: Text(
diff --git a/lib/src/screens/dashboard/pages/address_page.dart b/lib/src/screens/dashboard/pages/address_page.dart
index 77ec843..c7e5c87 100644
--- a/lib/src/screens/dashboard/pages/address_page.dart
+++ b/lib/src/screens/dashboard/pages/address_page.dart
@@ -60,7 +60,7 @@ class AddressPage extends BasePage {
Widget? leading(BuildContext context) {
final _backButton = Icon(
Icons.arrow_back_ios,
- color: titleColor(context),
+ color: Theme.of(context).colorScheme.primary,
size: 16,
);
final _closeButton = currentTheme.isDark ? closeButtonImageDarkTheme : closeButtonImage;
@@ -114,7 +114,7 @@ class AddressPage extends BasePage {
context: context,
);
},
- icon: Icon(Icons.share, size: 20, color: pageIconColor(context)),
+ icon: Icon(Icons.share, size: 20, color: Theme.of(context).colorScheme.primary),
),
),
);
@@ -150,7 +150,6 @@ class AddressPage extends BasePage {
addressListViewModel: addressListViewModel,
amountTextFieldFocusNode: _cryptoAmountFocus,
amountController: _amountController,
- currentTheme: dashboardViewModel.appStore.themeStore.currentTheme,
),
),
),
diff --git a/lib/src/screens/dashboard/pages/balance/balance_row_widget.dart b/lib/src/screens/dashboard/pages/balance/balance_row_widget.dart
index 2884293..766914f 100644
--- a/lib/src/screens/dashboard/pages/balance/balance_row_widget.dart
+++ b/lib/src/screens/dashboard/pages/balance/balance_row_widget.dart
@@ -6,7 +6,7 @@ import 'package:cake_wallet/generated/i18n.dart';
import 'package:cake_wallet/routes.dart';
import 'package:cake_wallet/src/screens/exchange_trade/information_page.dart';
import 'package:cake_wallet/src/widgets/cake_image_widget.dart';
-import 'package:cake_wallet/themes/utils/custom_theme_colors.dart';
+import 'package:cake_wallet/themes/core/theme_extension.dart';
import 'package:cake_wallet/utils/payment_request.dart';
import 'package:cake_wallet/utils/show_pop_up.dart';
import 'package:cake_wallet/view_model/dashboard/dashboard_view_model.dart';
@@ -71,22 +71,20 @@ class BalanceRowWidget extends StatelessWidget {
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(15.0),
gradient: LinearGradient(
- colors: [
- dashboardViewModel.isDarkTheme
- ? CustomThemeColors.cardGradientColorPrimaryDark
- : CustomThemeColors.cardGradientColorPrimaryLight,
- dashboardViewModel.isDarkTheme
- ? CustomThemeColors.cardGradientColorSecondaryDark
- : CustomThemeColors.cardGradientColorSecondaryLight,
- ],
- begin: Alignment.topCenter,
- end: Alignment.bottomCenter,
- ),
+ colors: [
+ context.customColors.cardGradientColorPrimary,
+ context.customColors.cardGradientColorSecondary,
+ ],
+ begin: Alignment.topCenter,
+ end: Alignment.bottomCenter,
+ ),
),
child: TextButton(
onPressed: _showToast,
onLongPress: () => dashboardViewModel.balanceViewModel.switchBalanceValue(),
style: TextButton.styleFrom(
+ side: BorderSide(
+ width: 1.25, color: Theme.of(context).colorScheme.surfaceContainerHigh),
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(15)),
),
child: Container(
@@ -328,12 +326,8 @@ class BalanceRowWidget extends StatelessWidget {
borderRadius: BorderRadius.circular(15),
gradient: LinearGradient(
colors: [
- dashboardViewModel.isDarkTheme
- ? CustomThemeColors.cardGradientColorPrimaryDark
- : CustomThemeColors.cardGradientColorPrimaryLight,
- dashboardViewModel.isDarkTheme
- ? CustomThemeColors.cardGradientColorSecondaryDark
- : CustomThemeColors.cardGradientColorSecondaryLight,
+ context.customColors.cardGradientColorPrimary,
+ context.customColors.cardGradientColorSecondary,
],
begin: Alignment.topCenter,
end: Alignment.bottomCenter,
@@ -531,7 +525,8 @@ class BalanceRowWidget extends StatelessWidget {
style: OutlinedButton.styleFrom(
backgroundColor: Theme.of(context).colorScheme.primary,
side: BorderSide(
- color: Theme.of(context).colorScheme.outlineVariant.withAlpha(0),
+ color:
+ Theme.of(context).colorScheme.outlineVariant.withAlpha(0),
width: 0,
),
shape: RoundedRectangleBorder(
@@ -588,7 +583,8 @@ class BalanceRowWidget extends StatelessWidget {
style: OutlinedButton.styleFrom(
backgroundColor: Theme.of(context).colorScheme.surface,
side: BorderSide(
- color: Theme.of(context).colorScheme.outlineVariant.withAlpha(0),
+ color:
+ Theme.of(context).colorScheme.outlineVariant.withAlpha(0),
width: 0,
),
shape: RoundedRectangleBorder(
diff --git a/lib/src/screens/dashboard/pages/balance/crypto_balance_widget.dart b/lib/src/screens/dashboard/pages/balance/crypto_balance_widget.dart
index fc526aa..7ff65a7 100644
--- a/lib/src/screens/dashboard/pages/balance/crypto_balance_widget.dart
+++ b/lib/src/screens/dashboard/pages/balance/crypto_balance_widget.dart
@@ -9,6 +9,7 @@ import 'package:cake_wallet/src/widgets/alert_with_two_actions.dart';
import 'package:cake_wallet/src/widgets/dashboard_card_widget.dart';
import 'package:cake_wallet/src/widgets/introducing_card.dart';
import 'package:cake_wallet/src/widgets/standard_switch.dart';
+import 'package:cake_wallet/themes/core/theme_extension.dart';
import 'package:cake_wallet/utils/feature_flag.dart';
import 'package:cake_wallet/utils/show_pop_up.dart';
import 'package:cake_wallet/view_model/dashboard/dashboard_view_model.dart';
@@ -57,7 +58,6 @@ class CryptoBalanceWidget extends StatelessWidget {
return Padding(
padding: const EdgeInsets.fromLTRB(16, 0, 16, 16),
child: DashBoardRoundedCardWidget(
- isDarkTheme: dashboardViewModel.isDarkTheme,
title: "Invalid monero bindings",
subTitle: dashboardViewModel.getMoneroError.toString(),
),
@@ -72,7 +72,6 @@ class CryptoBalanceWidget extends StatelessWidget {
return Padding(
padding: const EdgeInsets.fromLTRB(16, 0, 16, 16),
child: DashBoardRoundedCardWidget(
- isDarkTheme: dashboardViewModel.isDarkTheme,
title: "Invalid wownero bindings",
subTitle: dashboardViewModel.getWowneroError.toString(),
),
@@ -157,7 +156,6 @@ class CryptoBalanceWidget extends StatelessWidget {
return Padding(
padding: const EdgeInsets.fromLTRB(16, 0, 16, 8),
child: DashBoardRoundedCardWidget(
- isDarkTheme: dashboardViewModel.isDarkTheme,
title: S.of(context).rep_warning,
subTitle: S.of(context).rep_warning_sub,
onTap: () => Navigator.of(context).pushNamed(Routes.changeRep),
@@ -220,7 +218,6 @@ class CryptoBalanceWidget extends StatelessWidget {
Padding(
padding: const EdgeInsets.fromLTRB(16, 0, 16, 8),
child: DashBoardRoundedCardWidget(
- isDarkTheme: dashboardViewModel.isDarkTheme,
customBorder: 30,
title: "This wallet has encountered an issue",
subTitle: "Here are the things that you should note:\n - " +
@@ -233,7 +230,6 @@ class CryptoBalanceWidget extends StatelessWidget {
Padding(
padding: const EdgeInsets.fromLTRB(16, 0, 16, 0),
child: DashBoardRoundedCardWidget(
- isDarkTheme: dashboardViewModel.isDarkTheme,
shadowBlur: dashboardViewModel.getShadowBlur(),
shadowSpread: dashboardViewModel.getShadowSpread(),
marginV: 0,
@@ -285,7 +281,7 @@ class CryptoBalanceWidget extends StatelessWidget {
],
),
onTap: () => _toggleSilentPaymentsScanning(context),
- image: !dashboardViewModel.appStore.themeStore.currentTheme.isDark
+ image: !context.currentTheme.isDark
? Image.asset(btcLockLight, height: 48)
: Image.asset(btcLockDark, height: 48),
),
@@ -296,7 +292,6 @@ class CryptoBalanceWidget extends StatelessWidget {
Padding(
padding: const EdgeInsets.fromLTRB(16, 0, 16, 8),
child: InfoCard(
- isDarkTheme: dashboardViewModel.isDarkTheme,
title: S.of(context).litecoin_mweb,
description: S.of(context).litecoin_mweb_description,
leftButtonTitle: S.of(context).litecoin_mweb_dismiss,
@@ -327,7 +322,6 @@ class CryptoBalanceWidget extends StatelessWidget {
Padding(
padding: const EdgeInsets.fromLTRB(16, 0, 16, 8),
child: InfoCard(
- isDarkTheme: dashboardViewModel.isDarkTheme,
title: S.of(context).synchronizing,
description: S.of(context).decred_info_card_details,
image: 'assets/images/dcr_icon.png',
@@ -344,7 +338,6 @@ class CryptoBalanceWidget extends StatelessWidget {
Padding(
padding: const EdgeInsets.fromLTRB(16, 0, 16, 8),
child: InfoCard(
- isDarkTheme: dashboardViewModel.isDarkTheme,
title: "Payjoin",
description: S.of(context).payjoin_card_content,
hintWidget: GestureDetector(
diff --git a/lib/src/screens/dashboard/pages/cake_features_page.dart b/lib/src/screens/dashboard/pages/cake_features_page.dart
index 29066bc..b2b361d 100644
--- a/lib/src/screens/dashboard/pages/cake_features_page.dart
+++ b/lib/src/screens/dashboard/pages/cake_features_page.dart
@@ -40,7 +40,6 @@ class CakeFeaturesPage extends StatelessWidget {
children: <Widget>[
SizedBox(height: 2),
DashBoardRoundedCardWidget(
- isDarkTheme: dashboardViewModel.isDarkTheme,
shadowBlur: dashboardViewModel.getShadowBlur(),
shadowSpread: dashboardViewModel.getShadowSpread(),
onTap: () {
@@ -53,16 +52,15 @@ class CakeFeaturesPage extends StatelessWidget {
title: 'Cake Pay',
subTitle: S.of(context).cake_pay_subtitle,
image: Image.asset(
- 'assets/images/cards.png',
- height: 100,
- width: 115,
+ 'assets/images/cakepay.png',
+ height: 74,
+ width: 70,
fit: BoxFit.cover,
),
),
Observer(builder: (_) {
if (dashboardViewModel.type == WalletType.ethereum) {
return DashBoardRoundedCardWidget(
- isDarkTheme: dashboardViewModel.isDarkTheme,
shadowBlur: dashboardViewModel.getShadowBlur(),
shadowSpread: dashboardViewModel.getShadowSpread(),
onTap: () => Navigator.of(context).pushNamed(Routes.dEuroSavings),
@@ -80,7 +78,6 @@ class CakeFeaturesPage extends StatelessWidget {
return const SizedBox();
}),
DashBoardRoundedCardWidget(
- isDarkTheme: dashboardViewModel.isDarkTheme,
shadowBlur: dashboardViewModel.getShadowBlur(),
shadowSpread: dashboardViewModel.getShadowSpread(),
onTap: () => _launchUrl("cake.nano-gpt.com"),
diff --git a/lib/src/screens/dashboard/pages/navigation_dock.dart b/lib/src/screens/dashboard/pages/navigation_dock.dart
index e21e326..d3afd4e 100644
--- a/lib/src/screens/dashboard/pages/navigation_dock.dart
+++ b/lib/src/screens/dashboard/pages/navigation_dock.dart
@@ -1,7 +1,6 @@
import 'dart:ui';
import 'package:cake_wallet/entities/main_actions.dart';
-import 'package:cake_wallet/themes/core/material_base_theme.dart';
-import 'package:cake_wallet/themes/utils/custom_theme_colors.dart';
+import 'package:cake_wallet/themes/core/theme_extension.dart';
import 'package:flutter/material.dart';
import 'package:cake_wallet/view_model/dashboard/dashboard_view_model.dart';
import 'package:cake_wallet/src/screens/dashboard/widgets/action_button.dart';
@@ -10,11 +9,9 @@ import 'package:flutter_mobx/flutter_mobx.dart';
class NavigationDock extends StatelessWidget {
const NavigationDock({
required this.dashboardViewModel,
- required this.currentTheme,
});
final DashboardViewModel dashboardViewModel;
- final MaterialThemeBase currentTheme;
@override
Widget build(BuildContext context) {
@@ -24,13 +21,15 @@ class NavigationDock extends StatelessWidget {
return Container(
height: 150,
alignment: Alignment.bottomCenter,
- decoration: dashboardViewModel.settingsStore.backgroundImage.isEmpty ? BoxDecoration(
- gradient: LinearGradient(
- begin: Alignment.topCenter,
- end: Alignment.bottomCenter,
- colors: _getColors(context, !currentTheme.isDark),
- ),
- ) : null,
+ decoration: dashboardViewModel.settingsStore.backgroundImage.isEmpty
+ ? BoxDecoration(
+ gradient: LinearGradient(
+ begin: Alignment.topCenter,
+ end: Alignment.bottomCenter,
+ colors: _getColors(context),
+ ),
+ )
+ : null,
//color: Colors.transparent,
child: Container(
decoration: BoxDecoration(
@@ -38,7 +37,7 @@ class NavigationDock extends StatelessWidget {
gradient: LinearGradient(
begin: Alignment.topCenter,
end: Alignment.bottomCenter,
- colors: _getColors(context, !currentTheme.isDark),
+ colors: _getColors(context),
),
),
margin: const EdgeInsets.only(left: 8, right: 8, bottom: 16),
@@ -95,25 +94,15 @@ class NavigationDock extends StatelessWidget {
);
}
- List<Color> _getColors(BuildContext context, bool isBright) {
- return isBright
- ? <Color>[
- CustomThemeColors.backgroundGradientColorLight.withAlpha(5),
- CustomThemeColors.backgroundGradientColorLight.withAlpha(50),
- CustomThemeColors.backgroundGradientColorLight.withAlpha(125),
- CustomThemeColors.backgroundGradientColorLight.withAlpha(150),
- CustomThemeColors.backgroundGradientColorLight.withAlpha(200),
- CustomThemeColors.backgroundGradientColorLight,
- CustomThemeColors.backgroundGradientColorLight
- ]
- : <Color>[
- CustomThemeColors.backgroundGradientColorDark.withAlpha(5),
- CustomThemeColors.backgroundGradientColorDark.withAlpha(50),
- CustomThemeColors.backgroundGradientColorDark.withAlpha(125),
- CustomThemeColors.backgroundGradientColorDark.withAlpha(150),
- CustomThemeColors.backgroundGradientColorDark.withAlpha(200),
- CustomThemeColors.backgroundGradientColorDark,
- CustomThemeColors.backgroundGradientColorDark
- ];
+ List<Color> _getColors(BuildContext context) {
+ return <Color>[
+ context.customColors.backgroundGradientColor.withAlpha(5),
+ context.customColors.backgroundGradientColor.withAlpha(50),
+ context.customColors.backgroundGradientColor.withAlpha(125),
+ context.customColors.backgroundGradientColor.withAlpha(150),
+ context.customColors.backgroundGradientColor.withAlpha(200),
+ context.customColors.backgroundGradientColor,
+ context.customColors.backgroundGradientColor,
+ ];
}
}
diff --git a/lib/src/screens/dashboard/pages/nft_details_page.dart b/lib/src/screens/dashboard/pages/nft_details_page.dart
index 67139d4..86ed136 100644
--- a/lib/src/screens/dashboard/pages/nft_details_page.dart
+++ b/lib/src/screens/dashboard/pages/nft_details_page.dart
@@ -232,19 +232,19 @@ class _NFTSingleInfoTile extends StatelessWidget {
Text(
infoType,
style: Theme.of(context).textTheme.bodySmall?.copyWith(
- color: Theme.of(context).colorScheme.onSurfaceVariant,
- fontWeight: FontWeight.w500,
- height: 1,
- ),
+ color: Theme.of(context).colorScheme.onSurfaceVariant,
+ fontWeight: FontWeight.w500,
+ height: 1,
+ ),
),
const SizedBox(height: 8),
Text(
infoValue,
style: Theme.of(context).textTheme.titleMedium?.copyWith(
- fontWeight: FontWeight.w600,
- color: Theme.of(context).colorScheme.onSurface,
- height: 1,
- ),
+ fontWeight: FontWeight.w600,
+ color: Theme.of(context).colorScheme.onSurface,
+ height: 1,
+ ),
),
],
),
diff --git a/lib/src/screens/dashboard/pages/transactions_page.dart b/lib/src/screens/dashboard/pages/transactions_page.dart
index 6afd2f6..85ffbcb 100644
--- a/lib/src/screens/dashboard/pages/transactions_page.dart
+++ b/lib/src/screens/dashboard/pages/transactions_page.dart
@@ -49,7 +49,6 @@ class TransactionsPage extends StatelessWidget {
final status = dashboardViewModel.status;
if (status is SyncingSyncStatus) {
return DashBoardRoundedCardWidget(
- isDarkTheme: dashboardViewModel.isDarkTheme,
key: ValueKey('transactions_page_syncing_alert_card_key'),
onTap: () {
try {
diff --git a/lib/src/screens/dashboard/widgets/home_screen_account_widget.dart b/lib/src/screens/dashboard/widgets/home_screen_account_widget.dart
index e54aa83..55572d5 100644
--- a/lib/src/screens/dashboard/widgets/home_screen_account_widget.dart
+++ b/lib/src/screens/dashboard/widgets/home_screen_account_widget.dart
@@ -12,14 +12,12 @@ class HomeScreenAccountWidget extends StatelessWidget {
@override
Widget build(BuildContext context) {
return GestureDetector(
- onTap: () async {
- await showPopUp<void>(
- context: context,
- builder: (_) => getIt.get<MoneroAccountListPage>());
- },
+ onTap: () async {
+ await showPopUp<void>(context: context, builder: (_) => getIt.get<MoneroAccountListPage>());
+ },
behavior: HitTestBehavior.opaque,
child: Padding(
- padding: EdgeInsets.only(top: 25, bottom: 25, left: 25, right: 0),
+ padding: EdgeInsets.all(25.0),
child: Row(
mainAxisSize: MainAxisSize.min,
mainAxisAlignment: MainAxisAlignment.center,
@@ -32,31 +30,36 @@ class HomeScreenAccountWidget extends StatelessWidget {
child: Text(
walletName ?? '',
style: Theme.of(context).textTheme.headlineSmall?.copyWith(
- fontWeight: FontWeight.bold,
- color: Theme.of(context).colorScheme.onSurface,
- ),
+ fontWeight: FontWeight.bold,
+ color: Theme.of(context).colorScheme.onSurface,
+ ),
),
),
SizedBox(
height: 5.0,
),
- Container(
- child: Text(
- accountName ?? '',
- style: Theme.of(context).textTheme.bodyMedium?.copyWith(
- fontWeight: FontWeight.bold,
- color: Theme.of(context).colorScheme.onSurfaceVariant,
+ Row(
+ children: [
+ Padding(padding: EdgeInsets.only(left: 20)),
+ Container(
+ child: Text(
+ accountName ?? '',
+ style: Theme.of(context).textTheme.bodyMedium?.copyWith(
+ fontWeight: FontWeight.bold,
+ color: Theme.of(context).colorScheme.primary,
+ ),
+ ),
),
- ),
+ Container(
+ child: Icon(
+ Icons.keyboard_arrow_down,
+ color: Theme.of(context).colorScheme.primary,
+ ),
+ ),
+ ],
),
],
),
- Container(
- child: Icon(
- Icons.keyboard_arrow_down,
- color: Theme.of(context).colorScheme.onSurfaceVariant,
- ),
- ),
],
),
),
diff --git a/lib/src/screens/dashboard/widgets/info_card.dart b/lib/src/screens/dashboard/widgets/info_card.dart
index cb13d70..42552aa 100644
--- a/lib/src/screens/dashboard/widgets/info_card.dart
+++ b/lib/src/screens/dashboard/widgets/info_card.dart
@@ -8,14 +8,13 @@ class InfoCard extends StatelessWidget {
final String title;
final String description;
final String image;
- final bool isDarkTheme;
final Function() leftButtonAction;
final Function() rightButtonAction;
final Widget? hintWidget;
const InfoCard({
- Key? key,
+ super.key,
required this.title,
required this.description,
required this.leftButtonTitle,
@@ -23,14 +22,12 @@ class InfoCard extends StatelessWidget {
required this.leftButtonAction,
required this.rightButtonAction,
required this.image,
- required this.isDarkTheme,
this.hintWidget,
- }) : super(key: key);
+ });
@override
Widget build(BuildContext context) {
return DashBoardRoundedCardWidget(
- isDarkTheme: isDarkTheme,
marginH: 0,
marginV: 0,
customBorder: 30,
diff --git a/lib/src/screens/dashboard/widgets/menu_widget.dart b/lib/src/screens/dashboard/widgets/menu_widget.dart
index b96f0e4..4302f72 100644
--- a/lib/src/screens/dashboard/widgets/menu_widget.dart
+++ b/lib/src/screens/dashboard/widgets/menu_widget.dart
@@ -24,21 +24,21 @@ class MenuWidgetState extends State<MenuWidget> {
this.tileHeight = 60,
this.fromTopEdge = 50,
this.fromBottomEdge = 25,
- this.moneroIcon = Image.asset('assets/images/monero_menu.png'),
- this.bitcoinIcon = Image.asset('assets/images/bitcoin_menu.png'),
- this.litecoinIcon = Image.asset('assets/images/litecoin_menu.png'),
+ this.moneroIcon = Image.asset('assets/images/crypto/monero.png'),
+ this.bitcoinIcon = Image.asset('assets/images/crypto/bitcoin.png'),
+ this.litecoinIcon = Image.asset('assets/images/crypto/litecoin.png'),
this.havenIcon = Image.asset('assets/images/haven_menu.png'),
- this.ethereumIcon = Image.asset('assets/images/eth_icon.png'),
- this.nanoIcon = Image.asset('assets/images/nano_icon.png'),
- this.bananoIcon = Image.asset('assets/images/nano_icon.png'),
- this.bitcoinCashIcon = Image.asset('assets/images/bch_icon.png'),
- this.polygonIcon = Image.asset('assets/images/matic_icon.png'),
- this.solanaIcon = Image.asset('assets/images/sol_icon.png'),
- this.tronIcon = Image.asset('assets/images/trx_icon.png'),
- this.wowneroIcon = Image.asset('assets/images/wownero_icon.png'),
- this.zanoIcon = Image.asset('assets/images/zano_icon.png'),
- this.decredIcon = Image.asset('assets/images/decred_menu.png'),
- this.dogecoinIcon = Image.asset('assets/images/doge_icon.png');
+ this.ethereumIcon = Image.asset('assets/images/crypto/ethereum.png'),
+ this.nanoIcon = Image.asset('assets/images/crypto/nano.png'),
+ this.bananoIcon = Image.asset('assets/images/crypto/nano.png'),
+ this.bitcoinCashIcon = Image.asset('assets/images/crypto/bitcoin-cash.png'),
+ this.polygonIcon = Image.asset('assets/images/crypto/polygon.png'),
+ this.solanaIcon = Image.asset('assets/images/crypto/solana.png'),
+ this.tronIcon = Image.asset('assets/images/crypto/tron.png'),
+ this.wowneroIcon = Image.asset('assets/images/crypto/wownero.png'),
+ this.zanoIcon = Image.asset('assets/images/crypto/zano.png'),
+ this.decredIcon = Image.asset('assets/images/crypto/decred.png'),
+ this.dogecoinIcon = Image.asset('assets/images/crypto/dogecoin.png');
final largeScreen = 731;
@@ -114,10 +114,8 @@ class MenuWidgetState extends State<MenuWidget> {
}
int itemCount = items.length;
- moneroIcon =
- Image.asset('assets/images/monero_menu.png', color: Theme.of(context).colorScheme.primary);
- bitcoinIcon =
- Image.asset('assets/images/bitcoin_menu.png', color: Theme.of(context).colorScheme.primary);
+ moneroIcon = Image.asset('assets/images/crypto/monero.png');
+ bitcoinIcon = Image.asset('assets/images/crypto/bitcoin.png');
return Row(
mainAxisSize: MainAxisSize.max,
diff --git a/lib/src/screens/dashboard/widgets/present_receive_option_picker.dart b/lib/src/screens/dashboard/widgets/present_receive_option_picker.dart
index 9217db0..8d4ea99 100644
--- a/lib/src/screens/dashboard/widgets/present_receive_option_picker.dart
+++ b/lib/src/screens/dashboard/widgets/present_receive_option_picker.dart
@@ -18,59 +18,65 @@ class PresentReceiveOptionPicker extends StatelessWidget {
Widget build(BuildContext context) {
final arrowBottom = Image.asset(
'assets/images/arrow_bottom_purple_icon.png',
- color: color,
+ color: Theme.of(context).colorScheme.primary,
height: 6,
);
- return TextButton(
- onPressed: () => _showPicker(context),
- style: ButtonStyle(
- padding: WidgetStateProperty.all(EdgeInsets.zero),
- splashFactory: NoSplash.splashFactory,
- foregroundColor: WidgetStateProperty.all(Colors.transparent),
- overlayColor: WidgetStateProperty.all(Colors.transparent),
- ),
- child: Row(
- mainAxisSize: MainAxisSize.min,
- crossAxisAlignment: CrossAxisAlignment.start,
- children: <Widget>[
- Column(
- crossAxisAlignment: CrossAxisAlignment.center,
+ return Padding(
+ padding: EdgeInsets.only(left: 6),
+ child: TextButton(
+ onPressed: () => _showPicker(context),
+ style: ButtonStyle(
+ padding: WidgetStateProperty.all(EdgeInsets.zero),
+ splashFactory: NoSplash.splashFactory,
+ foregroundColor: WidgetStateProperty.all(Colors.transparent),
+ overlayColor: WidgetStateProperty.all(Colors.transparent),
+ ),
+ child: Row(
mainAxisSize: MainAxisSize.min,
+ crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
- Text(
- S.current.receive,
- style: Theme.of(context).textTheme.bodyMedium!.copyWith(
- fontSize: 17.0,
- fontWeight: FontWeight.bold,
- color: color,
- ),
- ),
- Observer(
- builder: (_) => Text(
- receiveOptionViewModel.selectedReceiveOption
- .toString()
- .replaceAll(RegExp(r'silent payments', caseSensitive: false),
- S.current.silent_payments)
- .replaceAll(
- RegExp(r'default', caseSensitive: false), S.current.string_default),
- style: Theme.of(context).textTheme.bodySmall!.copyWith(
- fontSize: 10.0,
- fontWeight: FontWeight.w500,
- color: color,
+ Column(
+ crossAxisAlignment: CrossAxisAlignment.center,
+ mainAxisSize: MainAxisSize.min,
+ children: <Widget>[
+ Text(
+ S.current.receive,
+ style: Theme.of(context).textTheme.bodyMedium!.copyWith(
+ fontSize: 17.0,
+ fontWeight: FontWeight.bold,
+ color: Theme.of(context).colorScheme.onSurface,
+ ),
+ ),
+ Row(
+ children: [
+ Observer(
+ builder: (_) => Text(
+ receiveOptionViewModel.selectedReceiveOption
+ .toString()
+ .replaceAll(RegExp(r'silent payments', caseSensitive: false),
+ S.current.silent_payments)
+ .replaceAll(RegExp(r'default', caseSensitive: false),
+ S.current.string_default),
+ style: Theme.of(context).textTheme.bodySmall!.copyWith(
+ fontSize: 10.0,
+ fontWeight: FontWeight.w500,
+ color: Theme.of(context).colorScheme.onSurfaceVariant,
+ ),
+ ),
),
- ),
+ ],
+ ),
+ ],
+ ),
+ SizedBox(width: 5),
+ Padding(
+ padding: EdgeInsets.only(top: 12),
+ child: arrowBottom,
)
],
),
- SizedBox(width: 5),
- Padding(
- padding: EdgeInsets.only(top: 12),
- child: arrowBottom,
- )
- ],
- ),
- );
+ ));
}
void _showPicker(BuildContext context) async {
diff --git a/lib/src/screens/dashboard/widgets/sync_indicator_icon.dart b/lib/src/screens/dashboard/widgets/sync_indicator_icon.dart
index 238c96d..fda4253 100644
--- a/lib/src/screens/dashboard/widgets/sync_indicator_icon.dart
+++ b/lib/src/screens/dashboard/widgets/sync_indicator_icon.dart
@@ -1,10 +1,14 @@
-import 'package:cake_wallet/themes/utils/custom_theme_colors.dart';
+import 'package:cake_wallet/themes/core/custom_theme_colors.dart';
import 'package:flutter/material.dart';
import 'package:flutter_svg/svg.dart';
class SyncIndicatorIcon extends StatelessWidget {
SyncIndicatorIcon(
- {this.boolMode = true, this.isSynced = false, this.value = waiting, this.size = 6.0, this.showTorIcon = false});
+ {this.boolMode = true,
+ this.isSynced = false,
+ this.value = waiting,
+ this.size = 6.0,
+ this.showTorIcon = false});
final bool boolMode;
final bool isSynced;
@@ -25,9 +29,7 @@ class SyncIndicatorIcon extends StatelessWidget {
Color indicatorColor;
if (boolMode) {
- indicatorColor = isSynced
- ? CustomThemeColors.syncGreen
- : CustomThemeColors.syncYellow;
+ indicatorColor = isSynced ? CustomThemeColors.syncGreen : CustomThemeColors.syncYellow;
} else {
switch (value.toLowerCase()) {
case actionRequired:
@@ -48,14 +50,18 @@ class SyncIndicatorIcon extends StatelessWidget {
return Container(
height: size,
width: size,
- decoration: showTorIcon ? null : BoxDecoration(
- shape: BoxShape.circle,
- color: indicatorColor,
- ),
- child: showTorIcon ? SvgPicture.asset(
- "assets/images/tor.svg",
- color: indicatorColor,
- ) : null,
+ decoration: showTorIcon
+ ? null
+ : BoxDecoration(
+ shape: BoxShape.circle,
+ color: indicatorColor,
+ ),
+ child: showTorIcon
+ ? SvgPicture.asset(
+ "assets/images/tor.svg",
+ color: indicatorColor,
+ )
+ : null,
);
}
}
diff --git a/lib/src/screens/exchange/widgets/exchange_card.dart b/lib/src/screens/exchange/widgets/exchange_card.dart
index 12b4748..15426b6 100644
--- a/lib/src/screens/exchange/widgets/exchange_card.dart
+++ b/lib/src/screens/exchange/widgets/exchange_card.dart
@@ -206,7 +206,7 @@ class ExchangeCardState<T extends Currency> extends State<ExchangeCard<T>> {
style: Theme.of(context).textTheme.titleLarge!.copyWith(
fontSize: 18,
fontWeight: FontWeight.w600,
- color: Theme.of(context).colorScheme.onSurfaceVariant
+ color: Theme.of(context).colorScheme.onSurfaceVariant,
),
)
],
@@ -281,7 +281,7 @@ class ExchangeCardState<T extends Currency> extends State<ExchangeCard<T>> {
S.of(context).refund_address,
style: Theme.of(context).textTheme.bodyMedium!.copyWith(
fontWeight: FontWeight.w500,
- color: Theme.of(context).colorScheme.onSurfaceVariant
+ color: Theme.of(context).colorScheme.onSurfaceVariant,
),
),
)
diff --git a/lib/src/screens/exchange/widgets/mobile_exchange_cards_section.dart b/lib/src/screens/exchange/widgets/mobile_exchange_cards_section.dart
index 4606b21..e7186e0 100644
--- a/lib/src/screens/exchange/widgets/mobile_exchange_cards_section.dart
+++ b/lib/src/screens/exchange/widgets/mobile_exchange_cards_section.dart
@@ -37,7 +37,7 @@ class MobileExchangeCardsSection extends StatelessWidget {
bottomLeft: Radius.circular(24),
bottomRight: Radius.circular(24),
),
- color: Theme.of(context).colorScheme.surfaceContainerHighest,
+ color: Theme.of(context).colorScheme.surfaceContainerHigh,
),
padding: EdgeInsets.fromLTRB(24, 105, 24, 24),
child: Column(
diff --git a/lib/src/screens/exchange/widgets/present_provider_picker.dart b/lib/src/screens/exchange/widgets/present_provider_picker.dart
index f4c21ed..d68aa5d 100644
--- a/lib/src/screens/exchange/widgets/present_provider_picker.dart
+++ b/lib/src/screens/exchange/widgets/present_provider_picker.dart
@@ -15,55 +15,58 @@ class PresentProviderPicker extends StatelessWidget {
Widget build(BuildContext context) {
final arrowBottom = Image.asset(
'assets/images/arrow_bottom_purple_icon.png',
- color: Theme.of(context).colorScheme.onSurface,
+ color: Theme.of(context).colorScheme.primary,
height: 6,
);
- return TextButton(
- onPressed: () => presentProviderPicker(context),
- style: ButtonStyle(
- padding: WidgetStateProperty.all(EdgeInsets.zero),
- splashFactory: NoSplash.splashFactory,
- foregroundColor: WidgetStateProperty.all(Colors.transparent),
- overlayColor: WidgetStateProperty.all(Colors.transparent),
- ),
- child: Row(
- mainAxisSize: MainAxisSize.min,
- crossAxisAlignment: CrossAxisAlignment.start,
- children: <Widget>[
- Column(
- crossAxisAlignment: CrossAxisAlignment.center,
- mainAxisSize: MainAxisSize.min,
- children: <Widget>[
- Text(
- S.of(context).swap,
- style: Theme.of(context).textTheme.bodyMedium?.copyWith(
- fontSize: 16.0,
- fontWeight: FontWeight.w600,
- ),
- ),
- Observer(
- builder: (_) => Text(
- exchangeViewModel.selectedProviders.isEmpty
- ? S.of(context).choose_one
- : exchangeViewModel.selectedProviders.length > 1
- ? S.of(context).automatic
- : exchangeViewModel.selectedProviders.first.title,
- style: Theme.of(context).textTheme.bodySmall?.copyWith(
- fontSize: 10.0,
- fontWeight: FontWeight.w500,
- color: Theme.of(context).colorScheme.onSurfaceVariant,
+ return Padding(
+ padding: EdgeInsets.only(left: 10),
+ child: TextButton(
+ onPressed: () => presentProviderPicker(context),
+ style: ButtonStyle(
+ padding: WidgetStateProperty.all(EdgeInsets.zero),
+ splashFactory: NoSplash.splashFactory,
+ foregroundColor: WidgetStateProperty.all(Colors.transparent),
+ overlayColor: WidgetStateProperty.all(Colors.transparent),
+ ),
+ child: Row(
+ mainAxisSize: MainAxisSize.min,
+ crossAxisAlignment: CrossAxisAlignment.start,
+ children: <Widget>[
+ Column(
+ crossAxisAlignment: CrossAxisAlignment.center,
+ mainAxisSize: MainAxisSize.min,
+ children: <Widget>[
+ Text(
+ S.of(context).swap,
+ style: Theme.of(context).textTheme.bodyMedium?.copyWith(
+ fontSize: 16.0,
+ fontWeight: FontWeight.w600,
),
),
- )
- ],
- ),
- SizedBox(width: 5),
- Padding(
- padding: EdgeInsets.only(top: 12),
- child: arrowBottom,
- )
- ],
+ Observer(
+ builder: (_) => Text(
+ exchangeViewModel.selectedProviders.isEmpty
+ ? S.of(context).choose_one
+ : exchangeViewModel.selectedProviders.length > 1
+ ? S.of(context).automatic
+ : exchangeViewModel.selectedProviders.first.title,
+ style: Theme.of(context).textTheme.bodySmall?.copyWith(
+ fontSize: 10.0,
+ fontWeight: FontWeight.w500,
+ color: Theme.of(context).colorScheme.onSurfaceVariant,
+ ),
+ ),
+ )
+ ],
+ ),
+ SizedBox(width: 5),
+ Padding(
+ padding: EdgeInsets.only(top: 12),
+ child: arrowBottom,
+ )
+ ],
+ ),
),
);
}
diff --git a/lib/src/screens/exchange_trade/exchange_trade_external_send_page.dart b/lib/src/screens/exchange_trade/exchange_trade_external_send_page.dart
index 610d67e..ba60bdb 100644
--- a/lib/src/screens/exchange_trade/exchange_trade_external_send_page.dart
+++ b/lib/src/screens/exchange_trade/exchange_trade_external_send_page.dart
@@ -114,7 +114,6 @@ class ExchangeTradeExternalSendPage extends BasePage {
(item) => TradeItemRowWidget(
key: ValueKey(
'exchange_trade_external_send_page_send_item_${item.title}_key'),
- currentTheme: currentTheme,
title: item.title,
value: item.data,
isCopied: true,
diff --git a/lib/src/screens/exchange_trade/exchange_trade_page.dart b/lib/src/screens/exchange_trade/exchange_trade_page.dart
index 1e8e74a..840fbcf 100644
--- a/lib/src/screens/exchange_trade/exchange_trade_page.dart
+++ b/lib/src/screens/exchange_trade/exchange_trade_page.dart
@@ -6,7 +6,6 @@ import 'package:cake_wallet/src/screens/exchange_trade/widgets/exchange_trade_ca
import 'package:cake_wallet/src/widgets/bottom_sheet/base_bottom_sheet_widget.dart';
import 'package:cake_wallet/src/widgets/bottom_sheet/confirm_sending_bottom_sheet_widget.dart';
import 'package:cake_wallet/src/widgets/bottom_sheet/info_bottom_sheet_widget.dart';
-import 'package:cake_wallet/themes/core/material_base_theme.dart';
import 'package:cake_wallet/utils/request_review_handler.dart';
import 'package:cake_wallet/utils/responsive_layout_util.dart';
import 'package:mobx/mobx.dart';
@@ -87,20 +86,13 @@ class ExchangeTradePage extends BasePage {
}
@override
- Widget body(BuildContext context) => ExchangeTradeForm(
- exchangeTradeViewModel,
- currentTheme,
- );
+ Widget body(BuildContext context) => ExchangeTradeForm(exchangeTradeViewModel);
}
class ExchangeTradeForm extends StatefulWidget {
- ExchangeTradeForm(
- this.exchangeTradeViewModel,
- this.currentTheme,
- );
+ ExchangeTradeForm(this.exchangeTradeViewModel);
final ExchangeTradeViewModel exchangeTradeViewModel;
- final MaterialThemeBase currentTheme;
@override
ExchangeTradeState createState() => ExchangeTradeState();
@@ -162,7 +154,6 @@ class ExchangeTradeState extends State<ExchangeTradeForm> {
: Offstage(),
_ExchangeTradeItemsCardSection(
viewModel: widget.exchangeTradeViewModel,
- currentTheme: widget.currentTheme,
),
],
);
@@ -282,7 +273,6 @@ class ExchangeTradeState extends State<ExchangeTradeForm> {
builder: (BuildContext bottomSheetContext) {
return ConfirmSendingBottomSheet(
key: ValueKey('exchange_trade_page_confirm_sending_bottom_sheet_key'),
- currentTheme: widget.currentTheme,
footerType: FooterType.slideActionButton,
walletType: widget.exchangeTradeViewModel.sendViewModel.walletType,
titleText: S.of(bottomSheetContext).confirm_transaction,
@@ -329,7 +319,6 @@ class ExchangeTradeState extends State<ExchangeTradeForm> {
isScrollControlled: true,
builder: (BuildContext bottomSheetContext) {
return InfoBottomSheet(
- currentTheme: widget.currentTheme,
footerType: FooterType.singleActionButton,
titleText: S.of(bottomSheetContext).transaction_sent,
contentImage: 'assets/images/birthday_cake.png',
@@ -359,24 +348,18 @@ class ExchangeTradeState extends State<ExchangeTradeForm> {
}
class _ExchangeTradeItemsCardSection extends StatelessWidget {
- const _ExchangeTradeItemsCardSection({
- required this.viewModel,
- required this.currentTheme,
- });
+ const _ExchangeTradeItemsCardSection({required this.viewModel});
final ExchangeTradeViewModel viewModel;
- final MaterialThemeBase currentTheme;
@override
Widget build(BuildContext context) {
final firstExchangeCard = ExchangeTradeCardItemWidget(
- currentTheme: currentTheme,
isReceiveDetailsCard: true,
exchangeTradeViewModel: viewModel,
);
final secondExchangeCard = ExchangeTradeCardItemWidget(
- currentTheme: currentTheme,
isReceiveDetailsCard: false,
exchangeTradeViewModel: viewModel,
);
diff --git a/lib/src/screens/exchange_trade/widgets/exchange_trade_card_item_widget.dart b/lib/src/screens/exchange_trade/widgets/exchange_trade_card_item_widget.dart
index 821eb23..dabca54 100644
--- a/lib/src/screens/exchange_trade/widgets/exchange_trade_card_item_widget.dart
+++ b/lib/src/screens/exchange_trade/widgets/exchange_trade_card_item_widget.dart
@@ -4,7 +4,6 @@ import 'package:cake_wallet/routes.dart';
import 'package:cake_wallet/src/widgets/alert_with_two_actions.dart';
import 'package:cake_wallet/src/widgets/list_row.dart';
import 'package:cake_wallet/src/widgets/picker.dart';
-import 'package:cake_wallet/themes/core/material_base_theme.dart';
import 'package:cake_wallet/utils/show_bar.dart';
import 'package:cake_wallet/utils/show_pop_up.dart';
import 'package:cake_wallet/view_model/exchange/exchange_trade_view_model.dart';
@@ -20,7 +19,6 @@ class ExchangeTradeCardItemWidget extends StatelessWidget {
ExchangeTradeCardItemWidget({
required this.isReceiveDetailsCard,
required this.exchangeTradeViewModel,
- required this.currentTheme,
Key? key,
}) : feesViewModel = exchangeTradeViewModel.feesViewModel,
output = exchangeTradeViewModel.output;
@@ -29,7 +27,6 @@ class ExchangeTradeCardItemWidget extends StatelessWidget {
final bool isReceiveDetailsCard;
final FeesViewModel feesViewModel;
final ExchangeTradeViewModel exchangeTradeViewModel;
- final MaterialThemeBase currentTheme;
@override
Widget build(BuildContext context) {
@@ -51,7 +48,6 @@ class ExchangeTradeCardItemWidget extends StatelessWidget {
.where((item) => item.isReceiveDetail == isReceiveDetailsCard)
.map(
(item) => TradeItemRowWidget(
- currentTheme: currentTheme,
title: item.title,
value: item.data,
isCopied: item.isCopied,
@@ -151,14 +147,12 @@ class TradeItemRowWidget extends StatelessWidget {
final String value;
final bool isCopied;
final Image copyImage;
- final MaterialThemeBase currentTheme;
const TradeItemRowWidget({
required this.title,
required this.value,
required this.isCopied,
required this.copyImage,
- required this.currentTheme,
super.key,
});
diff --git a/lib/src/screens/integrations/deuro/savings_page.dart b/lib/src/screens/integrations/deuro/savings_page.dart
index 8aee7fd..57192f2 100644
--- a/lib/src/screens/integrations/deuro/savings_page.dart
+++ b/lib/src/screens/integrations/deuro/savings_page.dart
@@ -55,7 +55,6 @@ class DEuroSavingsPage extends BasePage {
children: <Widget>[
Observer(
builder: (_) => SavingsCard(
- isDarkTheme: currentTheme.isDark,
interestRate: "${_dEuroViewModel.interestRateFormated}%",
savingsBalance: _dEuroViewModel.savingsBalanceFormated,
fiatSavingsBalance: _dEuroViewModel.fiatSavingsBalanceFormated,
@@ -71,7 +70,6 @@ class DEuroSavingsPage extends BasePage {
),
Observer(
builder: (_) => InterestCardWidget(
- isDarkTheme: currentTheme.isDark,
title: S.of(context).deuro_savings_collect_interest,
fiatAccruedInterest: _dEuroViewModel.fiatAccruedInterestFormated,
fiatCurrency: _dEuroViewModel.isFiatDisabled ? null : _dEuroViewModel.fiat,
@@ -178,7 +176,6 @@ class DEuroSavingsPage extends BasePage {
key: ValueKey('savings_page_confirm_sending_dialog_key'),
footerType: FooterType.slideActionButton,
titleText: title,
- currentTheme: currentTheme,
walletType: WalletType.ethereum,
titleIconPath: CryptoCurrency.deuro.iconPath,
currency: CryptoCurrency.deuro,
@@ -214,7 +211,6 @@ class DEuroSavingsPage extends BasePage {
key: ValueKey('savings_page_confirm_approval_dialog_key'),
footerType: FooterType.slideActionButton,
titleText: S.of(bottomSheetContext).approve_tokens,
- currentTheme: currentTheme,
walletType: WalletType.ethereum,
titleIconPath: CryptoCurrency.deuro.iconPath,
currency: CryptoCurrency.deuro,
@@ -247,7 +243,6 @@ class DEuroSavingsPage extends BasePage {
isDismissible: false,
builder: (BuildContext bottomSheetContext) => InfoBottomSheet(
footerType: FooterType.singleActionButton,
- currentTheme: currentTheme,
titleText: S.of(bottomSheetContext).transaction_sent,
contentImage: 'assets/images/birthday_cake.png',
content: S.of(bottomSheetContext).deuro_tx_commited_content,
@@ -311,7 +306,6 @@ class DEuroSavingsPage extends BasePage {
showModalBottomSheet<void>(
context: context,
builder: (BuildContext bottomSheetContext) => TooltipSheet(
- currentTheme: currentTheme,
titleText: title,
titleIconPath: CryptoCurrency.deuro.iconPath,
tooltip: content,
@@ -333,7 +327,6 @@ class DEuroSavingsPage extends BasePage {
context: context,
isScrollControlled: true,
builder: (BuildContext bottomSheetContext) => InfoBottomSheet(
- currentTheme: currentTheme,
height: 350,
titleText: "dEURO",
titleIconPath: CryptoCurrency.deuro.iconPath,
@@ -360,7 +353,6 @@ class DEuroSavingsPage extends BasePage {
return showModalBottomSheet<void>(
context: context,
builder: (BuildContext bottomSheetContext) => InfoBottomSheet(
- currentTheme: currentTheme,
titleText: title,
titleIconPath: CryptoCurrency.deuro.iconPath,
contentImage: 'assets/images/deuro_not_enough_eth.png',
diff --git a/lib/src/screens/integrations/deuro/widgets/interest_card_widget.dart b/lib/src/screens/integrations/deuro/widgets/interest_card_widget.dart
index 6d1852e..a1cf055 100644
--- a/lib/src/screens/integrations/deuro/widgets/interest_card_widget.dart
+++ b/lib/src/screens/integrations/deuro/widgets/interest_card_widget.dart
@@ -1,7 +1,7 @@
import 'package:cake_wallet/entities/fiat_currency.dart';
import 'package:cake_wallet/generated/i18n.dart';
import 'package:cake_wallet/src/screens/integrations/deuro/widgets/savings_card_widget.dart';
-import 'package:cake_wallet/themes/utils/custom_theme_colors.dart';
+import 'package:cake_wallet/themes/core/theme_extension.dart';
import 'package:cw_core/crypto_currency.dart';
import 'package:flutter/material.dart';
@@ -9,7 +9,6 @@ class InterestCardWidget extends StatelessWidget {
const InterestCardWidget({
required this.title,
required this.accruedInterest,
- required this.isDarkTheme,
required this.isEnabled,
required this.onCollectInterest,
required this.onReinvestInterest,
@@ -22,7 +21,6 @@ class InterestCardWidget extends StatelessWidget {
final String accruedInterest;
final String? fiatAccruedInterest;
final FiatCurrency? fiatCurrency;
- final bool isDarkTheme;
final bool isEnabled;
final VoidCallback onCollectInterest;
final VoidCallback onReinvestInterest;
@@ -37,12 +35,8 @@ class InterestCardWidget extends StatelessWidget {
borderRadius: BorderRadius.circular(15),
gradient: LinearGradient(
colors: [
- isDarkTheme
- ? CustomThemeColors.cardGradientColorPrimaryDark
- : CustomThemeColors.cardGradientColorPrimaryLight,
- isDarkTheme
- ? CustomThemeColors.cardGradientColorSecondaryDark
- : CustomThemeColors.cardGradientColorSecondaryLight,
+ context.customColors.cardGradientColorPrimary,
+ context.customColors.cardGradientColorSecondary,
],
begin: Alignment.topCenter,
end: Alignment.bottomCenter,
@@ -52,16 +46,14 @@ class InterestCardWidget extends StatelessWidget {
padding: EdgeInsets.all(20),
child: Column(
children: [
- SavingsCard.getAssetBalanceRow(
- context,
- title: title,
- amount: accruedInterest,
- fiatAmount: fiatAccruedInterest,
- currency: CryptoCurrency.deuro,
- fiatCurrency: fiatCurrency,
- hideSymbol: false,
- onTooltipPressed: onTooltipPressed
- ),
+ SavingsCard.getAssetBalanceRow(context,
+ title: title,
+ amount: accruedInterest,
+ fiatAmount: fiatAccruedInterest,
+ currency: CryptoCurrency.deuro,
+ fiatCurrency: fiatCurrency,
+ hideSymbol: false,
+ onTooltipPressed: onTooltipPressed),
SizedBox(height: 10),
Row(mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [
Expanded(
diff --git a/lib/src/screens/integrations/deuro/widgets/savings_card_widget.dart b/lib/src/screens/integrations/deuro/widgets/savings_card_widget.dart
index 36b92b4..3cb1ba6 100644
--- a/lib/src/screens/integrations/deuro/widgets/savings_card_widget.dart
+++ b/lib/src/screens/integrations/deuro/widgets/savings_card_widget.dart
@@ -4,28 +4,14 @@ import 'package:auto_size_text/auto_size_text.dart';
import 'package:cake_wallet/entities/fiat_currency.dart';
import 'package:cake_wallet/generated/i18n.dart';
import 'package:cake_wallet/src/widgets/cake_image_widget.dart';
-import 'package:cake_wallet/themes/utils/custom_theme_colors.dart';
+import 'package:cake_wallet/themes/core/theme_extension.dart';
import 'package:cw_core/crypto_currency.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
class SavingsCard extends StatelessWidget {
- final bool isDarkTheme;
- final bool isEnabled;
- final bool isLoading;
- final String interestRate;
- final String savingsBalance;
- final String? fiatSavingsBalance;
- final FiatCurrency? fiatCurrency;
- final CryptoCurrency currency;
- final VoidCallback onAddSavingsPressed;
- final VoidCallback onRemoveSavingsPressed;
- final VoidCallback onApproveSavingsPressed;
- final VoidCallback onTooltipPressed;
-
const SavingsCard({
super.key,
- required this.isDarkTheme,
required this.interestRate,
required this.savingsBalance,
required this.currency,
@@ -39,6 +25,18 @@ class SavingsCard extends StatelessWidget {
this.fiatCurrency,
});
+ final bool isEnabled;
+ final bool isLoading;
+ final String interestRate;
+ final String savingsBalance;
+ final String? fiatSavingsBalance;
+ final FiatCurrency? fiatCurrency;
+ final CryptoCurrency currency;
+ final VoidCallback onAddSavingsPressed;
+ final VoidCallback onRemoveSavingsPressed;
+ final VoidCallback onApproveSavingsPressed;
+ final VoidCallback onTooltipPressed;
+
@override
Widget build(BuildContext context) => Container(
margin: const EdgeInsets.all(15),
@@ -77,12 +75,8 @@ class SavingsCard extends StatelessWidget {
borderRadius: BorderRadius.circular(15),
gradient: LinearGradient(
colors: [
- isDarkTheme
- ? CustomThemeColors.cardGradientColorPrimaryDark
- : CustomThemeColors.cardGradientColorPrimaryLight,
- isDarkTheme
- ? CustomThemeColors.cardGradientColorSecondaryDark
- : CustomThemeColors.cardGradientColorSecondaryLight,
+ context.customColors.cardGradientColorPrimary,
+ context.customColors.cardGradientColorSecondary,
],
begin: Alignment.topCenter,
end: Alignment.bottomCenter,
diff --git a/lib/src/screens/new_wallet/advanced_privacy_settings_page.dart b/lib/src/screens/new_wallet/advanced_privacy_settings_page.dart
index bd03c17..44840db 100644
--- a/lib/src/screens/new_wallet/advanced_privacy_settings_page.dart
+++ b/lib/src/screens/new_wallet/advanced_privacy_settings_page.dart
@@ -65,9 +65,8 @@ class _AdvancedPrivacySettingsBody extends StatefulWidget {
this.toggleUseTestnet,
this.privacySettingsViewModel,
this.nodeViewModel,
- this.seedTypeViewModel, {
- Key? key,
- }) : super(key: key);
+ this.seedTypeViewModel,
+ );
final AdvancedPrivacySettingsViewModel privacySettingsViewModel;
final NodeCreateOrEditViewModel nodeViewModel;
diff --git a/lib/src/screens/new_wallet/new_wallet_page.dart b/lib/src/screens/new_wallet/new_wallet_page.dart
index 6240a68..be6a4cc 100644
--- a/lib/src/screens/new_wallet/new_wallet_page.dart
+++ b/lib/src/screens/new_wallet/new_wallet_page.dart
@@ -44,7 +44,7 @@ class NewWalletPage extends BasePage {
@override
Widget Function(BuildContext, Widget) get rootWrapper =>
- (BuildContext context, Widget scaffold) => GradientBackground(scaffold: scaffold);
+ (BuildContext context, Widget scaffold) => GradientBackground(scaffold: scaffold);
@override
String get title => S.current.new_wallet;
@@ -228,11 +228,11 @@ class _WalletNameFormState extends State<WalletNameForm> {
color: Theme.of(context).colorScheme.onSurface,
),
placeholderTextStyle: Theme.of(context).textTheme.bodyMedium?.copyWith(
- color: Theme.of(context).colorScheme.onSurfaceVariant,
- height: 1.4,
- fontSize: 18.0,
- fontWeight: FontWeight.w500,
- ),
+ color: Theme.of(context).colorScheme.onSurfaceVariant,
+ height: 1.4,
+ fontSize: 18.0,
+ fontWeight: FontWeight.w500,
+ ),
hintText: S.of(context).password,
),
BaseTextFormField(
@@ -247,11 +247,11 @@ class _WalletNameFormState extends State<WalletNameForm> {
color: Theme.of(context).colorScheme.onSurface,
),
placeholderTextStyle: Theme.of(context).textTheme.bodyMedium?.copyWith(
- color: Theme.of(context).colorScheme.onSurfaceVariant,
- height: 1.4,
- fontSize: 18.0,
- fontWeight: FontWeight.w500,
- ),
+ color: Theme.of(context).colorScheme.onSurfaceVariant,
+ height: 1.4,
+ fontSize: 18.0,
+ fontWeight: FontWeight.w500,
+ ),
hintText: S.of(context).repeat_wallet_password,
),
],
diff --git a/lib/src/screens/new_wallet/new_wallet_type_page.dart b/lib/src/screens/new_wallet/new_wallet_type_page.dart
index 2e58032..26ae913 100644
--- a/lib/src/screens/new_wallet/new_wallet_type_page.dart
+++ b/lib/src/screens/new_wallet/new_wallet_type_page.dart
@@ -143,8 +143,8 @@ class WalletTypeFormState extends State<WalletTypeForm> {
key: ValueKey('new_wallet_type_${type.name}_button_key'),
image: Image.asset(
walletTypeToCryptoCurrency(type).iconPath ?? '',
- height: 24,
- width: 24,
+ height: 28,
+ width: 28,
),
text: walletTypeToDisplayName(type),
showTrailingIcon: false,
diff --git a/lib/src/screens/new_wallet/widgets/grouped_wallet_expansion_tile.dart b/lib/src/screens/new_wallet/widgets/grouped_wallet_expansion_tile.dart
index 3d420d7..c028dc6 100644
--- a/lib/src/screens/new_wallet/widgets/grouped_wallet_expansion_tile.dart
+++ b/lib/src/screens/new_wallet/widgets/grouped_wallet_expansion_tile.dart
@@ -51,101 +51,98 @@ class GroupedWalletExpansionTile extends StatelessWidget {
@override
Widget build(BuildContext context) {
- final backgroundColor = color ?? (isSelected ? Theme.of(context).colorScheme.primary : Theme.of(context).colorScheme.surfaceContainer);
+ final backgroundColor = color ??
+ (isSelected
+ ? Theme.of(context).colorScheme.primary
+ : Theme.of(context).colorScheme.surfaceContainer);
final effectiveTextColor = textColor ??
(isSelected
? Theme.of(context).colorScheme.onPrimary
- : Theme.of(context).colorScheme.onSecondaryContainer);
+ : Theme.of(context).colorScheme.onSurface);
final effectiveArrowColor = arrowColor ??
(isSelected
? Theme.of(context).colorScheme.onPrimary
- : Theme.of(context).colorScheme.onSecondaryContainer);
- return Container(
- decoration: BoxDecoration(
- borderRadius: borderRadius ?? BorderRadius.all(Radius.circular(30)),
- color: backgroundColor,
- ),
- margin: margin ?? const EdgeInsets.only(bottom: 12.0),
- child: Theme(
- data: Theme.of(context).copyWith(
- dividerColor: Colors.transparent,
- splashFactory: NoSplash.splashFactory,
- ),
- child: ExpansionTile(
- onExpansionChanged: onExpansionChanged,
- initiallyExpanded: shouldShowCurrentWalletPointer
- ? childWallets.any((element) => element.isCurrent)
- : false,
- key: tileKey,
- tilePadding:
- EdgeInsets.symmetric(vertical: 1, horizontal: !isCurrentlySelectedWallet ? 16 : 0),
- iconColor: effectiveArrowColor,
- collapsedIconColor: effectiveArrowColor,
- leading: leadingWidget,
- trailing: trailingWidget ?? (childWallets.isEmpty ? SizedBox.shrink() : null),
- title: GestureDetector(
- onTap: onTitleTapped,
- child: Text(
- title,
- style: Theme.of(context).textTheme.bodyMedium!.copyWith(
- fontSize: 18,
- fontWeight: FontWeight.w500,
- color: effectiveTextColor,
- ),
- textAlign: TextAlign.left,
- ),
+ : Theme.of(context).colorScheme.onSurfaceVariant);
+ return Padding(
+ padding: EdgeInsets.symmetric(vertical: 6),
+ child: ExpansionTile(
+ shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(16)),
+ collapsedShape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(16)),
+ collapsedBackgroundColor: backgroundColor,
+ backgroundColor: backgroundColor,
+ onExpansionChanged: onExpansionChanged,
+ initiallyExpanded: shouldShowCurrentWalletPointer
+ ? childWallets.any((element) => element.isCurrent)
+ : false,
+ key: tileKey,
+ tilePadding:
+ EdgeInsets.symmetric(vertical: 1, horizontal: !isCurrentlySelectedWallet ? 16 : 0),
+ iconColor: effectiveArrowColor,
+ collapsedIconColor: effectiveArrowColor,
+ leading: leadingWidget,
+ trailing: trailingWidget ?? (childWallets.isEmpty ? SizedBox.shrink() : null),
+ title: GestureDetector(
+ onTap: onTitleTapped,
+ child: Text(
+ title,
+ style: Theme.of(context).textTheme.bodyMedium!.copyWith(
+ fontSize: 18,
+ fontWeight: FontWeight.w500,
+ color: effectiveTextColor,
+ ),
+ textAlign: TextAlign.left,
),
- children: childWallets.map(
- (item) {
- final currentColor = item.isCurrent
- ? Theme.of(context).colorScheme.primary
- : Theme.of(context).colorScheme.surface;
- final walletTypeToCrypto = walletTypeToCryptoCurrency(item.type);
- return ListTile(
- contentPadding: EdgeInsets.zero,
- key: ValueKey(item.name),
- trailing: childTrailingWidget?.call(item),
- onTap: () => onChildItemTapped(item),
- leading: SizedBox(
- width: 60,
- child: Row(
- children: [
- item.isCurrent && shouldShowCurrentWalletPointer
- ? Container(
- height: 35,
- width: 6,
- decoration: BoxDecoration(
- borderRadius: BorderRadius.only(
- topRight: Radius.circular(16),
- bottomRight: Radius.circular(16),
- ),
- color: currentColor,
+ ),
+ children: childWallets.map(
+ (item) {
+ final currentColor = item.isCurrent
+ ? Theme.of(context).colorScheme.primary
+ : Theme.of(context).colorScheme.surface;
+ final walletTypeToCrypto = walletTypeToCryptoCurrency(item.type);
+ return ListTile(
+ contentPadding: EdgeInsets.zero,
+ key: ValueKey(item.name),
+ trailing: childTrailingWidget?.call(item),
+ onTap: () => onChildItemTapped(item),
+ leading: SizedBox(
+ width: 64,
+ child: Row(
+ children: [
+ item.isCurrent && shouldShowCurrentWalletPointer
+ ? Container(
+ height: 35,
+ width: 6,
+ decoration: BoxDecoration(
+ borderRadius: BorderRadius.only(
+ topRight: Radius.circular(16),
+ bottomRight: Radius.circular(16),
),
- )
- : SizedBox(width: 6),
- SizedBox(width: 16),
- Image.asset(
- walletTypeToCrypto.iconPath!,
- width: 32,
- height: 32,
- ),
- ],
- ),
- ),
- title: Text(
- item.name,
- maxLines: 2,
- style: Theme.of(context).textTheme.bodyMedium!.copyWith(
- fontSize: 18,
- fontWeight: FontWeight.w500,
- color: effectiveTextColor,
- ),
+ color: currentColor,
+ ),
+ )
+ : SizedBox(width: 7),
+ SizedBox(width: 24),
+ Image.asset(
+ walletTypeToCrypto.iconPath!,
+ width: 32,
+ height: 32,
+ ),
+ ],
),
- );
- },
- ).toList(),
- ),
+ ),
+ title: Text(
+ item.name,
+ maxLines: 2,
+ style: Theme.of(context).textTheme.bodyMedium!.copyWith(
+ fontSize: 18,
+ fontWeight: FontWeight.w500,
+ color: effectiveTextColor,
+ ),
+ ),
+ );
+ },
+ ).toList(),
),
);
}
diff --git a/lib/src/screens/nodes/widgets/node_indicator.dart b/lib/src/screens/nodes/widgets/node_indicator.dart
index aa5458d..0b6677e 100644
--- a/lib/src/screens/nodes/widgets/node_indicator.dart
+++ b/lib/src/screens/nodes/widgets/node_indicator.dart
@@ -1,8 +1,8 @@
-import 'package:cake_wallet/themes/utils/custom_theme_colors.dart';
+import 'package:cake_wallet/themes/core/custom_theme_colors.dart';
import 'package:flutter/material.dart';
class NodeIndicator extends StatelessWidget {
- NodeIndicator({this.isLive = false});
+ const NodeIndicator({this.isLive = false});
final bool isLive;
diff --git a/lib/src/screens/receive/address_list_page.dart b/lib/src/screens/receive/address_list_page.dart
index b2af438..5f67947 100644
--- a/lib/src/screens/receive/address_list_page.dart
+++ b/lib/src/screens/receive/address_list_page.dart
@@ -20,7 +20,6 @@ class AddressListPage extends BasePage {
children: <Widget>[
AddressList(
addressListViewModel: addressListViewModel,
- currentTheme: currentTheme,
onSelect: (String address) async {
Navigator.of(context).pop(address);
},
diff --git a/lib/src/screens/receive/receive_page.dart b/lib/src/screens/receive/receive_page.dart
index deb5838..030c10a 100644
--- a/lib/src/screens/receive/receive_page.dart
+++ b/lib/src/screens/receive/receive_page.dart
@@ -102,10 +102,9 @@ class ReceivePage extends BasePage {
heroTag: _heroTag,
amountTextFieldFocusNode: _cryptoAmountFocus,
amountController: _amountController,
- currentTheme: currentTheme,
),
),
- AddressList(addressListViewModel: addressListViewModel, currentTheme: currentTheme),
+ AddressList(addressListViewModel: addressListViewModel),
Padding(
padding: EdgeInsets.fromLTRB(24, 24, 24, 32),
child: Text(
diff --git a/lib/src/screens/receive/widgets/address_cell.dart b/lib/src/screens/receive/widgets/address_cell.dart
index ad28e71..fe26d87 100644
--- a/lib/src/screens/receive/widgets/address_cell.dart
+++ b/lib/src/screens/receive/widgets/address_cell.dart
@@ -1,5 +1,4 @@
import 'package:cake_wallet/generated/i18n.dart';
-import 'package:cake_wallet/themes/core/material_base_theme.dart';
import 'package:cake_wallet/utils/address_formatter.dart';
import 'package:cake_wallet/view_model/wallet_address_list/wallet_address_list_item.dart';
import 'package:cw_core/wallet_type.dart';
@@ -16,7 +15,6 @@ class AddressCell extends StatelessWidget {
required this.backgroundColor,
required this.textColor,
required this.walletType,
- required this.currentTheme,
this.onTap,
this.onEdit,
this.onHide,
@@ -35,7 +33,6 @@ class AddressCell extends StatelessWidget {
required Color backgroundColor,
required Color textColor,
required WalletType walletType,
- required MaterialThemeBase currentTheme,
Function(String)? onTap,
bool hasBalance = false,
bool hasReceived = false,
@@ -52,7 +49,6 @@ class AddressCell extends StatelessWidget {
backgroundColor: backgroundColor,
textColor: textColor,
walletType: walletType,
- currentTheme: currentTheme,
onTap: onTap,
onEdit: onEdit,
onHide: onHide,
@@ -72,7 +68,6 @@ class AddressCell extends StatelessWidget {
final Color backgroundColor;
final Color textColor;
final WalletType walletType;
- final MaterialThemeBase currentTheme;
final Function(String)? onTap;
final Function()? onEdit;
final Function()? onHide;
diff --git a/lib/src/screens/receive/widgets/address_list.dart b/lib/src/screens/receive/widgets/address_list.dart
index 79b508f..2f44b9a 100644
--- a/lib/src/screens/receive/widgets/address_list.dart
+++ b/lib/src/screens/receive/widgets/address_list.dart
@@ -19,15 +19,9 @@ import 'package:flutter/material.dart';
import 'package:flutter_mobx/flutter_mobx.dart';
class AddressList extends StatefulWidget {
- const AddressList({
- super.key,
- required this.addressListViewModel,
- required this.currentTheme,
- this.onSelect,
- });
+ const AddressList({super.key, required this.addressListViewModel, this.onSelect});
final WalletAddressListViewModel addressListViewModel;
- final MaterialThemeBase currentTheme;
final Function(String)? onSelect;
@override
@@ -167,7 +161,6 @@ class _AddressListState extends State<AddressList> {
return AddressCell.fromItem(
item,
isCurrent: isCurrent,
- currentTheme: widget.currentTheme,
walletType: widget.addressListViewModel.type,
hasBalance: widget.addressListViewModel.isBalanceAvailable,
hasReceived: widget.addressListViewModel.isReceivedAvailable,
diff --git a/lib/src/screens/receive/widgets/currency_input_field.dart b/lib/src/screens/receive/widgets/currency_input_field.dart
index 048b1d4..2a061c4 100644
--- a/lib/src/screens/receive/widgets/currency_input_field.dart
+++ b/lib/src/screens/receive/widgets/currency_input_field.dart
@@ -1,6 +1,5 @@
import 'package:cake_wallet/generated/i18n.dart';
import 'package:cake_wallet/src/widgets/base_text_form_field.dart';
-import 'package:cake_wallet/themes/core/material_base_theme.dart';
import 'package:cw_core/crypto_amount_format.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
@@ -15,7 +14,6 @@ class CurrencyAmountTextField extends StatelessWidget {
this.allAmountButton = false,
this.isPickerEnable = false,
this.isSelected = false,
- this.currentThemeType = ThemeType.dark,
this.onTapPicker,
this.padding,
this.imageArrow,
@@ -54,7 +52,6 @@ class CurrencyAmountTextField extends StatelessWidget {
final bool isAmountEditable;
final FormFieldValidator<String>? currencyValueValidator;
final bool isPickerEnable;
- final ThemeType currentThemeType;
final bool isSelected;
final bool allAmountButton;
final VoidCallback? allAmountCallback;
@@ -84,7 +81,7 @@ class CurrencyAmountTextField extends StatelessWidget {
child: imageArrow ??
Image.asset(
'assets/images/arrow_bottom_purple_icon.png',
- color: textColor,
+ color: Theme.of(context).colorScheme.primary,
height: 8,
),
),
diff --git a/lib/src/screens/receive/widgets/qr_widget.dart b/lib/src/screens/receive/widgets/qr_widget.dart
index b44f30a..6a40850 100644
--- a/lib/src/screens/receive/widgets/qr_widget.dart
+++ b/lib/src/screens/receive/widgets/qr_widget.dart
@@ -4,7 +4,6 @@ import 'package:cake_wallet/src/widgets/primary_button.dart';
import 'package:cake_wallet/routes.dart';
import 'package:cake_wallet/src/screens/exchange/widgets/currency_picker.dart';
import 'package:cake_wallet/src/screens/receive/widgets/currency_input_field.dart';
-import 'package:cake_wallet/themes/core/material_base_theme.dart';
import 'package:cake_wallet/generated/i18n.dart';
import 'package:cake_wallet/src/screens/receive/widgets/qr_image.dart';
import 'package:cake_wallet/src/widgets/bottom_sheet/base_bottom_sheet_widget.dart';
@@ -24,7 +23,6 @@ import 'package:url_launcher/url_launcher.dart';
class QRWidget extends StatelessWidget {
QRWidget({
required this.addressListViewModel,
- required this.currentTheme,
this.qrVersion,
this.heroTag,
required this.amountController,
@@ -36,7 +34,6 @@ class QRWidget extends StatelessWidget {
final TextEditingController amountController;
final FocusNode? amountTextFieldFocusNode;
final GlobalKey<FormState> formKey;
- final MaterialThemeBase currentTheme;
final int? qrVersion;
final String? heroTag;
@@ -211,7 +208,6 @@ class QRWidget extends StatelessWidget {
amountFocusNode: amountTextFieldFocusNode,
amountController: amountController,
padding: EdgeInsets.only(top: 20, left: _width / 4),
- currentThemeType: currentTheme.type,
isAmountEditable: true,
tag: addressListViewModel.selectedCurrency.tag,
onTapPicker: () => _presentPicker(context),
@@ -312,7 +308,6 @@ class QRWidget extends StatelessWidget {
builder: (context) => InfoBottomSheet(
titleText: S.of(context).payjoin_unavailable_sheet_title,
content: S.of(context).payjoin_unavailable_sheet_content,
- currentTheme: currentTheme,
footerType: FooterType.doubleActionButton,
doubleActionLeftButtonText: S.of(context).learn_more,
onLeftActionButtonPressed: () => launchUrl(
diff --git a/lib/src/screens/restore/restore_options_page.dart b/lib/src/screens/restore/restore_options_page.dart
index 63a9c60..4d9300b 100644
--- a/lib/src/screens/restore/restore_options_page.dart
+++ b/lib/src/screens/restore/restore_options_page.dart
@@ -10,7 +10,6 @@ import 'package:cake_wallet/utils/permission_handler.dart';
import 'package:cake_wallet/utils/responsive_layout_util.dart';
import 'package:cake_wallet/utils/show_pop_up.dart';
import 'package:cake_wallet/view_model/restore/wallet_restore_from_qr_code.dart';
-import 'package:cake_wallet/wallet_type_utils.dart';
import 'package:cw_core/wallet_info.dart';
import 'package:flutter/material.dart';
import 'package:permission_handler/permission_handler.dart';
@@ -20,12 +19,13 @@ class RestoreOptionsPage extends BasePage {
@override
String get title => S.current.restore_restore_wallet;
-
final bool isNewInstall;
@override
- Widget body(BuildContext context) =>
- _RestoreOptionsBody(isNewInstall: isNewInstall, themeType: currentTheme.type);
+ Widget body(BuildContext context) => _RestoreOptionsBody(
+ isNewInstall: isNewInstall,
+ themeType: currentTheme.type,
+ );
}
class _RestoreOptionsBody extends StatefulWidget {
@@ -71,70 +71,68 @@ class _RestoreOptionsBodyState extends State<_RestoreOptionsBody> {
return Center(
child: Container(
- width: ResponsiveLayoutUtilBase.kDesktopMaxWidthConstraint,
- height: double.infinity,
- padding: EdgeInsets.symmetric(vertical: 24, horizontal: 24),
- child: SingleChildScrollView(
- child: Column(
- children: <Widget>[
- OptionTile(
- key: ValueKey('restore_options_from_seeds_or_keys_button_key'),
- onPressed: () => Navigator.pushNamed(context, Routes.restoreWalletFromSeedKeys),
- image: imageSeedKeys,
- title: S.of(context).restore_title_from_seed_keys,
- description: S.of(context).restore_description_from_seed_keys,
- ),
- if (FeatureFlag.hasBitcoinViewOnly && DeviceInfo.instance.isMobile)
- Padding(
- padding: EdgeInsets.only(top: 24),
- child: OptionTile(
- key: ValueKey('restore_options_from_cupcake_button_key'),
- onPressed: () => _onScanQRCode(context),
- image: imageRestoreCupcake,
- title: S.of(context).restore_title_from_cupcake,
- description: S.of(context).restore_description_from_cupcake,
- tag: S.of(context).new_tag,
- ),
- ),
+ width: ResponsiveLayoutUtilBase.kDesktopMaxWidthConstraint,
+ height: double.infinity,
+ padding: EdgeInsets.symmetric(vertical: 24, horizontal: 24),
+ child: SingleChildScrollView(
+ child: Column(
+ children: <Widget>[
+ OptionTile(
+ key: ValueKey('restore_options_from_seeds_or_keys_button_key'),
+ onPressed: () => Navigator.pushNamed(context, Routes.restoreWalletFromSeedKeys),
+ image: imageSeedKeys,
+ title: S.of(context).restore_title_from_seed_keys,
+ description: S.of(context).restore_description_from_seed_keys,
+ ),
+ if (FeatureFlag.hasBitcoinViewOnly && DeviceInfo.instance.isMobile)
Padding(
- padding: EdgeInsets.only(top: 24),
+ padding: EdgeInsets.only(top: 12),
child: OptionTile(
- key: ValueKey('restore_options_from_hardware_wallet_button_key'),
- onPressed: () => Navigator.pushNamed(
- context,
- isSingleCoin
- ? Routes.connectHardwareWallet
- : Routes.restoreWalletFromHardwareWallet),
- image: imageRestoreHW,
- title: S.of(context).restore_title_from_hardware_wallet,
- description: S.of(context).restore_description_from_hardware_wallet,
+ key: ValueKey('restore_options_from_cupcake_button_key'),
+ onPressed: () => _onScanQRCode(context),
+ image: imageRestoreCupcake,
+ title: S.of(context).restore_title_from_cupcake,
+ description: S.of(context).restore_description_from_cupcake,
+ tag: S.of(context).new_tag,
),
),
- if (widget.isNewInstall)
- Padding(
- padding: EdgeInsets.only(top: 24),
- child: OptionTile(
- key: ValueKey('restore_options_from_backup_button_key'),
- onPressed: () => Navigator.pushNamed(context, Routes.restoreFromBackup),
- image: imageRestoreBackup,
- title: S.of(context).restore_title_from_backup,
- description: S.of(context).restore_description_from_backup,
- ),
+ Padding(
+ padding: EdgeInsets.only(top: 12),
+ child: OptionTile(
+ key: ValueKey('restore_options_from_hardware_wallet_button_key'),
+ onPressed: () =>
+ Navigator.pushNamed(context, Routes.restoreWalletFromHardwareWallet),
+ image: imageRestoreHW,
+ title: S.of(context).restore_title_from_hardware_wallet,
+ description: S.of(context).restore_description_from_hardware_wallet,
+ ),
+ ),
+ if (widget.isNewInstall)
+ Padding(
+ padding: EdgeInsets.only(top: 12),
+ child: OptionTile(
+ key: ValueKey('restore_options_from_backup_button_key'),
+ onPressed: () => Navigator.pushNamed(context, Routes.restoreFromBackup),
+ image: imageRestoreBackup,
+ title: S.of(context).restore_title_from_backup,
+ description: S.of(context).restore_description_from_backup,
),
- if (DeviceInfo.instance.isMobile)
- Padding(
- padding: EdgeInsets.only(top: 24),
- child: OptionTile(
- key: ValueKey('restore_options_from_qr_button_key'),
- onPressed: () => _onScanQRCode(context),
- image: imageRestoreQR,
- title: S.of(context).scan_qr_code,
- description: S.of(context).cold_or_recover_wallet,
- ),
+ ),
+ if (DeviceInfo.instance.isMobile)
+ Padding(
+ padding: EdgeInsets.only(top: 12),
+ child: OptionTile(
+ key: ValueKey('restore_options_from_qr_button_key'),
+ onPressed: () => _onScanQRCode(context),
+ image: imageRestoreQR,
+ title: S.of(context).scan_qr_code,
+ description: S.of(context).cold_or_recover_wallet,
),
- ],
- ),
- )),
+ ),
+ ],
+ ),
+ ),
+ ),
);
}
diff --git a/lib/src/screens/restore/wallet_restore_page.dart b/lib/src/screens/restore/wallet_restore_page.dart
index 411178c..ef2fd3e 100644
--- a/lib/src/screens/restore/wallet_restore_page.dart
+++ b/lib/src/screens/restore/wallet_restore_page.dart
@@ -42,7 +42,6 @@ class WalletRestorePage extends BasePage {
: S.current.restore_title_from_keys,
style: Theme.of(context).textTheme.titleMedium?.copyWith(
fontSize: 18,
-
fontWeight: FontWeight.w600,
),
),
@@ -147,7 +146,6 @@ class WalletRestorePage extends BasePage {
bottom: MediaQuery.of(bottomSheetContext).viewInsets.bottom,
),
child: AddPassphraseBottomSheet(
- currentTheme: currentTheme,
titleText: S.of(context).add_passphrase,
onRestoreButtonPressed: (passphrase) async {
await _onPassphraseBottomSheetRestoreButtonPressed(
diff --git a/lib/src/screens/root/root.dart b/lib/src/screens/root/root.dart
index cfedbc3..f3da794 100644
--- a/lib/src/screens/root/root.dart
+++ b/lib/src/screens/root/root.dart
@@ -153,6 +153,10 @@ class RootState extends State<Root> with WidgetsBindingObserver {
break;
case AppLifecycleState.resumed:
+
+ // Reset inactive state when app resumes
+ if (_isInactive) setState(() => _setInactive(false));
+
widget.authService.requireAuth().then((value) {
if (mounted) {
setState(() {
@@ -201,8 +205,14 @@ class RootState extends State<Root> with WidgetsBindingObserver {
@override
void didChangePlatformBrightness() {
+ // Only handle theme changes when the app is active (not in background)
+ if (_isInactive) return;
+
if (widget.appStore.themeStore.themeMode == ThemeMode.system) {
Future.delayed(Duration(milliseconds: Platform.isIOS ? 500 : 0), () {
+ // Double-check that app is still active before applying theme change
+ if (_isInactive) return;
+
final systemTheme = widget.appStore.themeStore.getThemeFromSystem();
if (widget.appStore.themeStore.currentTheme != systemTheme) {
widget.appStore.themeStore.setTheme(systemTheme);
@@ -272,6 +282,16 @@ class RootState extends State<Root> with WidgetsBindingObserver {
_postFrameCallback = false;
_setInactive(false);
});
+
+ // Apply any missed theme changes after successful authentication
+ if (widget.appStore.themeStore.themeMode == ThemeMode.system) {
+ Future.delayed(Duration(milliseconds: 100), () {
+ final systemTheme = widget.appStore.themeStore.getThemeFromSystem();
+ if (widget.appStore.themeStore.currentTheme != systemTheme) {
+ widget.appStore.themeStore.setTheme(systemTheme);
+ }
+ });
+ }
}
void _setInactive(bool value) {
diff --git a/lib/src/screens/seed/wallet_seed_page.dart b/lib/src/screens/seed/wallet_seed_page.dart
index 8fcda18..1101097 100644
--- a/lib/src/screens/seed/wallet_seed_page.dart
+++ b/lib/src/screens/seed/wallet_seed_page.dart
@@ -68,19 +68,16 @@ class WalletSeedPage extends BasePage {
crossAxisAlignment: CrossAxisAlignment.center,
children: <Widget>[
SizedBox(height: 16),
- WarningBox(
- content: S.current.cake_seeds_save_disclaimer,
- currentTheme: currentTheme,
- ),
+ WarningBox(content: S.current.cake_seeds_save_disclaimer),
SizedBox(height: 36),
Text(
key: ValueKey('wallet_seed_page_wallet_name_text_key'),
walletSeedViewModel.name,
style: Theme.of(context).textTheme.bodyMedium!.copyWith(
- fontSize: 18,
- fontWeight: FontWeight.w600,
- color: Theme.of(context).colorScheme.onSurface,
- ),
+ fontSize: 18,
+ fontWeight: FontWeight.w600,
+ color: Theme.of(context).colorScheme.onSurface,
+ ),
),
SizedBox(height: 24),
Expanded(
diff --git a/lib/src/screens/send/send_page.dart b/lib/src/screens/send/send_page.dart
index f5d1807..67dd730 100644
--- a/lib/src/screens/send/send_page.dart
+++ b/lib/src/screens/send/send_page.dart
@@ -580,7 +580,6 @@ class SendPage extends BasePage {
key: ValueKey('send_page_confirm_sending_bottom_sheet_key'),
titleText: S.of(bottomSheetContext).confirm_transaction,
accessibleNavigationModeSlideActionButtonText: S.of(bottomSheetContext).send,
- currentTheme: currentTheme,
footerType: FooterType.slideActionButton,
walletType: sendViewModel.walletType,
titleIconPath: sendViewModel.selectedCryptoCurrency.iconPath,
@@ -630,7 +629,6 @@ class SendPage extends BasePage {
builder: (BuildContext bottomSheetContext) {
return showContactSheet && sendViewModel.ocpRequest == null
? InfoBottomSheet(
- currentTheme: currentTheme,
footerType: FooterType.doubleActionButton,
titleText: S.of(bottomSheetContext).transaction_sent,
contentImage: 'assets/images/contact.png',
@@ -684,7 +682,6 @@ class SendPage extends BasePage {
},
)
: InfoBottomSheet(
- currentTheme: currentTheme,
footerType: FooterType.singleActionButton,
titleText: S.of(bottomSheetContext).transaction_sent,
contentImage: 'assets/images/birthday_cake.png',
@@ -747,7 +744,6 @@ class SendPage extends BasePage {
builder: (context) {
dialogContext = context;
return InfoBottomSheet(
- currentTheme: currentTheme,
footerType: FooterType.singleActionButton,
titleText: S.of(context).proceed_on_device,
contentImage: 'assets/images/hardware_wallet/ledger_nano_x.png',
diff --git a/lib/src/screens/send/widgets/send_card.dart b/lib/src/screens/send/widgets/send_card.dart
index d1848e6..d120719 100644
--- a/lib/src/screens/send/widgets/send_card.dart
+++ b/lib/src/screens/send/widgets/send_card.dart
@@ -121,8 +121,11 @@ class SendCardState extends State<SendCard> with AutomaticKeepAliveClientMixin<S
WidgetsBinding.instance.addPostFrameCallback(
(timeStamp) {
if (mounted) {
- final prefix = initialPaymentRequest!.scheme.isNotEmpty ? "${initialPaymentRequest!.scheme}:" : "";
- final amount = initialPaymentRequest!.amount.isNotEmpty ? "?amount=${initialPaymentRequest!.amount}" : "";
+ final prefix =
+ initialPaymentRequest!.scheme.isNotEmpty ? "${initialPaymentRequest!.scheme}:" : "";
+ final amount = initialPaymentRequest!.amount.isNotEmpty
+ ? "?amount=${initialPaymentRequest!.amount}"
+ : "";
final uri = prefix + initialPaymentRequest!.address + amount;
_handlePaymentFlow(uri, initialPaymentRequest!);
}
@@ -188,7 +191,6 @@ class SendCardState extends State<SendCard> with AutomaticKeepAliveClientMixin<S
paymentFlowResult: result,
paymentViewModel: paymentViewModel,
walletSwitcherViewModel: walletSwitcherViewModel,
- currentTheme: currentTheme,
paymentRequest: paymentRequest,
onSelectWallet: () => _handleSelectWallet(
paymentViewModel,
@@ -221,7 +223,6 @@ class SendCardState extends State<SendCard> with AutomaticKeepAliveClientMixin<S
builder: (BuildContext dialogContext) {
return WalletSwitcherBottomSheet(
viewModel: walletSwitcherViewModel,
- currentTheme: currentTheme,
filterWalletType: paymentViewModel.detectedWalletType,
);
},
diff --git a/lib/src/screens/send/widgets/send_template_card.dart b/lib/src/screens/send/widgets/send_template_card.dart
index 2bf257a..2e4a358 100644
--- a/lib/src/screens/send/widgets/send_template_card.dart
+++ b/lib/src/screens/send/widgets/send_template_card.dart
@@ -14,11 +14,12 @@ import 'package:cake_wallet/src/widgets/base_text_form_field.dart';
import 'package:mobx/mobx.dart';
class SendTemplateCard extends StatelessWidget {
- SendTemplateCard(
- {super.key,
- required this.template,
- required this.index,
- required this.sendTemplateViewModel});
+ SendTemplateCard({
+ super.key,
+ required this.template,
+ required this.index,
+ required this.sendTemplateViewModel,
+ });
final TemplateViewModel template;
final int index;
diff --git a/lib/src/screens/settings/background_sync_page.dart b/lib/src/screens/settings/background_sync_page.dart
index 91cab89..355b303 100644
--- a/lib/src/screens/settings/background_sync_page.dart
+++ b/lib/src/screens/settings/background_sync_page.dart
@@ -1,18 +1,15 @@
import 'dart:async';
-import 'dart:io';
import 'package:cake_wallet/generated/i18n.dart';
import 'package:cake_wallet/src/screens/base_page.dart';
import 'package:cake_wallet/src/screens/settings/widgets/settings_picker_cell.dart';
import 'package:cake_wallet/src/screens/settings/widgets/settings_switcher_cell.dart';
-import 'package:cake_wallet/src/widgets/alert_with_no_action.dart.dart';
import 'package:cake_wallet/src/widgets/alert_with_one_action.dart';
import 'package:cake_wallet/utils/show_pop_up.dart';
import 'package:cake_wallet/view_model/dashboard/dashboard_view_model.dart';
import 'package:cake_wallet/view_model/settings/sync_mode.dart';
import 'package:flutter/material.dart';
import 'package:flutter_mobx/flutter_mobx.dart';
-import 'package:permission_handler/permission_handler.dart';
class BackgroundSyncPage extends BasePage {
BackgroundSyncPage(this.dashboardViewModel);
@@ -36,12 +33,14 @@ class BackgroundSyncPage extends BasePage {
onValueChange: (_, bool value) async {
if (value) {
if (dashboardViewModel.batteryOptimizationEnabled) {
- await showPopUp(context: context, builder: (context) => AlertWithOneAction(
- alertTitle: S.current.background_sync,
- alertContent: S.current.unrestricted_background_service_notice,
- buttonText: S.current.ok,
- buttonAction: () => Navigator.of(context).pop(),
- ));
+ await showPopUp(
+ context: context,
+ builder: (context) => AlertWithOneAction(
+ alertTitle: S.current.background_sync,
+ alertContent: S.current.unrestricted_background_service_notice,
+ buttonText: S.current.ok,
+ buttonAction: () => Navigator.of(context).pop(),
+ ));
await dashboardViewModel.disableBatteryOptimization();
for (var i = 0; i < 4 * 60; i++) {
await Future.delayed(Duration(milliseconds: 250));
@@ -65,16 +64,20 @@ class BackgroundSyncPage extends BasePage {
items: SyncMode.all,
displayItem: (SyncMode syncMode) => syncMode.name,
selectedItem: dashboardViewModel.settingsStore.currentSyncMode,
- onItemSelected: (dashboardViewModel.batteryOptimizationEnabled && dashboardViewModel.hasBatteryOptimization) ? null : (syncMode) async {
- dashboardViewModel.setSyncMode(syncMode);
- });
+ onItemSelected: (dashboardViewModel.batteryOptimizationEnabled &&
+ dashboardViewModel.hasBatteryOptimization)
+ ? null
+ : (syncMode) async {
+ dashboardViewModel.setSyncMode(syncMode);
+ });
}),
if (dashboardViewModel.hasBgsyncNetworkConstraints)
Observer(builder: (context) {
return SettingsSwitcherCell(
title: S.current.background_sync_on_unmetered_network,
value: dashboardViewModel.backgroundSyncNetworkUnmetered,
- onValueChange: (_, bool value) => dashboardViewModel.setBackgroundSyncNetworkUnmetered(value),
+ onValueChange: (_, bool value) =>
+ dashboardViewModel.setBackgroundSyncNetworkUnmetered(value),
);
}),
if (dashboardViewModel.hasBgsyncBatteryNotLowConstraints)
@@ -82,7 +85,8 @@ class BackgroundSyncPage extends BasePage {
return SettingsSwitcherCell(
title: S.current.background_sync_on_battery_low,
value: !dashboardViewModel.backgroundSyncBatteryNotLow,
- onValueChange: (_, bool value) => dashboardViewModel.setBackgroundSyncBatteryNotLow(!value),
+ onValueChange: (_, bool value) =>
+ dashboardViewModel.setBackgroundSyncBatteryNotLow(!value),
);
}),
if (dashboardViewModel.hasBgsyncChargingConstraints)
@@ -90,7 +94,8 @@ class BackgroundSyncPage extends BasePage {
return SettingsSwitcherCell(
title: S.current.background_sync_on_charging,
value: dashboardViewModel.backgroundSyncCharging,
- onValueChange: (_, bool value) => dashboardViewModel.setBackgroundSyncCharging(value),
+ onValueChange: (_, bool value) =>
+ dashboardViewModel.setBackgroundSyncCharging(value),
);
}),
if (dashboardViewModel.hasBgsyncDeviceIdleConstraints)
@@ -98,25 +103,28 @@ class BackgroundSyncPage extends BasePage {
return SettingsSwitcherCell(
title: S.current.background_sync_on_device_idle,
value: dashboardViewModel.backgroundSyncDeviceIdle,
- onValueChange: (_, bool value) => dashboardViewModel.setBackgroundSyncDeviceIdle(value),
+ onValueChange: (_, bool value) =>
+ dashboardViewModel.setBackgroundSyncDeviceIdle(value),
);
}),
Observer(builder: (context) {
return SettingsSwitcherCell(
title: S.current.new_transactions_notifications,
value: dashboardViewModel.backgroundSyncNotificationsEnabled,
- onValueChange: (_, bool value) {
+ onValueChange: (_, bool value) {
try {
dashboardViewModel.setBackgroundSyncNotificationsEnabled(value);
} catch (e) {
- showPopUp(context: context, builder: (context) => AlertWithOneAction(
- alertTitle: S.current.error,
- alertContent: S.current.notification_permission_denied,
- buttonText: S.current.ok,
- buttonAction: () {
- Navigator.of(context).pop();
- },
- ));
+ showPopUp(
+ context: context,
+ builder: (context) => AlertWithOneAction(
+ alertTitle: S.current.error,
+ alertContent: S.current.notification_permission_denied,
+ buttonText: S.current.ok,
+ buttonAction: () {
+ Navigator.of(context).pop();
+ },
+ ));
}
},
);
diff --git a/lib/src/screens/settings/display_settings_page.dart b/lib/src/screens/settings/display_settings_page.dart
index 7420575..003e64d 100644
--- a/lib/src/screens/settings/display_settings_page.dart
+++ b/lib/src/screens/settings/display_settings_page.dart
@@ -3,6 +3,7 @@ import 'package:cake_wallet/entities/language_service.dart';
import 'package:cake_wallet/entities/sync_status_display_mode.dart';
import 'package:cake_wallet/generated/i18n.dart';
import 'package:cake_wallet/src/screens/base_page.dart';
+import 'package:cake_wallet/src/screens/settings/widgets/settings_choices_cell.dart';
import 'package:cake_wallet/src/screens/settings/widgets/settings_picker_cell.dart';
import 'package:cake_wallet/src/screens/settings/widgets/settings_switcher_cell.dart';
import 'package:cake_wallet/src/screens/settings/widgets/settings_theme_choice.dart';
@@ -12,6 +13,7 @@ import 'package:cake_wallet/utils/device_info.dart';
import 'package:cake_wallet/utils/feature_flag.dart';
import 'package:cake_wallet/utils/responsive_layout_util.dart';
import 'package:cake_wallet/utils/show_pop_up.dart';
+import 'package:cake_wallet/view_model/settings/choices_list_item.dart';
import 'package:cake_wallet/view_model/settings/display_settings_view_model.dart';
import 'package:flutter/material.dart';
import 'package:flutter_mobx/flutter_mobx.dart';
@@ -32,6 +34,7 @@ class DisplaySettingsPage extends BasePage {
return Container(
padding: EdgeInsets.only(top: 10),
child: Column(
+ crossAxisAlignment: CrossAxisAlignment.start,
children: [
SettingsSwitcherCell(
title: S.of(context).show_market_place,
@@ -100,17 +103,59 @@ class DisplaySettingsPage extends BasePage {
),
if (responsiveLayoutUtil.shouldRenderMobileUI && DeviceInfo.instance.isMobile) ...[
- SettingsSwitcherCell(
- title: S.of(context).use_device_theme,
- value: _displaySettingsViewModel.themeMode == ThemeMode.system,
- onValueChange: (_, bool value) {
- _displaySettingsViewModel
- .setThemeMode(value ? ThemeMode.system : ThemeMode.dark);
- },
+ SizedBox(height: 24),
+ Padding(
+ padding: const EdgeInsets.only(left: 24),
+ child: Text(
+ S.current.appearance,
+ style: Theme.of(context).textTheme.bodyMedium?.copyWith(
+ fontWeight: FontWeight.w400,
+ fontSize: 14,
+ height: 22 / 14,
+ color: Theme.of(context).colorScheme.onSurface,
+ ),
+ ),
),
- Semantics(
- label: S.of(context).color_theme,
- child: SettingsThemeChoicesCell(_displaySettingsViewModel),
+ SizedBox(height: 12),
+ Container(
+ margin: EdgeInsets.symmetric(horizontal: 20),
+ decoration: BoxDecoration(
+ color: Theme.of(context).colorScheme.surfaceContainer,
+ borderRadius: BorderRadius.circular(16),
+ ),
+ child: Column(
+ children: [
+ SettingsChoicesCell(
+ ChoicesListItem<ThemeMode>(
+ title: "",
+ items: ThemeMode.values,
+ selectedItem: _displaySettingsViewModel.themeMode,
+ onItemSelected: (ThemeMode themeMode) =>
+ _displaySettingsViewModel.setThemeMode(themeMode),
+ displayItem: (ThemeMode themeMode) {
+ return themeMode.name[0].toUpperCase() +
+ themeMode.name.substring(1).toLowerCase();
+ },
+ ),
+ useGenericColor: false,
+ padding: EdgeInsets.all(12),
+ ),
+ Container(
+ decoration: BoxDecoration(
+ color: Theme.of(context).colorScheme.surfaceContainerHigh,
+ borderRadius: BorderRadius.circular(16),
+ ),
+ child: Column(
+ children: [
+ Semantics(
+ label: S.of(context).color_theme,
+ child: SettingsThemeChoicesCell(_displaySettingsViewModel),
+ ),
+ ],
+ ),
+ ),
+ ],
+ ),
),
],
],
diff --git a/lib/src/screens/settings/security_backup_page.dart b/lib/src/screens/settings/security_backup_page.dart
index 172ae78..9ab8d46 100644
--- a/lib/src/screens/settings/security_backup_page.dart
+++ b/lib/src/screens/settings/security_backup_page.dart
@@ -114,8 +114,8 @@ class SecurityBackupPage extends BasePage {
key: ValueKey('security_backup_page_sign_and_verify'),
title: S.current.sign_verify_title,
handler: (_) => Navigator.of(context).pushNamed(Routes.signPage)
- //_securitySettingsViewModel.pinCodeRequiredDuration,
- ),
+ //_securitySettingsViewModel.pinCodeRequiredDuration,
+ ),
Observer(
builder: (context) {
return SettingsCellWithArrow(
diff --git a/lib/src/screens/settings/trocador_providers_page.dart b/lib/src/screens/settings/trocador_providers_page.dart
index 56ad754..e7f89ba 100644
--- a/lib/src/screens/settings/trocador_providers_page.dart
+++ b/lib/src/screens/settings/trocador_providers_page.dart
@@ -53,7 +53,11 @@ class TrocadorProvidersPage extends BasePage {
}
class Badge extends StatelessWidget {
- Badge({required this.textColor, required this.backgroundColor, required this.title, required this.subTitle});
+ Badge(
+ {required this.textColor,
+ required this.backgroundColor,
+ required this.title,
+ required this.subTitle});
final String title;
final String subTitle;
@@ -79,10 +83,10 @@ class Badge extends StatelessWidget {
title,
textAlign: TextAlign.center,
style: Theme.of(context).textTheme.bodySmall!.copyWith(
- color: textColor,
- fontSize: 7,
- fontWeight: FontWeight.w600,
- ),
+ color: textColor,
+ fontSize: 7,
+ fontWeight: FontWeight.w600,
+ ),
),
VerticalDivider(
color: textColor,
@@ -91,9 +95,9 @@ class Badge extends StatelessWidget {
Text(
subTitle,
style: Theme.of(context).textTheme.bodySmall!.copyWith(
- color: textColor,
- fontWeight: FontWeight.w600,
- ),
+ color: textColor,
+ fontWeight: FontWeight.w600,
+ ),
),
],
),
diff --git a/lib/src/screens/settings/widgets/setting_priority_picker_cell.dart b/lib/src/screens/settings/widgets/setting_priority_picker_cell.dart
index 72249a6..a15c436 100644
--- a/lib/src/screens/settings/widgets/setting_priority_picker_cell.dart
+++ b/lib/src/screens/settings/widgets/setting_priority_picker_cell.dart
@@ -4,20 +4,20 @@ import 'package:cake_wallet/src/widgets/picker.dart';
import 'package:cake_wallet/src/widgets/standard_list.dart';
class SettingsPriorityPickerCell<ItemType> extends StandardListRow {
- SettingsPriorityPickerCell(
- {required String title,
- required this.selectedItem,
- required this.items,
- this.displayItem,
- this.images,
- this.searchHintText,
- this.isGridView = false,
- this.matchingCriteria,
- this.customValue,
- this.maxValue,
- this.customItemIndex,
- this.onItemSelected})
- : super(
+ SettingsPriorityPickerCell({
+ required String title,
+ required this.selectedItem,
+ required this.items,
+ this.displayItem,
+ this.images,
+ this.searchHintText,
+ this.isGridView = false,
+ this.matchingCriteria,
+ this.customValue,
+ this.maxValue,
+ this.customItemIndex,
+ this.onItemSelected,
+ }) : super(
title: title,
isSelected: false,
onTap: (BuildContext context) async {
diff --git a/lib/src/screens/settings/widgets/settings_choices_cell.dart b/lib/src/screens/settings/widgets/settings_choices_cell.dart
index 0f03dce..798093f 100644
--- a/lib/src/screens/settings/widgets/settings_choices_cell.dart
+++ b/lib/src/screens/settings/widgets/settings_choices_cell.dart
@@ -2,15 +2,19 @@ import 'package:cake_wallet/view_model/settings/choices_list_item.dart';
import 'package:flutter/material.dart';
class SettingsChoicesCell extends StatelessWidget {
- const SettingsChoicesCell(this.choicesListItem, {Key? key}) : super(key: key);
+ const SettingsChoicesCell(this.choicesListItem,
+ {this.useGenericColor = true, this.padding, Key? key})
+ : super(key: key);
final ChoicesListItem<dynamic> choicesListItem;
+ final bool useGenericColor;
+ final EdgeInsets? padding;
@override
Widget build(BuildContext context) {
return Container(
- color: Theme.of(context).colorScheme.surface,
- padding: EdgeInsets.only(left: 24, right: 24, top: 16, bottom: 16),
+ color: useGenericColor ? Theme.of(context).colorScheme.surface : null,
+ padding: padding ?? EdgeInsets.only(left: 24, right: 24, top: 16, bottom: 16),
child: Column(
mainAxisSize: MainAxisSize.min,
crossAxisAlignment: CrossAxisAlignment.start,
@@ -30,7 +34,14 @@ class SettingsChoicesCell extends StatelessWidget {
child: Container(
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(10),
- color: Theme.of(context).colorScheme.surfaceContainerHighest,
+ border: useGenericColor
+ ? null
+ : Border.all(
+ color: Theme.of(context).colorScheme.surfaceContainerHighest,
+ width: 1.5,
+ ),
+ color:
+ useGenericColor ? Theme.of(context).colorScheme.surfaceContainerHighest : null,
),
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
diff --git a/lib/src/screens/settings/widgets/settings_switcher_cell.dart b/lib/src/screens/settings/widgets/settings_switcher_cell.dart
index 2d97b3c..34019c2 100644
--- a/lib/src/screens/settings/widgets/settings_switcher_cell.dart
+++ b/lib/src/screens/settings/widgets/settings_switcher_cell.dart
@@ -11,16 +11,21 @@ class SettingsSwitcherCell extends StandardListRow {
this.leading,
void Function(BuildContext context)? onTap,
Key? key,
+ this.padding,
+ this.switchBackgroundColor,
}) : super(title: title, isSelected: false, decoration: decoration, onTap: onTap, key: key);
final bool value;
+ final Color? switchBackgroundColor;
final void Function(BuildContext context, bool value)? onValueChange;
final Widget? leading;
+ final EdgeInsets? padding;
@override
Widget buildTrailing(BuildContext context) => StandardSwitch(
value: value,
onTapped: () => onValueChange?.call(context, !value),
+ backgroundColor: switchBackgroundColor,
);
@override
@@ -29,7 +34,7 @@ class SettingsSwitcherCell extends StandardListRow {
final trailing = buildTrailing(context);
return Container(
height: 56,
- padding: EdgeInsets.only(left: 12, right: 12),
+ padding: padding ?? EdgeInsets.only(left: 12, right: 12),
child: TextButton(
onPressed: () {
if (onTap != null) {
@@ -39,6 +44,7 @@ class SettingsSwitcherCell extends StandardListRow {
}
},
style: ButtonStyle(
+ padding: WidgetStateProperty.all(padding ?? null),
//backgroundColor: MaterialStateProperty.all(Theme.of(context).colorScheme.surfaceContainer),
shape: WidgetStateProperty.all(
RoundedRectangleBorder(
diff --git a/lib/src/screens/settings/widgets/settings_theme_choice.dart b/lib/src/screens/settings/widgets/settings_theme_choice.dart
index ad7371e..0536ae9 100644
--- a/lib/src/screens/settings/widgets/settings_theme_choice.dart
+++ b/lib/src/screens/settings/widgets/settings_theme_choice.dart
@@ -1,112 +1,154 @@
import 'package:cake_wallet/generated/i18n.dart';
+import 'package:cake_wallet/src/screens/settings/widgets/settings_switcher_cell.dart';
+import 'package:cake_wallet/src/widgets/cake_image_widget.dart';
import 'package:cake_wallet/themes/core/material_base_theme.dart';
-import 'package:cake_wallet/themes/utils/theme_list.dart';
+import 'package:cake_wallet/themes/theme_classes/black_theme.dart';
import 'package:cake_wallet/view_model/settings/display_settings_view_model.dart';
import 'package:flutter/material.dart';
+import 'package:flutter_mobx/flutter_mobx.dart';
class SettingsThemeChoicesCell extends StatelessWidget {
SettingsThemeChoicesCell(this._displaySettingsViewModel);
- final items = ThemeList.all;
-
final DisplaySettingsViewModel _displaySettingsViewModel;
final double cellHeight = 25;
final double cellWidth = 12;
- final double cellRadius = 6;
+ final double cellRadius = 8;
@override
Widget build(BuildContext context) {
- return Container(
- padding: EdgeInsets.all(cellHeight),
- child: Column(
- mainAxisSize: MainAxisSize.min,
- crossAxisAlignment: CrossAxisAlignment.start,
- children: [
- Row(
+ return Observer(
+ builder: (context) {
+ final availableThemes = _displaySettingsViewModel.availableThemes;
+ final currentTheme = _displaySettingsViewModel.currentTheme;
+ final availableAccentColors = _displaySettingsViewModel.availableAccentColors;
+ final screenHeight = MediaQuery.of(context).size.height;
+
+ final previewHeight = _getResponsivePreviewHeight(screenHeight);
+ final previewWidth = previewHeight * 0.6;
+
+ return Container(
+ height: getHeight(context, currentTheme, currentTheme.hasAccentColors),
+ padding: EdgeInsets.all(12),
+ child: Column(
+ mainAxisSize: MainAxisSize.min,
+ crossAxisAlignment: CrossAxisAlignment.start,
children: [
- Text(
- S.current.color_theme,
- style: Theme.of(context).textTheme.bodyMedium,
- ),
- ],
- ),
- SizedBox(height: cellHeight),
- GridView.builder(
- itemCount: items.length,
- shrinkWrap: true,
- physics: NeverScrollableScrollPhysics(),
- gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
- crossAxisCount: 3,
- mainAxisExtent: 75,
- crossAxisSpacing: 20,
- ),
- itemBuilder: (context, index) {
- final MaterialThemeBase e = items[index];
- final currentTheme = _displaySettingsViewModel.theme;
- final isSelected = currentTheme == e;
+ Expanded(
+ child: ListView.builder(
+ itemCount: availableThemes.length,
+ scrollDirection: Axis.horizontal,
+ itemBuilder: (context, index) {
+ final MaterialThemeBase theme = availableThemes[index];
+ final isSelected = _displaySettingsViewModel.isThemeSelected(theme);
- return Padding(
- padding: EdgeInsets.all(5),
- child: Semantics(
- label: e.toString(),
- selected: isSelected,
- child: GestureDetector(
- onTap: () {
- _displaySettingsViewModel.onThemeSelected(e);
- },
- child: Container(
- padding: EdgeInsets.all(5),
- decoration: BoxDecoration(
- borderRadius: BorderRadius.circular(cellRadius),
- border: isSelected
- ? Border.all(color: Theme.of(context).colorScheme.primary)
- : null,
- color: Theme.of(context)
- .colorScheme
- .onSurfaceVariant
- .withOpacity(currentTheme.brightness == Brightness.light ? 0.1 : 0.3),
- ),
- child: Row(
- mainAxisAlignment: MainAxisAlignment.center,
- children: [
- Container(
- padding:
- EdgeInsets.symmetric(horizontal: cellWidth, vertical: cellHeight),
- decoration: BoxDecoration(
- borderRadius: BorderRadius.only(
- topLeft: Radius.circular(cellRadius),
- bottomLeft: Radius.circular(cellRadius),
- ),
- color: e.colorScheme.primary,
- ),
+ return Semantics(
+ label: theme.toString(),
+ selected: isSelected,
+ child: GestureDetector(
+ onTap: () {
+ _displaySettingsViewModel.onThemeSelected(theme);
+ },
+ child: Container(
+ margin: EdgeInsets.only(right: 24),
+ decoration: BoxDecoration(
+ borderRadius: BorderRadius.circular(cellRadius),
+ border: isSelected
+ ? Border.all(
+ color: Theme.of(context).colorScheme.primary,
+ strokeAlign: BorderSide.strokeAlignOutside)
+ : null,
),
- Container(
- padding:
- EdgeInsets.symmetric(horizontal: cellWidth, vertical: cellHeight),
- decoration: BoxDecoration(color: e.colorScheme.surface),
+ child: ClipRRect(
+ borderRadius: BorderRadius.circular(cellRadius),
+ child: CakeImageWidget(
+ imageUrl: _displaySettingsViewModel.getImageForTheme(theme),
+ fit: BoxFit.cover,
+ height: previewHeight,
+ width: previewWidth,
+ ),
),
- Container(
- padding:
- EdgeInsets.symmetric(horizontal: cellWidth, vertical: cellHeight),
- decoration: BoxDecoration(
- borderRadius: BorderRadius.only(
- topRight: Radius.circular(cellRadius),
- bottomRight: Radius.circular(cellRadius),
+ ),
+ ),
+ );
+ },
+ ),
+ ),
+ if (_displaySettingsViewModel.currentTheme.hasAccentColors) ...[
+ SizedBox(height: cellHeight),
+ Row(
+ mainAxisAlignment: MainAxisAlignment.spaceBetween,
+ children: [
+ Text(
+ S.of(context).accent_color,
+ style: Theme.of(context).textTheme.bodyMedium,
+ ),
+ Container(
+ height: 40,
+ child: Row(
+ children: availableAccentColors.map((accentColor) {
+ final isSelected = _displaySettingsViewModel
+ .isAccentColorSelected(accentColor.name.toLowerCase());
+ return GestureDetector(
+ onTap: () {
+ _displaySettingsViewModel
+ .onAccentColorSelected(accentColor.name.toLowerCase());
+ },
+ child: Container(
+ width: 26,
+ height: 26,
+ margin: EdgeInsets.only(right: 11),
+ decoration: BoxDecoration(
+ borderRadius: BorderRadius.circular(16),
+ border: isSelected
+ ? Border.all(
+ color: Theme.of(context).colorScheme.onSurfaceVariant,
+ width: 3)
+ : null,
+ color: accentColor.color,
),
- color: e.colorScheme.tertiary,
),
- ),
- ],
+ );
+ }).toList(),
),
),
- ),
+ ],
),
- );
- },
+ ],
+ if (_displaySettingsViewModel.currentTheme is BlackTheme)
+ SettingsSwitcherCell(
+ title: S.current.oled_mode,
+ value: _displaySettingsViewModel.isBlackThemeOledEnabled,
+ onValueChange: (_, bool value) {
+ _displaySettingsViewModel.setBlackThemeOled(value);
+ },
+ padding: EdgeInsets.zero,
+ switchBackgroundColor: currentTheme.colorScheme.secondaryContainer,
+ ),
+ ],
),
- ],
- ),
+ );
+ },
);
}
+
+ double getHeight(BuildContext context, MaterialThemeBase theme, bool hasAccentColors) {
+ final screenHeight = MediaQuery.of(context).size.height;
+
+ double baseHeight = (screenHeight * 0.25).clamp(150.0, screenHeight * 0.5);
+
+ if (hasAccentColors) {
+ baseHeight += (screenHeight * 0.05).clamp(35.0, 60.0);
+ }
+
+ if (theme is BlackTheme) {
+ baseHeight += (screenHeight * 0.08).clamp(48.0, 96.0);
+ }
+
+ return baseHeight;
+ }
+
+ double _getResponsivePreviewHeight(double screenHeight) =>
+ (screenHeight * 0.22).clamp(160.0, 240.0);
}
diff --git a/lib/src/screens/support/support_page.dart b/lib/src/screens/support/support_page.dart
index 55a2b23..bc762c6 100644
--- a/lib/src/screens/support/support_page.dart
+++ b/lib/src/screens/support/support_page.dart
@@ -12,10 +12,6 @@ class SupportPage extends BasePage {
final SupportViewModel supportViewModel;
- final imageLiveSupport = Image.asset('assets/images/cake_icon.png');
- final imageWalletGuides = Image.asset('assets/images/wallet_guides.png');
- final imageMoreLinks = Image.asset('assets/images/more_links.png');
-
@override
String get title => S.current.settings_support;
diff --git a/lib/src/screens/transaction_details/rbf_details_page.dart b/lib/src/screens/transaction_details/rbf_details_page.dart
index 98d267d..521cf06 100644
--- a/lib/src/screens/transaction_details/rbf_details_page.dart
+++ b/lib/src/screens/transaction_details/rbf_details_page.dart
@@ -121,7 +121,6 @@ class RBFDetailsPage extends BasePage {
}
reaction((_) => transactionDetailsViewModel.sendViewModel.state, (ExecutionState state) {
-
if (state is! IsExecutingState &&
loadingBottomSheetContext != null &&
loadingBottomSheetContext!.mounted) {
@@ -191,16 +190,20 @@ class RBFDetailsPage extends BasePage {
return ConfirmSendingBottomSheet(
key: ValueKey('rbf_confirm_sending_bottom_sheet'),
titleText: S.of(bottomSheetContext).confirm_transaction,
- currentTheme: currentTheme,
walletType: transactionDetailsViewModel.sendViewModel.walletType,
- titleIconPath: transactionDetailsViewModel.sendViewModel.selectedCryptoCurrency.iconPath,
+ titleIconPath:
+ transactionDetailsViewModel.sendViewModel.selectedCryptoCurrency.iconPath,
currency: transactionDetailsViewModel.sendViewModel.selectedCryptoCurrency,
amount: S.of(bottomSheetContext).send_amount,
- amountValue: transactionDetailsViewModel.sendViewModel.pendingTransaction!.amountFormatted,
- fiatAmountValue: transactionDetailsViewModel.sendViewModel.pendingTransactionFiatAmountFormatted,
+ amountValue:
+ transactionDetailsViewModel.sendViewModel.pendingTransaction!.amountFormatted,
+ fiatAmountValue: transactionDetailsViewModel
+ .sendViewModel.pendingTransactionFiatAmountFormatted,
fee: S.of(bottomSheetContext).send_fee,
- feeValue: transactionDetailsViewModel.sendViewModel.pendingTransaction!.feeFormatted,
- feeFiatAmount: transactionDetailsViewModel.sendViewModel.pendingTransactionFeeFiatAmountFormatted,
+ feeValue:
+ transactionDetailsViewModel.sendViewModel.pendingTransaction!.feeFormatted,
+ feeFiatAmount: transactionDetailsViewModel
+ .sendViewModel.pendingTransactionFeeFiatAmountFormatted,
outputs: transactionDetailsViewModel.sendViewModel.outputs,
footerType: FooterType.slideActionButton,
accessibleNavigationModeSlideActionButtonText: S.of(context).send,
diff --git a/lib/src/screens/unspent_coins/unspent_coins_details_page.dart b/lib/src/screens/unspent_coins/unspent_coins_details_page.dart
index 165995b..34a76d5 100644
--- a/lib/src/screens/unspent_coins/unspent_coins_details_page.dart
+++ b/lib/src/screens/unspent_coins/unspent_coins_details_page.dart
@@ -50,10 +50,12 @@ class UnspentCoinsDetailsPage extends BasePage {
if (item is UnspentCoinsSwitchItem) {
return Observer(
- builder: (_) => UnspentCoinsSwitchRow(
- title: item.title,
- switchValue: item.switchValue(),
- onSwitchValueChange: item.onSwitchValueChange));
+ builder: (_) => UnspentCoinsSwitchRow(
+ title: item.title,
+ switchValue: item.switchValue(),
+ onSwitchValueChange: item.onSwitchValueChange,
+ ),
+ );
}
if (item is BlockExplorerListItem) {
diff --git a/lib/src/screens/wallet_connect/utils/method_utils.dart b/lib/src/screens/wallet_connect/utils/method_utils.dart
index 5c4027a..d79adfe 100644
--- a/lib/src/screens/wallet_connect/utils/method_utils.dart
+++ b/lib/src/screens/wallet_connect/utils/method_utils.dart
@@ -5,7 +5,7 @@ import 'package:cake_wallet/src/screens/wallet_connect/models/wc_connection_mode
import 'package:cake_wallet/src/screens/wallet_connect/services/walletkit_service.dart';
import 'package:cake_wallet/src/screens/wallet_connect/widgets/wc_connection_widget.dart';
import 'package:cake_wallet/src/screens/wallet_connect/widgets/wc_request_widget.dart';
-import 'package:cake_wallet/themes/utils/custom_theme_colors.dart';
+import 'package:cake_wallet/themes/core/custom_theme_colors.dart';
import 'package:flutter/material.dart';
import 'package:reown_walletkit/reown_walletkit.dart';
diff --git a/lib/src/screens/wallet_connect/widgets/wc_request_widget.dart b/lib/src/screens/wallet_connect/widgets/wc_request_widget.dart
index d6ff37f..d06b200 100644
--- a/lib/src/screens/wallet_connect/widgets/wc_request_widget.dart
+++ b/lib/src/screens/wallet_connect/widgets/wc_request_widget.dart
@@ -1,9 +1,7 @@
-import 'package:cake_wallet/di.dart';
import 'package:cake_wallet/generated/i18n.dart';
import 'package:cake_wallet/src/screens/wallet_connect/services/bottom_sheet_service.dart';
import 'package:cake_wallet/src/screens/wallet_connect/widgets/wc_verify_context_widget.dart';
import 'package:cake_wallet/src/widgets/primary_button.dart';
-import 'package:cake_wallet/themes/core/theme_store.dart';
import 'package:flutter/material.dart';
import 'package:reown_walletkit/reown_walletkit.dart';
@@ -22,13 +20,10 @@ class WCRequestWidget extends StatelessWidget {
@override
Widget build(BuildContext context) {
- final currentTheme = getIt.get<ThemeStore>().currentTheme;
-
return Column(
mainAxisSize: MainAxisSize.min,
children: [
WCVerifyContextWidget(
- currentTheme: currentTheme,
verifyContext: verifyContext,
),
const SizedBox(height: 8),
diff --git a/lib/src/screens/wallet_connect/widgets/wc_verify_context_widget.dart b/lib/src/screens/wallet_connect/widgets/wc_verify_context_widget.dart
index b85a8e1..efc95cc 100644
--- a/lib/src/screens/wallet_connect/widgets/wc_verify_context_widget.dart
+++ b/lib/src/screens/wallet_connect/widgets/wc_verify_context_widget.dart
@@ -1,6 +1,5 @@
import 'package:cake_wallet/generated/i18n.dart';
-import 'package:cake_wallet/themes/core/material_base_theme.dart';
-import 'package:cake_wallet/themes/utils/custom_theme_colors.dart';
+import 'package:cake_wallet/themes/core/custom_theme_colors.dart';
import 'package:flutter/material.dart';
import 'package:reown_walletkit/reown_walletkit.dart';
@@ -8,11 +7,9 @@ class WCVerifyContextWidget extends StatelessWidget {
const WCVerifyContextWidget({
super.key,
required this.verifyContext,
- required this.currentTheme,
});
final VerifyContext? verifyContext;
- final MaterialThemeBase currentTheme;
@override
Widget build(BuildContext context) {
diff --git a/lib/src/screens/wallet_keys/wallet_keys_page.dart b/lib/src/screens/wallet_keys/wallet_keys_page.dart
index 014805d..4048636 100644
--- a/lib/src/screens/wallet_keys/wallet_keys_page.dart
+++ b/lib/src/screens/wallet_keys/wallet_keys_page.dart
@@ -7,7 +7,6 @@ import 'package:cake_wallet/src/widgets/primary_button.dart';
import 'package:cake_wallet/src/widgets/seedphrase_grid_widget.dart';
import 'package:cake_wallet/src/widgets/text_info_box.dart';
import 'package:cake_wallet/src/widgets/warning_box_widget.dart';
-import 'package:cake_wallet/themes/core/material_base_theme.dart';
import 'package:cake_wallet/utils/brightness_util.dart';
import 'package:cake_wallet/utils/clipboard_util.dart';
import 'package:cake_wallet/utils/show_bar.dart';
@@ -36,13 +35,11 @@ class WalletKeysPage extends BasePage {
child: WarningBox(
key: const ValueKey('wallet_keys_page_share_warning_text_key'),
content: S.of(context).do_not_share_warning_text.toUpperCase(),
- currentTheme: currentTheme,
),
),
Expanded(
child: WalletKeysPageBody(
walletKeysViewModel: walletKeysViewModel,
- currentTheme: currentTheme,
),
),
],
@@ -54,11 +51,9 @@ class WalletKeysPage extends BasePage {
class WalletKeysPageBody extends StatefulWidget {
WalletKeysPageBody({
required this.walletKeysViewModel,
- required this.currentTheme,
});
final WalletKeysViewModel walletKeysViewModel;
- final MaterialThemeBase currentTheme;
@override
State<StatefulWidget> createState() => _WalletKeysPageBodyState();
@@ -161,7 +156,11 @@ class _WalletKeysPageBodyState extends State<WalletKeysPageBody>
if (showKeyTab)
Padding(
padding: const EdgeInsets.only(left: 22, right: 22),
- child: _buildKeysTab(context, showSilentPaymentsTab ? widget.walletKeysViewModel.items.sublist(0, 4) : widget.walletKeysViewModel.items),
+ child: _buildKeysTab(
+ context,
+ showSilentPaymentsTab
+ ? widget.walletKeysViewModel.items.sublist(0, 4)
+ : widget.walletKeysViewModel.items),
),
if (showSilentPaymentsTab)
Padding(
diff --git a/lib/src/screens/wallet_list/edit_wallet_button_widget.dart b/lib/src/screens/wallet_list/edit_wallet_button_widget.dart
index d926230..99ef564 100644
--- a/lib/src/screens/wallet_list/edit_wallet_button_widget.dart
+++ b/lib/src/screens/wallet_list/edit_wallet_button_widget.dart
@@ -20,27 +20,17 @@ class EditWalletButtonWidget extends StatelessWidget {
width: width,
child: Row(
children: [
- GestureDetector(
- onTap: onTap,
- child: Center(
- child: Container(
- height: 40,
- width: 44,
- padding: EdgeInsets.all(10),
- decoration: BoxDecoration(
- shape: BoxShape.circle,
- color: Theme.of(context).colorScheme.surface,
- ),
- child: Icon(
- Icons.edit,
- size: 14,
- color: Theme.of(context).colorScheme.onSurfaceVariant,
- ),
- ),
+ TextButton(
+ onPressed: onTap,
+ style: TextButton.styleFrom(
+ backgroundColor: Theme.of(context).colorScheme.surface, shape: CircleBorder()),
+ child: Icon(
+ Icons.edit,
+ size: 14,
+ color: Theme.of(context).colorScheme.onSurfaceVariant,
),
),
if (isGroup) ...{
- SizedBox(width: 6),
Icon(
isExpanded ? Icons.keyboard_arrow_up : Icons.keyboard_arrow_down,
size: 24,
diff --git a/lib/src/screens/wallet_list/filtered_list.dart b/lib/src/screens/wallet_list/filtered_list.dart
index 5316c84..8636821 100644
--- a/lib/src/screens/wallet_list/filtered_list.dart
+++ b/lib/src/screens/wallet_list/filtered_list.dart
@@ -29,6 +29,23 @@ class FilteredListState extends State<FilteredList> {
if (widget.canReorder) {
return Observer(
builder: (_) => ReorderableListView.builder(
+ proxyDecorator: (child, index, animation) => Material(
+ child: Container(
+ //margin: EdgeInsets.symmetric(vertical: 5),
+ decoration: BoxDecoration(
+ color: Theme.of(context).colorScheme.surfaceContainer,
+ borderRadius: BorderRadius.circular(20.0),
+ boxShadow: [
+ BoxShadow(
+ color: Colors.black.withOpacity(0.3),
+ blurRadius: 5,
+ offset: const Offset(0, 6),
+ spreadRadius: 1)
+ ],
+ ),
+ child: child,
+ ),
+ ),
shrinkWrap: widget.shrinkWrap,
physics: widget.physics ?? const BouncingScrollPhysics(),
itemBuilder: widget.itemBuilder,
diff --git a/lib/src/screens/wallet_list/wallet_list_page.dart b/lib/src/screens/wallet_list/wallet_list_page.dart
index d8f20d2..2dcaa8d 100644
--- a/lib/src/screens/wallet_list/wallet_list_page.dart
+++ b/lib/src/screens/wallet_list/wallet_list_page.dart
@@ -116,21 +116,6 @@ class WalletListBody extends StatefulWidget {
}
class WalletListBodyState extends State<WalletListBody> {
- final moneroIcon = Image.asset('assets/images/monero_logo.png', height: 24, width: 24);
- final bitcoinIcon = Image.asset('assets/images/bitcoin.png', height: 24, width: 24);
- final tBitcoinIcon = Image.asset('assets/images/tbtc.png', height: 24, width: 24);
- final litecoinIcon = Image.asset('assets/images/litecoin_icon.png', height: 24, width: 24);
- final decredIcon = Image.asset('assets/images/decred_icon.png', height: 24, width: 24);
- final nonWalletTypeIcon = Image.asset('assets/images/close.png', height: 24, width: 24);
- final havenIcon = Image.asset('assets/images/haven_logo.png', height: 24, width: 24);
- final ethereumIcon = Image.asset('assets/images/eth_icon.png', height: 24, width: 24);
- final bitcoinCashIcon = Image.asset('assets/images/bch_icon.png', height: 24, width: 24);
- final nanoIcon = Image.asset('assets/images/nano_icon.png', height: 24, width: 24);
- final polygonIcon = Image.asset('assets/images/matic_icon.png', height: 24, width: 24);
- final solanaIcon = Image.asset('assets/images/sol_icon.png', height: 24, width: 24);
- final tronIcon = Image.asset('assets/images/trx_icon.png', height: 24, width: 24);
- final wowneroIcon = Image.asset('assets/images/wownero_icon.png', height: 24, width: 24);
- final zanoIcon = Image.asset('assets/images/zano_icon.png', height: 24, width: 24);
final scrollController = ScrollController();
final double tileHeight = 60;
Flushbar<void>? _progressBar;
@@ -164,69 +149,68 @@ class WalletListBodyState extends State<WalletListBody> {
),
SizedBox(height: 16),
Container(
- child: Observer(
- builder: (_) => FilteredList(
- shrinkWrap: true,
- list: widget.walletListViewModel.multiWalletGroups,
- updateFunction: widget.walletListViewModel.reorderAccordingToWalletList,
- itemBuilder: (context, index) {
- final group = widget.walletListViewModel.multiWalletGroups[index];
- final groupName =
- group.groupName ?? '${S.current.wallet_group} ${index + 1}';
+ child: Padding(
+ padding: EdgeInsets.only(left: 20, right: 20),
+ child: Observer(
+ builder: (_) => FilteredList(
+ shrinkWrap: true,
+ list: widget.walletListViewModel.multiWalletGroups,
+ updateFunction: widget.walletListViewModel.reorderAccordingToWalletList,
+ itemBuilder: (context, index) {
+ final group = widget.walletListViewModel.multiWalletGroups[index];
+ final groupName =
+ group.groupName ?? '${S.current.wallet_group} ${index + 1}';
- widget.walletListViewModel.updateTileState(
- index,
- widget.walletListViewModel.expansionTileStateTrack[index] ?? false,
- );
+ widget.walletListViewModel.updateTileState(
+ index,
+ widget.walletListViewModel.expansionTileStateTrack[index] ?? false,
+ );
- return GroupedWalletExpansionTile(
- onExpansionChanged: (value) {
- widget.walletListViewModel.updateTileState(index, value);
- setState(() {});
- },
- shouldShowCurrentWalletPointer: true,
- borderRadius: BorderRadius.all(Radius.circular(16)),
- margin: EdgeInsets.only(left: 20, right: 20, bottom: 12),
- title: groupName,
- tileKey: ValueKey('group_wallets_expansion_tile_widget_$index'),
- leadingWidget: Icon(
- Icons.account_balance_wallet_outlined,
- size: 28,
- ),
- trailingWidget: EditWalletButtonWidget(
- width: 74,
- isGroup: true,
- isExpanded:
- widget.walletListViewModel.expansionTileStateTrack[index]!,
- onTap: () {
- final wallet = widget.walletListViewModel
- .convertWalletInfoToWalletListItem(group.wallets.first);
- Navigator.of(context).pushNamed(
- Routes.walletEdit,
- arguments: WalletEditPageArguments(
- walletListViewModel: widget.walletListViewModel,
- editingWallet: wallet,
- isWalletGroup: true,
- groupName: groupName,
- walletGroupKey: group.groupKey,
- ),
- );
+ return GroupedWalletExpansionTile(
+ onExpansionChanged: (value) {
+ widget.walletListViewModel.updateTileState(index, value);
+ setState(() {});
},
- ),
- childWallets: group.wallets.map((walletInfo) {
- return widget.walletListViewModel
- .convertWalletInfoToWalletListItem(walletInfo);
- }).toList(),
- isSelected: false,
- onChildItemTapped: (wallet) =>
- wallet.isCurrent ? null : _loadWallet(wallet),
- childTrailingWidget: (item) {
- return item.isCurrent
- ? SizedBox.shrink()
- : Padding(
- padding: const EdgeInsets.only(right: 16),
- child: EditWalletButtonWidget(
- width: 44,
+ shouldShowCurrentWalletPointer: true,
+ borderRadius: BorderRadius.all(Radius.circular(16)),
+ title: groupName,
+ tileKey: ValueKey('group_wallets_expansion_tile_widget_$index'),
+ leadingWidget: Icon(
+ Icons.account_balance_wallet_outlined,
+ size: 28,
+ ),
+ trailingWidget: EditWalletButtonWidget(
+ width: 88,
+ isGroup: true,
+ isExpanded:
+ widget.walletListViewModel.expansionTileStateTrack[index]!,
+ onTap: () {
+ final wallet = widget.walletListViewModel
+ .convertWalletInfoToWalletListItem(group.wallets.first);
+ Navigator.of(context).pushNamed(
+ Routes.walletEdit,
+ arguments: WalletEditPageArguments(
+ walletListViewModel: widget.walletListViewModel,
+ editingWallet: wallet,
+ isWalletGroup: true,
+ groupName: groupName,
+ walletGroupKey: group.groupKey,
+ ),
+ );
+ },
+ ),
+ childWallets: group.wallets.map((walletInfo) {
+ return widget.walletListViewModel
+ .convertWalletInfoToWalletListItem(walletInfo);
+ }).toList(),
+ isSelected: false,
+ onChildItemTapped: (wallet) =>
+ wallet.isCurrent ? null : _loadWallet(wallet),
+ childTrailingWidget: (item) {
+ return item.isCurrent
+ ? SizedBox.shrink()
+ : EditWalletButtonWidget(
+ width: 60,
onTap: () => Navigator.of(context).pushNamed(
Routes.walletEdit,
arguments: WalletEditPageArguments(
@@ -234,11 +218,11 @@ class WalletListBodyState extends State<WalletListBody> {
editingWallet: item,
),
),
- ),
- );
- },
- );
- },
+ );
+ },
+ );
+ },
+ ),
),
),
),
@@ -257,68 +241,70 @@ class WalletListBodyState extends State<WalletListBody> {
),
),
SizedBox(height: 16),
- Container(
- child: Observer(
- builder: (_) => FilteredList(
- shrinkWrap: true,
- list: widget.walletListViewModel.singleWalletsList,
- updateFunction: widget.walletListViewModel.reorderAccordingToWalletList,
- itemBuilder: (context, index) {
- final wallet = widget.walletListViewModel.singleWalletsList[index];
- final currentColor = wallet.isCurrent
- ? Theme.of(context).colorScheme.primary
- : Theme.of(context).colorScheme.surface;
-
- return GroupedWalletExpansionTile(
- tileKey: ValueKey('single_wallets_expansion_tile_widget_$index'),
- isCurrentlySelectedWallet: wallet.isCurrent,
- leadingWidget: SizedBox(
- width: wallet.isCurrent ? 56 : 40,
- child: Row(
- children: [
- wallet.isCurrent
- ? Container(
- height: 35,
- width: 6,
- margin: EdgeInsets.only(right: 16),
- decoration: BoxDecoration(
- borderRadius: BorderRadius.only(
- topRight: Radius.circular(16),
- bottomRight: Radius.circular(16),
+ Padding(
+ padding: EdgeInsets.only(left: 20, right: 20),
+ child: Container(
+ child: Observer(
+ builder: (_) => FilteredList(
+ shrinkWrap: true,
+ list: widget.walletListViewModel.singleWalletsList,
+ updateFunction: widget.walletListViewModel.reorderAccordingToWalletList,
+ itemBuilder: (context, index) {
+ final wallet = widget.walletListViewModel.singleWalletsList[index];
+ final currentColor = wallet.isCurrent
+ ? Theme.of(context).colorScheme.primary
+ : Theme.of(context).colorScheme.surface;
+ return GroupedWalletExpansionTile(
+ tileKey: ValueKey('single_wallets_expansion_tile_widget_$index'),
+ isCurrentlySelectedWallet: wallet.isCurrent,
+ leadingWidget: SizedBox(
+ width: wallet.isCurrent ? 56 : 40,
+ child: Row(
+ children: [
+ wallet.isCurrent
+ ? Container(
+ height: 35,
+ width: 6,
+ margin: EdgeInsets.only(right: 16),
+ decoration: BoxDecoration(
+ borderRadius: BorderRadius.only(
+ topRight: Radius.circular(16),
+ bottomRight: Radius.circular(16),
+ ),
+ color: currentColor,
),
- color: currentColor,
- ),
- )
- : SizedBox(width: 6),
- Image.asset(
- walletTypeToCryptoCurrency(wallet.type).iconPath!,
- width: 32,
- height: 32,
- ),
- ],
+ )
+ : SizedBox(width: 6),
+ Image.asset(
+ walletTypeToCryptoCurrency(wallet.type).iconPath!,
+ width: 32,
+ height: 32,
+ ),
+ ],
+ ),
),
- ),
- title: wallet.name,
- isSelected: false,
- borderRadius: BorderRadius.all(Radius.circular(16)),
- margin: EdgeInsets.only(left: 20, right: 20, bottom: 12),
- onTitleTapped: () => wallet.isCurrent ? null : _loadWallet(wallet),
- trailingWidget: wallet.isCurrent
- ? null
- : EditWalletButtonWidget(
- width: 44,
- onTap: () {
- Navigator.of(context).pushNamed(
- Routes.walletEdit,
- arguments: WalletEditPageArguments(
- walletListViewModel: widget.walletListViewModel,
- editingWallet: wallet,
- ),
- );
- },
- ),
- );
- },
+ title: wallet.name,
+ isSelected: false,
+ borderRadius: BorderRadius.all(Radius.circular(16)),
+ margin: EdgeInsets.only(left: 20, right: 20, bottom: 12),
+ onTitleTapped: () => wallet.isCurrent ? null : _loadWallet(wallet),
+ trailingWidget: wallet.isCurrent
+ ? null
+ : EditWalletButtonWidget(
+ width: 64,
+ onTap: () {
+ Navigator.of(context).pushNamed(
+ Routes.walletEdit,
+ arguments: WalletEditPageArguments(
+ walletListViewModel: widget.walletListViewModel,
+ editingWallet: wallet,
+ ),
+ );
+ },
+ ),
+ );
+ },
+ ),
),
),
),
@@ -481,7 +467,8 @@ class WalletListBodyState extends State<WalletListBody> {
walletType: WalletType.monero,
hardwareWalletType: HardwareWalletType.ledger,
onConnectDevice: (context, ledgerVM) async {
- if (ledgerVM is LedgerViewModel) monero!.setGlobalLedgerConnection(ledgerVM.connection);
+ if (ledgerVM is LedgerViewModel)
+ monero!.setGlobalLedgerConnection(ledgerVM.connection);
didConnect = true;
Navigator.of(context).pop();
},
diff --git a/lib/src/screens/welcome/create_pin_welcome_page.dart b/lib/src/screens/welcome/create_pin_welcome_page.dart
index 49082a1..7637d7a 100644
--- a/lib/src/screens/welcome/create_pin_welcome_page.dart
+++ b/lib/src/screens/welcome/create_pin_welcome_page.dart
@@ -1,6 +1,5 @@
import 'package:cake_wallet/src/widgets/cake_image_widget.dart';
import 'package:cake_wallet/src/widgets/scollable_with_bottom_section.dart';
-import 'package:cake_wallet/themes/utils/custom_theme_colors.dart';
import 'package:flutter/gestures.dart';
import 'package:flutter/material.dart';
import 'package:cake_wallet/routes.dart';
@@ -59,9 +58,7 @@ class CreatePinWelcomePage extends BasePage {
gradient: LinearGradient(
colors: [
Theme.of(context).colorScheme.surface,
- currentTheme.isDark
- ? CustomThemeColors.backgroundGradientColorDark
- : CustomThemeColors.backgroundGradientColorLight,
+ currentTheme.customColors.backgroundGradientColor,
],
begin: Alignment.topCenter,
end: Alignment.bottomCenter,
diff --git a/lib/src/widgets/base_text_form_field.dart b/lib/src/widgets/base_text_form_field.dart
index 05baed5..fbff5a3 100644
--- a/lib/src/widgets/base_text_form_field.dart
+++ b/lib/src/widgets/base_text_form_field.dart
@@ -45,7 +45,8 @@ class BaseTextFormField extends StatelessWidget {
this.borderWidth = 1.0,
this.prefixIconConstraints,
this.suffixIconConstraints,
- super.key, this.suffixText,
+ super.key,
+ this.suffixText,
});
final TextEditingController? controller;
@@ -125,12 +126,12 @@ class BaseTextFormField extends StatelessWidget {
alignLabelWithHint: alignLabelWithHint,
contentPadding: contentPadding,
floatingLabelBehavior: floatingLabelBehavior ?? FloatingLabelBehavior.never,
- prefixIconConstraints: prefixIconConstraints ??
- const BoxConstraints(minWidth: 0, minHeight: 0),
+ prefixIconConstraints:
+ prefixIconConstraints ?? const BoxConstraints(minWidth: 40, minHeight: 0),
prefix: prefix,
prefixIcon: prefixIcon,
- suffixIconConstraints: suffixIconConstraints ??
- const BoxConstraints(minWidth: 0, minHeight: 0),
+ suffixIconConstraints:
+ suffixIconConstraints ?? const BoxConstraints(minWidth: 0, minHeight: 0),
suffix: suffix,
suffixIcon: suffixIcon,
filled: !hasUnderlineBorder,
diff --git a/lib/src/widgets/blockchain_height_widget.dart b/lib/src/widgets/blockchain_height_widget.dart
index cb7f71b..a835048 100644
--- a/lib/src/widgets/blockchain_height_widget.dart
+++ b/lib/src/widgets/blockchain_height_widget.dart
@@ -37,7 +37,6 @@ class BlockchainHeightWidget extends StatefulWidget {
final Function()? toggleSingleScan;
final WalletType walletType;
final Key? blockHeightTextFieldKey;
-
@override
State<StatefulWidget> createState() => BlockchainHeightState();
}
diff --git a/lib/src/widgets/bottom_sheet/add_passphrase_bottom_sheet_widget.dart b/lib/src/widgets/bottom_sheet/add_passphrase_bottom_sheet_widget.dart
index d00fd12..dde80d1 100644
--- a/lib/src/widgets/bottom_sheet/add_passphrase_bottom_sheet_widget.dart
+++ b/lib/src/widgets/bottom_sheet/add_passphrase_bottom_sheet_widget.dart
@@ -2,18 +2,16 @@ import 'package:cake_wallet/generated/i18n.dart';
import 'package:cake_wallet/src/widgets/base_text_form_field.dart';
import 'package:cake_wallet/src/widgets/cake_image_widget.dart';
import 'package:cake_wallet/src/widgets/primary_button.dart';
-import 'package:cake_wallet/themes/core/material_base_theme.dart';
+import 'package:cake_wallet/themes/core/theme_extension.dart';
import 'package:flutter/material.dart';
class AddPassphraseBottomSheet extends StatefulWidget {
AddPassphraseBottomSheet({
required String titleText,
- required this.currentTheme,
required this.onRestoreButtonPressed,
});
final void Function(String) onRestoreButtonPressed;
- final MaterialThemeBase currentTheme;
@override
State<AddPassphraseBottomSheet> createState() => _AddPassphraseBottomSheetState();
@@ -43,8 +41,8 @@ class _AddPassphraseBottomSheetState extends State<AddPassphraseBottomSheet> {
bool obscurePassphrase = true;
@override
Widget build(BuildContext context) {
-
- final passphraseImage = widget.currentTheme.isDark ? passphraseImageDark : passphraseImageLight;
+ final passphraseImage =
+ context.currentTheme.isDark ? passphraseImageDark : passphraseImageLight;
return Container(
decoration: BoxDecoration(
diff --git a/lib/src/widgets/bottom_sheet/base_bottom_sheet_widget.dart b/lib/src/widgets/bottom_sheet/base_bottom_sheet_widget.dart
index a822158..4b17a71 100644
--- a/lib/src/widgets/bottom_sheet/base_bottom_sheet_widget.dart
+++ b/lib/src/widgets/bottom_sheet/base_bottom_sheet_widget.dart
@@ -1,6 +1,5 @@
import 'package:cake_wallet/src/widgets/primary_button.dart';
import 'package:cake_wallet/src/widgets/standard_slide_button_widget.dart';
-import 'package:cake_wallet/themes/core/material_base_theme.dart';
import 'package:flutter/material.dart';
enum FooterType { none, slideActionButton, singleActionButton, doubleActionButton }
@@ -11,7 +10,6 @@ abstract class BaseBottomSheet extends StatelessWidget {
required this.titleText,
this.titleIconPath,
required this.footerType,
- this.currentTheme,
this.slideActionButtonText,
this.onSlideActionComplete,
this.singleActionButtonText,
@@ -25,12 +23,11 @@ abstract class BaseBottomSheet extends StatelessWidget {
this.leftActionButtonKey,
this.rightActionButtonKey,
required this.maxHeight,
- }) : assert(footerType == FooterType.none || currentTheme != null,
+ }) : assert(footerType == FooterType.none,
'currentTheme is required unless footerType is none');
final String titleText;
final String? titleIconPath;
- final MaterialThemeBase? currentTheme;
final FooterType footerType;
final String? slideActionButtonText;
final VoidCallback? onSlideActionComplete;
@@ -115,7 +112,6 @@ abstract class BaseBottomSheet extends StatelessWidget {
key: ValueKey('base_bottom_sheet_widget_standard_slide_button_key'),
buttonText: slideActionButtonText ?? '',
onSlideComplete: onSlideActionComplete ?? () {},
- currentTheme: currentTheme!,
accessibleNavigationModeButtonText: accessibleNavigationModeSlideWhy this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.