mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2025-06-28 12:29:51 +00:00
* Add theme base v2 * Initial new theme base files * Typos * Fixes * Update theme files * feat: Migrate to Material 3 Theming Foundation, Theme Data Refactor, and First Extension Cleanup Batch. This commit completes the first major phase of migrating to Material 3 theming by setting up the foundations for material 3 integration and begins the initial migration, removing custom theme extensions, updating theme data, and refactoring all relevant widget and page theming to use Material 3’s built-in color and typography tokens. These changes: - Lays the groundwork for Material 3 theming by restructuring the app’s theme configuration to use Material 3’s ColorScheme and TextTheme as the primary sources of color and typography throughout the app. - Refactors the core theme config files by removing legacy custom color roles ensuring all color definitions now map directly to Material 3’s role. - Begins the first batch migration of custom theme extensions (InfoTheme, PlaceholderTheme, KeyboardTheme, PinCodeTheme) and updates all affected widgets and pages to use Material 3 color and typography tokens instead of the custom properties. - Cleans up the codebase by deleting the files of the initial set of migrated extensions and eliminating all related imports and usages. * feat: Migrate to Material 3 Theming. This change: - Updates the themes README.md file to reflect the current structure and give more information based on the first major phase that was completed. * feat: Migrate to Material 3 Theming Deleting previous theme extensions * feat: Migrate to Material 3 Theming Another batch of migrations from existing extensions * feat: Migration to Material 3 Theming Third Migration batch for theme extensions * fwat: Migration to Material 3 Theming Final Migration batch for previous theme extensions * Update onboarding hero * Update button radius * Add surfaceContainer to light theme * feat(themes): Migrate to Material 3 Theming This change: - Adds new set of hero images - Modifies the core structure for the themes - Add missing color tokens to the theme classes - Adds a CustomThemeColor class for custom color tokens - Modifies the themelist to have a fall back for previous theme implementation - Adds localization for some texts - Modifies the flow for loading the theme on app start - Add a WidgetsBindingObserver that listens for changes in the device theme and updates the app theme when there is a change - Registers the themeStore as a Singleton for codebase wide use * feat(themes): Migrate to Material 3 theming This change: - Migrates UI flows across the app to the new themes - Confirms styling and typography of components across the app uses the new themes - Remove instances of Palette use - Switch TextStyles across the app to use theme text styles * feat(themes): Migrate to Material 3 Theming. This change: - Adjusts bottomsheets styling and removes duplicate close button - Removes more themedata extensions from the previous implementation * - Remove outlines from cards and dock - Update menu colors - Update padding/divider size for cards * - Update PIN screen - Fix navigation dock shadow - Update wallet screen colors * Update border radius --skip-ci * feat(themes): Migrate to Material 3 Theming. This change: - Adds gradient backgrounds to the dashbaord and balance cards. - Migrates the input fields across the app to BaseTextFormFields. - Removes dependence of input fields on individual styling, focusing instead on using theme defined InputDecoration styling with adjustments on individual components where needed. - Applies new theme styling to BaseTextFormField, AddressTextField and CurrencyAmountTextField. * - Switch some hero images to PNG - Fix nagivation_dock shadow - Minor fixes * feat: Add fallback to previous underline styling in central widgets This change: - Adds a fallback to CurrencyAmountTextField, AddressTextField, and BaseTextFormField, allowing them use the previous theme styling. - Adds localization for new texts * feat(themes): Update warning box colors for dark and light themes * feat(themes): Relaod themes when user restores from backup, ensuring the user previous theme preference is used. * feat(themes): Handle themes logic during restore from backup This change: - Refactors theme loading logic to handle backup restore edgecase - Refreshes the theme based on the user saved preference during restore from backup flow * Fix card gradients and spacing * Fix even more radiuses Test new icons for navigation_dock.dart * Update onboarding flow backgrounds Fix swap icon clipping Fix some text colors Add more hero images * Fix incorrect color for light theme * Fix more hero images and cleanup * Update text field icons Fix info box CTA colors Fix sync indicator colors * Update toggle colors Update dark theme colors (minor) Update crypto_balance_widget.dart icon * Update page transitions in router.dart Fix some colors * feat(themes): Display label by default for filled textfields * feat(themes): Refactor theme handling across various components This change: - Fixes issue with themeMode resetting to system mode when app is restarted causing a UI glitch - Updates theme checks from `currentTheme.type == ThemeType.dark` to `currentTheme.isDark` for consistency - Adjusts UI components to use the theme directly from the themeStore * feat(themes): Add animating tagline to the create pin welcome screen * Revert text fields label temporarily, fix a couple colors, and cleanup some images --------- Co-authored-by: OmarHatem <omarh.ismail1@gmail.com> Co-authored-by: Blazebrain <davidadegoke16@gmail.com>
113 lines
6.7 KiB
Dart
113 lines
6.7 KiB
Dart
class PreferencesKey {
|
|
static const currentWalletType = 'current_wallet_type';
|
|
static const currentWalletName = 'current_wallet_name';
|
|
static const currentNodeIdKey = 'current_node_id';
|
|
static const currentBitcoinElectrumSererIdKey = 'current_node_id_btc';
|
|
static const currentLitecoinElectrumSererIdKey = 'current_node_id_ltc';
|
|
static const currentHavenNodeIdKey = 'current_node_id_xhv';
|
|
static const currentZanoNodeIdKey = 'current_node_id_zano';
|
|
static const currentEthereumNodeIdKey = 'current_node_id_eth';
|
|
static const currentPolygonNodeIdKey = 'current_node_id_matic';
|
|
static const currentNanoNodeIdKey = 'current_node_id_nano';
|
|
static const currentNanoPowNodeIdKey = 'current_node_id_nano_pow';
|
|
static const currentDecredNodeIdKey = 'current_node_id_decred';
|
|
static const currentBananoNodeIdKey = 'current_node_id_banano';
|
|
static const currentBananoPowNodeIdKey = 'current_node_id_banano_pow';
|
|
static const currentFiatCurrencyKey = 'current_fiat_currency';
|
|
static const currentCakePayCountry = 'current_cake_pay_country';
|
|
static const currentBitcoinCashNodeIdKey = 'current_node_id_bch';
|
|
static const currentSolanaNodeIdKey = 'current_node_id_sol';
|
|
static const currentTronNodeIdKey = 'current_node_id_trx';
|
|
static const currentWowneroNodeIdKey = 'current_node_id_wow';
|
|
static const currentTransactionPriorityKeyLegacy = 'current_fee_priority';
|
|
static const currentBalanceDisplayModeKey = 'current_balance_display_mode';
|
|
static const shouldSaveRecipientAddressKey = 'save_recipient_address';
|
|
static const isAppSecureKey = 'is_app_secure';
|
|
static const disableTradeOption = 'disable_buy';
|
|
static const disableBulletinKey = 'disable_bulletin';
|
|
static const walletListOrder = 'wallet_list_order';
|
|
static const contactListOrder = 'contact_list_order';
|
|
static const walletListAscending = 'wallet_list_ascending';
|
|
static const contactListAscending = 'contact_list_ascending';
|
|
static const currentFiatApiModeKey = 'current_fiat_api_mode';
|
|
static const failedTotpTokenTrials = 'failed_token_trials';
|
|
static const disableExchangeKey = 'disable_exchange';
|
|
static const exchangeStatusKey = 'exchange_status';
|
|
static const currentTheme = 'current_theme';
|
|
static const themeMode = 'theme_mode';
|
|
static const displayActionListModeKey = 'display_list_mode';
|
|
static const currentPinLength = 'current_pin_length';
|
|
static const currentLanguageCode = 'language_code';
|
|
static const currentSeedPhraseLength = 'current_seed_phrase_length';
|
|
static const currentDefaultSettingsMigrationVersion =
|
|
'current_default_settings_migration_version';
|
|
static const moneroTransactionPriority = 'current_fee_priority_monero';
|
|
static const bitcoinTransactionPriority = 'current_fee_priority_bitcoin';
|
|
static const havenTransactionPriority = 'current_fee_priority_haven';
|
|
static const litecoinTransactionPriority = 'current_fee_priority_litecoin';
|
|
static const ethereumTransactionPriority = 'current_fee_priority_ethereum';
|
|
static const polygonTransactionPriority = 'current_fee_priority_polygon';
|
|
static const bitcoinCashTransactionPriority = 'current_fee_priority_bitcoin_cash';
|
|
static const zanoTransactionPriority = 'current_fee_priority_zano';
|
|
static const wowneroTransactionPriority = 'current_fee_priority_wownero';
|
|
static const decredTransactionPriority = 'current_fee_priority_decred';
|
|
static const customBitcoinFeeRate = 'custom_electrum_fee_rate';
|
|
static const silentPaymentsCardDisplay = 'silentPaymentsCardDisplay';
|
|
static const silentPaymentsAlwaysScan = 'silentPaymentsAlwaysScan';
|
|
static const mwebCardDisplay = 'mwebCardDisplay';
|
|
static const mwebEnabled = 'mwebEnabled';
|
|
static const hasEnabledMwebBefore = 'hasEnabledMwebBefore';
|
|
static const mwebAlwaysScan = 'mwebAlwaysScan';
|
|
static const mwebNodeUri = 'mwebNodeUri';
|
|
static const shouldShowReceiveWarning = 'should_show_receive_warning';
|
|
static const shouldShowYatPopup = 'should_show_yat_popup';
|
|
static const shouldShowRepWarning = 'should_show_rep_warning';
|
|
static const moneroWalletPasswordUpdateV1Base = 'monero_wallet_update_v1';
|
|
static const syncModeKey = 'sync_mode';
|
|
static const syncAllKey = 'sync_all';
|
|
static const lastPopupDate = 'last_popup_date';
|
|
static const lastAppReviewDate = 'last_app_review_date';
|
|
static const sortBalanceBy = 'sort_balance_by';
|
|
static const pinNativeTokenAtTop = 'pin_native_token_at_top';
|
|
static const useEtherscan = 'use_etherscan';
|
|
static const usePolygonScan = 'use_polygonscan';
|
|
static const useTronGrid = 'use_trongrid';
|
|
static const useMempoolFeeAPI = 'use_mempool_fee_api';
|
|
static const defaultNanoRep = 'default_nano_representative';
|
|
static const defaultBananoRep = 'default_banano_representative';
|
|
static const lookupsTwitter = 'looks_up_twitter';
|
|
static const lookupsZanoAlias = 'looks_up_zano_alias';
|
|
static const lookupsMastodon = 'looks_up_mastodon';
|
|
static const lookupsYatService = 'looks_up_yat';
|
|
static const lookupsUnstoppableDomains = 'looks_up_unstoppable_domain';
|
|
static const lookupsOpenAlias = 'looks_up_open_alias';
|
|
static const lookupsENS = 'looks_up_ens';
|
|
static const lookupsWellKnown = 'looks_up_well_known';
|
|
static const usePayjoin = 'use_payjoin';
|
|
static const showPayjoinCard = 'show_payjoin_card';
|
|
static const showCameraConsent = 'show_camera_consent';
|
|
static const showDecredInfoCard = 'show_decred_info_card';
|
|
|
|
static String moneroWalletUpdateV1Key(String name) =>
|
|
'${PreferencesKey.moneroWalletPasswordUpdateV1Base}_${name}';
|
|
|
|
static const exchangeProvidersSelection = 'exchange-providers-selection';
|
|
static const trocadorProviderStatesKey = 'trocador_provider_states';
|
|
static const autoGenerateSubaddressStatusKey = 'auto_generate_subaddress_status';
|
|
static const moneroSeedType = 'monero_seed_type';
|
|
static const bitcoinSeedType = 'bitcoin_seed_type';
|
|
static const nanoSeedType = 'nano_seed_type';
|
|
static const clearnetDonationLink = 'clearnet_donation_link';
|
|
static const onionDonationLink = 'onion_donation_link';
|
|
static const donationLinkWalletName = 'donation_link_wallet_name';
|
|
static const lastSeenAppVersion = 'last_seen_app_version';
|
|
static const shouldShowMarketPlaceInDashboard = 'should_show_marketplace_in_dashboard';
|
|
static const showAddressBookPopupEnabled = 'show_address_book_popup_enabled';
|
|
static const isNewInstall = 'is_new_install';
|
|
static const serviceStatusShaKey = 'service_status_sha_key';
|
|
static const walletConnectPairingTopicsList = 'wallet_connect_pairing_topics_list';
|
|
static String walletConnectPairingTopicsListForWallet(String publicKey) =>
|
|
'${PreferencesKey.walletConnectPairingTopicsList}_${publicKey}';
|
|
static String backgroundSyncLastTrigger(String walletId) => 'background_sync_last_trigger_${walletId}';
|
|
static const backgroundSyncNotificationsEnabled = 'background_sync_notifications_enabled';
|
|
}
|