From 2525318b6da1d4c6b0b0839fa6da690cb15d4638 Mon Sep 17 00:00:00 2001 From: Rafael Saes Date: Mon, 3 Jul 2023 09:32:29 -0300 Subject: [PATCH] refactor: text themes using the same color as primaryColor --- lib/src/screens/backup/backup_page.dart | 5 +---- .../screens/backup/edit_backup_password_page.dart | 5 +---- lib/src/screens/buy/pre_order_page.dart | 2 +- lib/src/screens/contact/contact_page.dart | 5 +---- lib/src/screens/exchange/exchange_page.dart | 2 +- .../widgets/currency_picker_item_widget.dart | 5 +---- .../exchange_trade/exchange_confirm_page.dart | 5 +---- .../exchange_trade/exchange_trade_page.dart | 10 ++-------- .../ionia/auth/ionia_create_account_page.dart | 15 +++------------ lib/src/screens/ionia/auth/ionia_login_page.dart | 5 +---- .../screens/ionia/auth/ionia_verify_otp_page.dart | 5 +---- .../screens/ionia/auth/ionia_welcome_page.dart | 5 +---- .../ionia/cards/ionia_account_cards_page.dart | 5 +---- .../screens/ionia/cards/ionia_account_page.dart | 5 +---- .../cards/ionia_activate_debit_card_page.dart | 5 +---- .../ionia/cards/ionia_buy_card_detail_page.dart | 4 ++-- .../screens/ionia/cards/ionia_buy_gift_card.dart | 5 +---- .../ionia/cards/ionia_custom_redeem_page.dart | 5 +---- .../ionia/cards/ionia_custom_tip_page.dart | 5 +---- .../ionia/cards/ionia_debit_card_page.dart | 10 ++-------- .../ionia/cards/ionia_gift_card_detail_page.dart | 2 +- .../ionia/cards/ionia_payment_status_page.dart | 2 +- .../screens/ionia/widgets/ionia_filter_modal.dart | 2 +- .../screens/ionia/widgets/rounded_checkbox.dart | 2 +- .../monero_account_edit_or_create_page.dart | 2 +- .../monero_accounts/monero_account_list_page.dart | 2 +- .../monero_accounts/widgets/account_tile.dart | 2 +- .../advanced_privacy_settings_page.dart | 5 +---- .../screens/new_wallet/new_wallet_type_page.dart | 5 +---- .../screens/nodes/node_create_or_edit_page.dart | 5 +---- lib/src/screens/receive/anonpay_invoice_page.dart | 5 +---- lib/src/screens/rescan/rescan_page.dart | 5 +---- .../screens/restore/restore_from_backup_page.dart | 5 +---- .../restore/restore_wallet_from_seed_details.dart | 5 +---- lib/src/screens/seed/pre_seed_page.dart | 5 +---- lib/src/screens/send/send_page.dart | 2 +- .../settings/widgets/settings_choices_cell.dart | 5 +---- .../setup_2fa/setup_2fa_enter_code_page.dart | 2 +- lib/src/screens/setup_2fa/setup_2fa_qr_page.dart | 2 +- .../subaddress/address_edit_or_create_page.dart | 5 +---- lib/src/screens/wallet_list/wallet_list_page.dart | 2 +- lib/src/widgets/alert_with_one_action.dart | 5 +---- lib/src/widgets/base_alert_dialog.dart | 5 +---- lib/src/widgets/picker.dart | 5 +---- lib/src/widgets/standard_switch.dart | 5 +---- lib/themes/bright_theme.dart | 5 ----- lib/themes/dark_theme.dart | 4 ---- lib/themes/light_theme.dart | 4 ---- 48 files changed, 50 insertions(+), 168 deletions(-) diff --git a/lib/src/screens/backup/backup_page.dart b/lib/src/screens/backup/backup_page.dart index 6f720ed9a..7c3c67ead 100644 --- a/lib/src/screens/backup/backup_page.dart +++ b/lib/src/screens/backup/backup_page.dart @@ -79,10 +79,7 @@ class BackupPage extends BasePage { isLoading: backupViewModelBase.state is IsExecutingState, onPressed: () => onExportBackup(context), text: S.of(context).export_backup, - color: Theme.of(context) - .accentTextTheme! - .bodyLarge! - .color!, + color: Theme.of(context).primaryColor, textColor: Colors.white)), bottom: 24, left: 24, diff --git a/lib/src/screens/backup/edit_backup_password_page.dart b/lib/src/screens/backup/edit_backup_password_page.dart index 40eb722c9..ccbefe14f 100644 --- a/lib/src/screens/backup/edit_backup_password_page.dart +++ b/lib/src/screens/backup/edit_backup_password_page.dart @@ -48,10 +48,7 @@ class EditBackupPasswordPage extends BasePage { builder: (_) => PrimaryButton( onPressed: () => onSave(context), text: S.of(context).save, - color: Theme.of(context) - .accentTextTheme! - .bodyLarge! - .color!, + color: Theme.of(context).primaryColor, textColor: Colors.white, isDisabled: !editBackupPasswordViewModel.canSave)), bottom: 24, diff --git a/lib/src/screens/buy/pre_order_page.dart b/lib/src/screens/buy/pre_order_page.dart index ccd6a5422..6887ca2e9 100644 --- a/lib/src/screens/buy/pre_order_page.dart +++ b/lib/src/screens/buy/pre_order_page.dart @@ -248,7 +248,7 @@ class PreOrderPage extends BasePage { ? S.of(context).buy : S.of(context).buy_with + ' ${buyViewModel.selectedProvider!.description.title}', - color: Theme.of(context).accentTextTheme!.bodyLarge!.color!, + color: Theme.of(context).primaryColor, textColor: Colors.white, isLoading: buyViewModel.isRunning, isDisabled: (buyViewModel.selectedProvider == null) || diff --git a/lib/src/screens/contact/contact_page.dart b/lib/src/screens/contact/contact_page.dart index fc9c6c109..88f1318a4 100644 --- a/lib/src/screens/contact/contact_page.dart +++ b/lib/src/screens/contact/contact_page.dart @@ -143,10 +143,7 @@ class ContactPage extends BasePage { await contactViewModel.save(); }, text: S.of(context).save, - color: Theme.of(context) - .accentTextTheme! - .bodyLarge! - .color!, + color: Theme.of(context).primaryColor, textColor: Colors.white, isDisabled: !contactViewModel.isReady))) ], diff --git a/lib/src/screens/exchange/exchange_page.dart b/lib/src/screens/exchange/exchange_page.dart index 04d7d1201..60d551a05 100644 --- a/lib/src/screens/exchange/exchange_page.dart +++ b/lib/src/screens/exchange/exchange_page.dart @@ -243,7 +243,7 @@ class ExchangePage extends BasePage { } } }, - color: Theme.of(context).accentTextTheme!.bodyLarge!.color!, + color: Theme.of(context).primaryColor, textColor: Colors.white, isDisabled: exchangeViewModel.selectedProviders.isEmpty, isLoading: exchangeViewModel.tradeState is TradeIsCreating)), diff --git a/lib/src/screens/exchange/widgets/currency_picker_item_widget.dart b/lib/src/screens/exchange/widgets/currency_picker_item_widget.dart index f29562b9d..a38c09ed7 100644 --- a/lib/src/screens/exchange/widgets/currency_picker_item_widget.dart +++ b/lib/src/screens/exchange/widgets/currency_picker_item_widget.dart @@ -83,10 +83,7 @@ class PickerItemWidget extends StatelessWidget { ), if (isSelected) Icon(Icons.check_circle, - color: Theme.of(context) - .accentTextTheme! - .bodyLarge! - .color!) + color: Theme.of(context).primaryColor) ], ), ), diff --git a/lib/src/screens/exchange_trade/exchange_confirm_page.dart b/lib/src/screens/exchange_trade/exchange_confirm_page.dart index 8b59e8ab7..b3a292f9d 100644 --- a/lib/src/screens/exchange_trade/exchange_confirm_page.dart +++ b/lib/src/screens/exchange_trade/exchange_confirm_page.dart @@ -133,10 +133,7 @@ class ExchangeConfirmPage extends BasePage { onPressed: () => Navigator.of(context) .pushReplacementNamed(Routes.exchangeTrade), text: S.of(context).saved_the_trade_id, - color: Theme.of(context) - .accentTextTheme! - .bodyLarge! - .color!, + color: Theme.of(context).primaryColor, textColor: Colors.white) ], ), diff --git a/lib/src/screens/exchange_trade/exchange_trade_page.dart b/lib/src/screens/exchange_trade/exchange_trade_page.dart index 322eb2fe1..b412585b7 100644 --- a/lib/src/screens/exchange_trade/exchange_trade_page.dart +++ b/lib/src/screens/exchange_trade/exchange_trade_page.dart @@ -228,10 +228,7 @@ class ExchangeTradeState extends State { onPressed: () => widget.exchangeTradeViewModel.confirmSending(), text: S.of(context).confirm, - color: Theme.of(context) - .accentTextTheme! - .bodyLarge! - .color!, + color: Theme.of(context).primaryColor, textColor: Colors.white) : Offstage(); })), @@ -360,10 +357,7 @@ class ExchangeTradeState extends State { RequestReviewHandler.requestReview(); }, text: S.of(popupContext).send_got_it, - color: Theme.of(popupContext) - .accentTextTheme! - .bodyLarge! - .color!, + color: Theme.of(popupContext).primaryColor, textColor: Colors.white)) ], ); diff --git a/lib/src/screens/ionia/auth/ionia_create_account_page.dart b/lib/src/screens/ionia/auth/ionia_create_account_page.dart index 3c8c71290..543ceec98 100644 --- a/lib/src/screens/ionia/auth/ionia_create_account_page.dart +++ b/lib/src/screens/ionia/auth/ionia_create_account_page.dart @@ -84,10 +84,7 @@ class IoniaCreateAccountPage extends BasePage { onPressed: _createAccount, isLoading: _authViewModel.createUserState is IoniaCreateStateLoading, - color: Theme.of(context) - .accentTextTheme! - .bodyLarge! - .color!, + color: Theme.of(context).primaryColor, textColor: Colors.white, ), ), @@ -107,10 +104,7 @@ class IoniaCreateAccountPage extends BasePage { TextSpan( text: S.of(context).settings_terms_and_conditions, style: TextStyle( - color: Theme.of(context) - .accentTextTheme! - .bodyLarge! - .color!, + color: Theme.of(context).primaryColor, fontWeight: FontWeight.w700, ), recognizer: TapGestureRecognizer() @@ -122,10 +116,7 @@ class IoniaCreateAccountPage extends BasePage { TextSpan( text: S.of(context).privacy_policy, style: TextStyle( - color: Theme.of(context) - .accentTextTheme! - .bodyLarge! - .color!, + color: Theme.of(context).primaryColor, fontWeight: FontWeight.w700, ), recognizer: TapGestureRecognizer() diff --git a/lib/src/screens/ionia/auth/ionia_login_page.dart b/lib/src/screens/ionia/auth/ionia_login_page.dart index 912b9c3dc..f1b48a989 100644 --- a/lib/src/screens/ionia/auth/ionia_login_page.dart +++ b/lib/src/screens/ionia/auth/ionia_login_page.dart @@ -74,10 +74,7 @@ class IoniaLoginPage extends BasePage { text: S.of(context).login, onPressed: _login, isLoading: _authViewModel.signInState is IoniaCreateStateLoading, - color: Theme.of(context) - .accentTextTheme! - .bodyLarge! - .color!, + color: Theme.of(context).primaryColor, textColor: Colors.white, ), ), diff --git a/lib/src/screens/ionia/auth/ionia_verify_otp_page.dart b/lib/src/screens/ionia/auth/ionia_verify_otp_page.dart index 7382a6aee..3fdc4c01c 100644 --- a/lib/src/screens/ionia/auth/ionia_verify_otp_page.dart +++ b/lib/src/screens/ionia/auth/ionia_verify_otp_page.dart @@ -126,10 +126,7 @@ class IoniaVerifyIoniaOtp extends BasePage { onPressed: _verify, isDisabled: _authViewModel.otpState is IoniaOtpSendDisabled, isLoading: _authViewModel.otpState is IoniaOtpValidating, - color: Theme.of(context) - .accentTextTheme! - .bodyLarge! - .color!, + color: Theme.of(context).primaryColor, textColor: Colors.white, ), ), diff --git a/lib/src/screens/ionia/auth/ionia_welcome_page.dart b/lib/src/screens/ionia/auth/ionia_welcome_page.dart index 91d09c2db..135ea011a 100644 --- a/lib/src/screens/ionia/auth/ionia_welcome_page.dart +++ b/lib/src/screens/ionia/auth/ionia_welcome_page.dart @@ -59,10 +59,7 @@ class IoniaWelcomePage extends BasePage { PrimaryButton( text: S.of(context).create_account, onPressed: () => Navigator.of(context).pushNamed(Routes.ioniaCreateAccountPage), - color: Theme.of(context) - .accentTextTheme! - .bodyLarge! - .color!, + color: Theme.of(context).primaryColor, textColor: Colors.white, ), SizedBox( diff --git a/lib/src/screens/ionia/cards/ionia_account_cards_page.dart b/lib/src/screens/ionia/cards/ionia_account_cards_page.dart index 1e88078ee..c79c58f28 100644 --- a/lib/src/screens/ionia/cards/ionia_account_cards_page.dart +++ b/lib/src/screens/ionia/cards/ionia_account_cards_page.dart @@ -89,10 +89,7 @@ class _IoniaCardTabsState extends State<_IoniaCardTabs> with SingleTickerProvide borderRadius: BorderRadius.circular( 25.0, ), - color: Theme.of(context) - .accentTextTheme! - .bodyLarge! - .color!, + color: Theme.of(context).primaryColor, ), labelColor: Theme.of(context) .primaryTextTheme! diff --git a/lib/src/screens/ionia/cards/ionia_account_page.dart b/lib/src/screens/ionia/cards/ionia_account_page.dart index f3ce3f560..8163ffef1 100644 --- a/lib/src/screens/ionia/cards/ionia_account_page.dart +++ b/lib/src/screens/ionia/cards/ionia_account_page.dart @@ -136,10 +136,7 @@ class IoniaAccountPage extends BasePage { bottomSection: Column( children: [ PrimaryButton( - color: Theme.of(context) - .accentTextTheme! - .bodyLarge! - .color!, + color: Theme.of(context).primaryColor, textColor: Colors.white, text: S.of(context).logout, onPressed: () { diff --git a/lib/src/screens/ionia/cards/ionia_activate_debit_card_page.dart b/lib/src/screens/ionia/cards/ionia_activate_debit_card_page.dart index ff1b918eb..511150320 100644 --- a/lib/src/screens/ionia/cards/ionia_activate_debit_card_page.dart +++ b/lib/src/screens/ionia/cards/ionia_activate_debit_card_page.dart @@ -79,10 +79,7 @@ class IoniaActivateDebitCardPage extends BasePage { }, isLoading: _cardsListViewModel.createCardState is IoniaCreateCardLoading, text: S.of(context).agree_and_continue, - color: Theme.of(context) - .accentTextTheme! - .bodyLarge! - .color!, + color: Theme.of(context).primaryColor, textColor: Colors.white, ), ); diff --git a/lib/src/screens/ionia/cards/ionia_buy_card_detail_page.dart b/lib/src/screens/ionia/cards/ionia_buy_card_detail_page.dart index 892886497..2786b21cc 100644 --- a/lib/src/screens/ionia/cards/ionia_buy_card_detail_page.dart +++ b/lib/src/screens/ionia/cards/ionia_buy_card_detail_page.dart @@ -202,7 +202,7 @@ class IoniaBuyGiftCardDetailPage extends BasePage { ioniaPurchaseViewModel.invoiceCommittingState is IsExecutingState, onPressed: () => purchaseCard(context), text: S.of(context).purchase_gift_card, - color: Theme.of(context).accentTextTheme!.bodyLarge!.color!, + color: Theme.of(context).primaryColor, textColor: Colors.white, ); }), @@ -323,7 +323,7 @@ class IoniaBuyGiftCardDetailPage extends BasePage { alertLeftActionButtonTextColor: Colors.white, alertRightActionButtonTextColor: Colors.white, alertLeftActionButtonColor: Palette.brightOrange, - alertRightActionButtonColor: Theme.of(context).textTheme!.titleSmall!.color, + alertRightActionButtonColor: Theme.of(context).primaryColor, actionRightButton: () async { Navigator.of(context).pop(); await ioniaPurchaseViewModel.commitPaymentInvoice(); diff --git a/lib/src/screens/ionia/cards/ionia_buy_gift_card.dart b/lib/src/screens/ionia/cards/ionia_buy_gift_card.dart index e8dce712e..14f19f8e8 100644 --- a/lib/src/screens/ionia/cards/ionia_buy_gift_card.dart +++ b/lib/src/screens/ionia/cards/ionia_buy_gift_card.dart @@ -195,10 +195,7 @@ class IoniaBuyGiftCardPage extends BasePage { ), text: S.of(context).continue_text, isDisabled: !ioniaBuyCardViewModel.isEnablePurchase, - color: Theme.of(context) - .accentTextTheme! - .bodyLarge! - .color!, + color: Theme.of(context).primaryColor, textColor: Colors.white, ), ); diff --git a/lib/src/screens/ionia/cards/ionia_custom_redeem_page.dart b/lib/src/screens/ionia/cards/ionia_custom_redeem_page.dart index 2a5f39845..6a8237695 100644 --- a/lib/src/screens/ionia/cards/ionia_custom_redeem_page.dart +++ b/lib/src/screens/ionia/cards/ionia_custom_redeem_page.dart @@ -178,10 +178,7 @@ class IoniaCustomRedeemPage extends BasePage { isLoading: ioniaCustomRedeemViewModel.redeemState is IsExecutingState, isDisabled: ioniaCustomRedeemViewModel.disableRedeem, text: S.of(context).add_custom_redemption, - color: Theme.of(context) - .accentTextTheme! - .bodyLarge! - .color!, + color: Theme.of(context).primaryColor, textColor: Colors.white, onPressed: () => ioniaCustomRedeemViewModel.addCustomRedeem().then((value) { Navigator.of(context).pop(ioniaCustomRedeemViewModel.remaining.toString()); diff --git a/lib/src/screens/ionia/cards/ionia_custom_tip_page.dart b/lib/src/screens/ionia/cards/ionia_custom_tip_page.dart index f31f0ef30..6286cebf1 100644 --- a/lib/src/screens/ionia/cards/ionia_custom_tip_page.dart +++ b/lib/src/screens/ionia/cards/ionia_custom_tip_page.dart @@ -184,10 +184,7 @@ class IoniaCustomTipPage extends BasePage { Navigator.of(context).pop(customTipViewModel.customTip); }, text: S.of(context).add_tip, - color: Theme.of(context) - .accentTextTheme! - .bodyLarge! - .color!, + color: Theme.of(context).primaryColor, textColor: Colors.white, ), ), diff --git a/lib/src/screens/ionia/cards/ionia_debit_card_page.dart b/lib/src/screens/ionia/cards/ionia_debit_card_page.dart index 968e8cc34..5f79c5d48 100644 --- a/lib/src/screens/ionia/cards/ionia_debit_card_page.dart +++ b/lib/src/screens/ionia/cards/ionia_debit_card_page.dart @@ -73,10 +73,7 @@ class IoniaDebitCardPage extends BasePage { PrimaryButton( text: S.of(context).add_value, onPressed: () {}, - color: Theme.of(context) - .accentTextTheme! - .bodyLarge! - .color!, + color: Theme.of(context).primaryColor, textColor: Colors.white, ), SizedBox(height: 16) @@ -150,10 +147,7 @@ class IoniaDebitCardPage extends BasePage { bottomSection: PrimaryButton( text: S.of(context).activate, onPressed: () => _showHowToUseCard(context, activate: true), - color: Theme.of(context) - .accentTextTheme! - .bodyLarge! - .color!, + color: Theme.of(context).primaryColor, textColor: Colors.white, ), ); diff --git a/lib/src/screens/ionia/cards/ionia_gift_card_detail_page.dart b/lib/src/screens/ionia/cards/ionia_gift_card_detail_page.dart index 9d017bc69..2526fc156 100644 --- a/lib/src/screens/ionia/cards/ionia_gift_card_detail_page.dart +++ b/lib/src/screens/ionia/cards/ionia_gift_card_detail_page.dart @@ -158,7 +158,7 @@ class IoniaGiftCardDetailPage extends BasePage { }, ), text: S.of(context).mark_as_redeemed, - color: Theme.of(context).accentTextTheme!.bodyLarge!.color!, + color: Theme.of(context).primaryColor, textColor: Colors.white, ), ], diff --git a/lib/src/screens/ionia/cards/ionia_payment_status_page.dart b/lib/src/screens/ionia/cards/ionia_payment_status_page.dart index 50af2f2f6..e692c6e0b 100644 --- a/lib/src/screens/ionia/cards/ionia_payment_status_page.dart +++ b/lib/src/screens/ionia/cards/ionia_payment_status_page.dart @@ -175,7 +175,7 @@ class _IoniaPaymentStatusPageBodyBodyState extends State<_IoniaPaymentStatusPage Routes.ioniaGiftCardDetailPage, arguments: [widget.viewModel.giftCard]), text: S.of(context).open_gift_card, - color: Theme.of(context).accentTextTheme!.bodyLarge!.color!, + color: Theme.of(context).primaryColor, textColor: Colors.white); } diff --git a/lib/src/screens/ionia/widgets/ionia_filter_modal.dart b/lib/src/screens/ionia/widgets/ionia_filter_modal.dart index 4c40270b1..6efb66ab4 100644 --- a/lib/src/screens/ionia/widgets/ionia_filter_modal.dart +++ b/lib/src/screens/ionia/widgets/ionia_filter_modal.dart @@ -20,7 +20,7 @@ class IoniaFilterModal extends StatelessWidget { padding: EdgeInsets.all(10), child: Image.asset( 'assets/images/mini_search_icon.png', - color: Theme.of(context).textTheme!.titleSmall!.color!, + color: Theme.of(context).primaryColor, ), ); return Scaffold( diff --git a/lib/src/screens/ionia/widgets/rounded_checkbox.dart b/lib/src/screens/ionia/widgets/rounded_checkbox.dart index 51a09e5d9..509708dc2 100644 --- a/lib/src/screens/ionia/widgets/rounded_checkbox.dart +++ b/lib/src/screens/ionia/widgets/rounded_checkbox.dart @@ -15,7 +15,7 @@ class RoundedCheckbox extends StatelessWidget { width: 20.0, decoration: BoxDecoration( borderRadius: BorderRadius.all(Radius.circular(50.0)), - color: Theme.of(context).accentTextTheme!.bodyLarge!.color!, + color: Theme.of(context).primaryColor, ), child: Icon( Icons.check, diff --git a/lib/src/screens/monero_accounts/monero_account_edit_or_create_page.dart b/lib/src/screens/monero_accounts/monero_account_edit_or_create_page.dart index 1b5f6be6b..779628be8 100644 --- a/lib/src/screens/monero_accounts/monero_account_edit_or_create_page.dart +++ b/lib/src/screens/monero_accounts/monero_account_edit_or_create_page.dart @@ -56,7 +56,7 @@ class MoneroAccountEditOrCreatePage extends BasePage { text: moneroAccountCreationViewModel.isEdit ? S.of(context).rename : S.of(context).add, - color: Theme.of(context).accentTextTheme!.bodyLarge!.color!, + color: Theme.of(context).primaryColor, textColor: Colors.white, isLoading: moneroAccountCreationViewModel.state is IsExecutingState, diff --git a/lib/src/screens/monero_accounts/monero_account_list_page.dart b/lib/src/screens/monero_accounts/monero_account_list_page.dart index ff5087cdd..358977577 100644 --- a/lib/src/screens/monero_accounts/monero_account_list_page.dart +++ b/lib/src/screens/monero_accounts/monero_account_list_page.dart @@ -128,7 +128,7 @@ class MoneroAccountListPage extends StatelessWidget { .pushNamed(Routes.accountCreation), child: Container( height: 62, - color: Theme.of(context).cardColor, + color: Theme.of(context).primaryColor, padding: EdgeInsets.only(left: 24, right: 24), child: Center( child: Row( diff --git a/lib/src/screens/monero_accounts/widgets/account_tile.dart b/lib/src/screens/monero_accounts/widgets/account_tile.dart index a446ca556..2d2185c8b 100644 --- a/lib/src/screens/monero_accounts/widgets/account_tile.dart +++ b/lib/src/screens/monero_accounts/widgets/account_tile.dart @@ -23,7 +23,7 @@ class AccountTile extends StatelessWidget { ? Theme.of(context).textTheme!.titleSmall!.decorationColor! : Theme.of(context).textTheme!.displayLarge!.decorationColor!; final textColor = isCurrent - ? Theme.of(context).textTheme!.titleSmall!.color! + ? Theme.of(context).primaryColor : Theme.of(context).textTheme!.displayLarge!.color!; final Widget cell = GestureDetector( 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 c49644d7c..35de5bc3c 100644 --- a/lib/src/screens/new_wallet/advanced_privacy_settings_page.dart +++ b/lib/src/screens/new_wallet/advanced_privacy_settings_page.dart @@ -111,10 +111,7 @@ class _AdvancedPrivacySettingsBodyState extends State { bottomSection: PrimaryButton( onPressed: () => onTypeSelected(), text: S.of(context).seed_language_next, - color: Theme.of(context) - .accentTextTheme! - .bodyLarge! - .color!, + color: Theme.of(context).primaryColor, textColor: Colors.white, isDisabled: selected == null, ), diff --git a/lib/src/screens/nodes/node_create_or_edit_page.dart b/lib/src/screens/nodes/node_create_or_edit_page.dart index 71f615c6a..fa52c0b09 100644 --- a/lib/src/screens/nodes/node_create_or_edit_page.dart +++ b/lib/src/screens/nodes/node_create_or_edit_page.dart @@ -148,10 +148,7 @@ class NodeCreateOrEditPage extends BasePage { Navigator.of(context).pop(); }, text: S.of(context).save, - color: Theme.of(context) - .accentTextTheme! - .bodyLarge! - .color!, + color: Theme.of(context).primaryColor, textColor: Colors.white, isDisabled: (!nodeCreateOrEditViewModel.isReady)|| (nodeCreateOrEditViewModel diff --git a/lib/src/screens/receive/anonpay_invoice_page.dart b/lib/src/screens/receive/anonpay_invoice_page.dart index f8df3eeb3..765fb0bd9 100644 --- a/lib/src/screens/receive/anonpay_invoice_page.dart +++ b/lib/src/screens/receive/anonpay_invoice_page.dart @@ -176,10 +176,7 @@ class AnonPayInvoicePage extends BasePage { anonInvoicePageViewModel.generateDonationLink(); } }, - color: Theme.of(context) - .accentTextTheme! - .bodyLarge! - .color!, + color: Theme.of(context).primaryColor, textColor: Colors.white, isLoading: anonInvoicePageViewModel.state is IsExecutingState, ), diff --git a/lib/src/screens/rescan/rescan_page.dart b/lib/src/screens/rescan/rescan_page.dart index 58c51ae5b..3a0ba2473 100644 --- a/lib/src/screens/rescan/rescan_page.dart +++ b/lib/src/screens/rescan/rescan_page.dart @@ -35,10 +35,7 @@ class RescanPage extends BasePage { _blockchainHeightWidgetKey.currentState!.height); Navigator.of(context).pop(); }, - color: Theme.of(context) - .accentTextTheme! - .bodyLarge! - .color!, + color: Theme.of(context).primaryColor, textColor: Colors.white, isDisabled: !_rescanViewModel.isButtonEnabled, )) diff --git a/lib/src/screens/restore/restore_from_backup_page.dart b/lib/src/screens/restore/restore_from_backup_page.dart index a057dd131..bf944a6e1 100644 --- a/lib/src/screens/restore/restore_from_backup_page.dart +++ b/lib/src/screens/restore/restore_from_backup_page.dart @@ -75,10 +75,7 @@ class RestoreFromBackupPage extends BasePage { restoreFromBackupViewModel.state is IsExecutingState, onPressed: () => onImportHandler(context), text: S.of(context).import, - color: Theme.of(context) - .accentTextTheme! - .bodyLarge! - .color!, + color: Theme.of(context).primaryColor, textColor: Colors.white); })) ])), diff --git a/lib/src/screens/restore/restore_wallet_from_seed_details.dart b/lib/src/screens/restore/restore_wallet_from_seed_details.dart index d13606fa1..8d08c441d 100644 --- a/lib/src/screens/restore/restore_wallet_from_seed_details.dart +++ b/lib/src/screens/restore/restore_wallet_from_seed_details.dart @@ -134,10 +134,7 @@ class _RestoreFromSeedDetailsFormState isLoading: widget.walletRestorationFromSeedVM.state is IsExecutingState, text: S.of(context).restore_recover, - color: Theme.of(context) - .accentTextTheme! - .bodyLarge! - .color!, + color: Theme.of(context).primaryColor, textColor: Colors.white, isDisabled: _nameController.text.isNotEmpty, ); diff --git a/lib/src/screens/seed/pre_seed_page.dart b/lib/src/screens/seed/pre_seed_page.dart index 5d0b0b804..40fcc5ba1 100644 --- a/lib/src/screens/seed/pre_seed_page.dart +++ b/lib/src/screens/seed/pre_seed_page.dart @@ -70,10 +70,7 @@ class PreSeedPage extends BasePage { onPressed: () => Navigator.of(context) .popAndPushNamed(Routes.seed, arguments: true), text: S.of(context).pre_seed_button_text, - color: Theme.of(context) - .accentTextTheme! - .bodyLarge! - .color!, + color: Theme.of(context).primaryColor, textColor: Colors.white) ], )) diff --git a/lib/src/screens/send/send_page.dart b/lib/src/screens/send/send_page.dart index 4ad1ad8ca..bbd19f598 100644 --- a/lib/src/screens/send/send_page.dart +++ b/lib/src/screens/send/send_page.dart @@ -375,7 +375,7 @@ class SendPage extends BasePage { }, text: S.of(context).send, color: - Theme.of(context).accentTextTheme!.bodyLarge!.color!, + Theme.of(context).primaryColor, textColor: Colors.white, isLoading: sendViewModel.state is IsExecutingState || sendViewModel.state is TransactionCommitting, diff --git a/lib/src/screens/settings/widgets/settings_choices_cell.dart b/lib/src/screens/settings/widgets/settings_choices_cell.dart index 49bc301f1..669776585 100644 --- a/lib/src/screens/settings/widgets/settings_choices_cell.dart +++ b/lib/src/screens/settings/widgets/settings_choices_cell.dart @@ -52,10 +52,7 @@ class SettingsChoicesCell extends StatelessWidget { decoration: BoxDecoration( borderRadius: BorderRadius.circular(30), color: isSelected - ? Theme.of(context) - .accentTextTheme! - .bodyLarge! - .color! + ? Theme.of(context).primaryColor : null, ), child: Text( diff --git a/lib/src/screens/setup_2fa/setup_2fa_enter_code_page.dart b/lib/src/screens/setup_2fa/setup_2fa_enter_code_page.dart index e88b1090b..3da9e2c6f 100644 --- a/lib/src/screens/setup_2fa/setup_2fa_enter_code_page.dart +++ b/lib/src/screens/setup_2fa/setup_2fa_enter_code_page.dart @@ -190,7 +190,7 @@ class TOTPEnterCode extends BasePage { ); }, text: S.of(context).continue_text, - color: Theme.of(context).accentTextTheme.bodyLarge!.color!, + color: Theme.of(context).primaryColor, textColor: Colors.white, ); }, diff --git a/lib/src/screens/setup_2fa/setup_2fa_qr_page.dart b/lib/src/screens/setup_2fa/setup_2fa_qr_page.dart index 90a83041f..91abd5f58 100644 --- a/lib/src/screens/setup_2fa/setup_2fa_qr_page.dart +++ b/lib/src/screens/setup_2fa/setup_2fa_qr_page.dart @@ -134,7 +134,7 @@ class Setup2FAQRPage extends BasePage { ); }, text: S.current.continue_text, - color: Theme.of(context).accentTextTheme.bodyLarge!.color!, + color: Theme.of(context).primaryColor, textColor: Colors.white, ), SizedBox(height: 24), diff --git a/lib/src/screens/subaddress/address_edit_or_create_page.dart b/lib/src/screens/subaddress/address_edit_or_create_page.dart index 86659130a..e067c78d0 100644 --- a/lib/src/screens/subaddress/address_edit_or_create_page.dart +++ b/lib/src/screens/subaddress/address_edit_or_create_page.dart @@ -53,10 +53,7 @@ class AddressEditOrCreatePage extends BasePage { text: addressEditOrCreateViewModel.isEdit ? S.of(context).rename : S.of(context).new_subaddress_create, - color: Theme.of(context) - .accentTextTheme! - .bodyLarge! - .color!, + color: Theme.of(context).primaryColor, textColor: Colors.white, isLoading: addressEditOrCreateViewModel.state is AddressIsSaving, diff --git a/lib/src/screens/wallet_list/wallet_list_page.dart b/lib/src/screens/wallet_list/wallet_list_page.dart index 1a5433a2b..fb5fff1b9 100644 --- a/lib/src/screens/wallet_list/wallet_list_page.dart +++ b/lib/src/screens/wallet_list/wallet_list_page.dart @@ -171,7 +171,7 @@ class WalletListBodyState extends State { }, image: newWalletImage, text: S.of(context).wallet_list_create_new_wallet, - color: Theme.of(context).accentTextTheme!.bodyLarge!.color!, + color: Theme.of(context).primaryColor, textColor: Colors.white, ), SizedBox(height: 10.0), diff --git a/lib/src/widgets/alert_with_one_action.dart b/lib/src/widgets/alert_with_one_action.dart index c3b364e8d..a0f92773e 100644 --- a/lib/src/widgets/alert_with_one_action.dart +++ b/lib/src/widgets/alert_with_one_action.dart @@ -48,10 +48,7 @@ class AlertWithOneAction extends BaseAlertDialog { style: TextStyle( fontSize: 15, fontWeight: FontWeight.w600, - color: Theme.of(context) - .primaryTextTheme! - .bodyMedium! - .backgroundColor!, + color: Theme.of(context).primaryColor, decoration: TextDecoration.none, ), )), diff --git a/lib/src/widgets/base_alert_dialog.dart b/lib/src/widgets/base_alert_dialog.dart index 995e3f205..8ff3ddc1d 100644 --- a/lib/src/widgets/base_alert_dialog.dart +++ b/lib/src/widgets/base_alert_dialog.dart @@ -99,10 +99,7 @@ class BaseAlertDialog extends StatelessWidget { fontFamily: 'Lato', fontWeight: FontWeight.w600, color: rightActionButtonTextColor ?? - Theme.of(context) - .primaryTextTheme! - .bodyMedium! - .backgroundColor!, + Theme.of(context).primaryColor, decoration: TextDecoration.none, ), )), diff --git a/lib/src/widgets/picker.dart b/lib/src/widgets/picker.dart index 00ee67d56..c053b8348 100644 --- a/lib/src/widgets/picker.dart +++ b/lib/src/widgets/picker.dart @@ -448,10 +448,7 @@ class _PickerState extends State> { ), ), Icon(Icons.check_circle, - color: Theme.of(context) - .accentTextTheme! - .bodyLarge! - .color!), + color: Theme.of(context).primaryColor), ], ), ), diff --git a/lib/src/widgets/standard_switch.dart b/lib/src/widgets/standard_switch.dart index 060e27990..b2c0b3d7e 100644 --- a/lib/src/widgets/standard_switch.dart +++ b/lib/src/widgets/standard_switch.dart @@ -24,10 +24,7 @@ class StandardSwitchState extends State { height: 28, decoration: BoxDecoration( color: widget.value - ? Theme.of(context) - .accentTextTheme! - .bodyLarge! - .color! + ? Theme.of(context).primaryColor : Theme.of(context) .accentTextTheme! .displayLarge! diff --git a/lib/themes/bright_theme.dart b/lib/themes/bright_theme.dart index 6dc90e045..54e9d2403 100644 --- a/lib/themes/bright_theme.dart +++ b/lib/themes/bright_theme.dart @@ -86,8 +86,6 @@ class BrightTheme extends LightTheme { ), // subtitle -> titleSmall titleSmall: TextStyle( - color: Palette - .moderateSlateBlue, // text color of current tile (account list) decorationColor: Colors.white // background of current tile (account list) ), @@ -180,8 +178,6 @@ class BrightTheme extends LightTheme { 0.7), // first gradient color bottom panel (exchange page) decorationColor: Palette.pinkFlamingo.withOpacity( 0.7), // second gradient color bottom panel (exchange page) - backgroundColor: - Palette.moderateSlateBlue // alert right button text ), // body2 -> bodyLarge bodyLarge: TextStyle( @@ -269,7 +265,6 @@ class BrightTheme extends LightTheme { ), // body2 -> bodyLarge bodyLarge: TextStyle( - color: Palette.moderateSlateBlue, // primary buttons decorationColor: Colors.white, // alert left button, backgroundColor: Palette.dullGray // keyboard bar color ) diff --git a/lib/themes/dark_theme.dart b/lib/themes/dark_theme.dart index c14656298..30994fd6e 100644 --- a/lib/themes/dark_theme.dart +++ b/lib/themes/dark_theme.dart @@ -86,8 +86,6 @@ class DarkTheme extends ThemeBase { ), // subtitle -> titleSmall titleSmall: TextStyle( - color: Palette - .blueCraiola, // text color of current tile (account list) decorationColor: PaletteDark .darkNightBlue // background of current tile (account list) ), @@ -183,7 +181,6 @@ class DarkTheme extends ThemeBase { .darkNightBlue, // first gradient color bottom panel (exchange page) decorationColor: PaletteDark .darkNightBlue, // second gradient color bottom panel (exchange page) - backgroundColor: Palette.blueCraiola // alert right button text ), // body2 -> bodyLarge bodyLarge: TextStyle( @@ -277,7 +274,6 @@ class DarkTheme extends ThemeBase { ), // body2 -> bodyLarge bodyLarge: TextStyle( - color: Palette.blueCraiola, // primary buttons decorationColor: PaletteDark.darkNightBlue, // alert left button backgroundColor: PaletteDark.granite // keyboard bar color ), diff --git a/lib/themes/light_theme.dart b/lib/themes/light_theme.dart index 274a6033e..689897418 100644 --- a/lib/themes/light_theme.dart +++ b/lib/themes/light_theme.dart @@ -86,8 +86,6 @@ class LightTheme extends ThemeBase { ), // subtitle -> titleSmall titleSmall: TextStyle( - color: Palette - .protectiveBlue, // text color of current tile (account list) decorationColor: Colors.white // background of current tile (account list) ), @@ -181,7 +179,6 @@ class LightTheme extends ThemeBase { 0.7), // first gradient color bottom panel (exchange page) decorationColor: Palette.blueGreyCraiola.withOpacity( 0.7), // second gradient color bottom panel (exchange page) - backgroundColor: Palette.protectiveBlue // alert right button text ), // body2 -> bodyLarge bodyLarge: TextStyle( @@ -269,7 +266,6 @@ class LightTheme extends ThemeBase { ), // body2 -> bodyLarge bodyLarge: TextStyle( - color: Palette.protectiveBlue, // primary buttons decorationColor: Colors.white, // alert left button, backgroundColor: Palette.dullGray // keyboard bar color ),