diff --git a/lib/src/screens/cake_phone/active_services_page.dart b/lib/src/screens/cake_phone/active_services_page.dart index c871529e8..cb716350d 100644 --- a/lib/src/screens/cake_phone/active_services_page.dart +++ b/lib/src/screens/cake_phone/active_services_page.dart @@ -21,7 +21,7 @@ class ActiveServicesPage extends BasePage { fontSize: 22, fontWeight: FontWeight.w700, fontFamily: 'Lato', - color: titleColor ?? Theme.of(context).primaryTextTheme.title.color), + color: titleColor ?? Theme.of(context).primaryTextTheme.titleMedium?.color), ); } } @@ -59,8 +59,11 @@ class ActiveServicesBodyState extends State { borderRadius: BorderRadius.all(Radius.circular(15)), gradient: LinearGradient( colors: [ - Theme.of(context).primaryTextTheme.subhead.color, - Theme.of(context).primaryTextTheme.subhead.decorationColor, + Theme.of(context).primaryTextTheme.subtitle1!.color!, + Theme.of(context) + .primaryTextTheme + .subtitle1! + .decorationColor!, ], begin: Alignment.topLeft, end: Alignment.bottomRight, @@ -103,7 +106,7 @@ class ActiveServicesBodyState extends State { padding: EdgeInsets.symmetric(horizontal: 24, vertical: 12), decoration: BoxDecoration( borderRadius: BorderRadius.all(Radius.circular(15)), - color: Theme.of(context).primaryTextTheme.display3.decorationColor, + color: Theme.of(context).primaryTextTheme.displayMedium?.decorationColor, ), child: InfoTextColumn( title: S.of(context).free_sms_balance, @@ -119,7 +122,7 @@ class ActiveServicesBodyState extends State { padding: EdgeInsets.symmetric(horizontal: 24, vertical: 12), decoration: BoxDecoration( borderRadius: BorderRadius.all(Radius.circular(15)), - color: Theme.of(context).primaryTextTheme.display3.decorationColor, + color: Theme.of(context).primaryTextTheme.displayMedium?.decorationColor, ), child: InfoTextColumn( title: S.of(context).free_data_balance, diff --git a/lib/src/screens/cake_phone/add_balance_page.dart b/lib/src/screens/cake_phone/add_balance_page.dart index f7c473251..e218d49b8 100644 --- a/lib/src/screens/cake_phone/add_balance_page.dart +++ b/lib/src/screens/cake_phone/add_balance_page.dart @@ -1,4 +1,3 @@ -import 'dart:ui'; import 'package:cake_wallet/buy/buy_amount.dart'; import 'package:cake_wallet/buy/moonpay/moonpay_buy_provider.dart'; import 'package:cake_wallet/di.dart'; @@ -8,7 +7,6 @@ import 'package:cake_wallet/src/widgets/info_alert_dialog.dart'; import 'package:cake_wallet/src/widgets/keyboard_done_button.dart'; import 'package:cake_wallet/store/app_store.dart'; import 'package:cake_wallet/utils/show_pop_up.dart'; -import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; import 'package:flutter_mobx/flutter_mobx.dart'; @@ -22,7 +20,7 @@ import 'package:cake_wallet/src/widgets/base_text_form_field.dart'; import 'package:cake_wallet/view_model/cake_phone/add_balance_view_model.dart'; class AddBalancePage extends BasePage { - AddBalancePage({@required this.addBalanceViewModel}) + AddBalancePage({required this.addBalanceViewModel}) : _amountFocus = FocusNode(), _amountController = TextEditingController() { _amountController.addListener(() { @@ -65,7 +63,7 @@ class AddBalancePage extends BasePage { return KeyboardActions( config: KeyboardActionsConfig( keyboardActionsPlatform: KeyboardActionsPlatform.IOS, - keyboardBarColor: Theme.of(context).accentTextTheme.body2.backgroundColor, + keyboardBarColor: Theme.of(context).accentTextTheme.bodyText1?.backgroundColor, nextFocus: false, actions: [ KeyboardActionsItem( @@ -85,8 +83,8 @@ class AddBalancePage extends BasePage { decoration: BoxDecoration( borderRadius: BorderRadius.only(bottomLeft: Radius.circular(24), bottomRight: Radius.circular(24)), gradient: LinearGradient(colors: [ - Theme.of(context).primaryTextTheme.subhead.color, - Theme.of(context).primaryTextTheme.subhead.decorationColor, + Theme.of(context).primaryTextTheme.subtitle1!.color!, + Theme.of(context).primaryTextTheme.subtitle1!.decorationColor!, ], begin: Alignment.topLeft, end: Alignment.bottomRight), ), child: Padding( @@ -111,11 +109,11 @@ class AddBalancePage extends BasePage { ), ), hintText: '0.00', - borderColor: Theme.of(context).primaryTextTheme.body2.decorationColor, + borderColor: Theme.of(context).primaryTextTheme.bodyText1?.decorationColor, borderWidth: 0.5, textStyle: TextStyle(fontSize: 36, fontWeight: FontWeight.w500, color: Colors.white), placeholderTextStyle: TextStyle( - color: Theme.of(context).primaryTextTheme.headline.decorationColor, + color: Theme.of(context).primaryTextTheme.headline5?.decorationColor, fontWeight: FontWeight.w500, fontSize: 36, ), @@ -129,7 +127,7 @@ class AddBalancePage extends BasePage { child: Text( "${S.of(context).cake_phone_products_example}:", style: TextStyle( - color: Theme.of(context).primaryTextTheme.title.color, + color: Theme.of(context).primaryTextTheme.headline6?.color, fontSize: 16, ), ), @@ -143,7 +141,7 @@ class AddBalancePage extends BasePage { padding: const EdgeInsets.all(16), margin: const EdgeInsets.only(bottom: 8), decoration: BoxDecoration( - color: Theme.of(context).accentTextTheme.caption.backgroundColor, + color: Theme.of(context).accentTextTheme.caption?.backgroundColor, borderRadius: BorderRadius.circular(15), ), child: RichText( @@ -157,7 +155,7 @@ class AddBalancePage extends BasePage { ], style: TextStyle( fontSize: 16, - color: Theme.of(context).primaryTextTheme.title.color, + color: Theme.of(context).primaryTextTheme.headline6?.color, ), ), ), @@ -176,7 +174,7 @@ class AddBalancePage extends BasePage { builder: (dialogContext) { return AlertWithTwoActions( alertTitle: S.of(context).confirm_sending, - alertTitleColor: Theme.of(context).primaryTextTheme.title.decorationColor, + alertTitleColor: Theme.of(context).primaryTextTheme.headline6!.decorationColor!, alertContent: S.of(context).confirm_delete_template, contentWidget: Material( color: Colors.transparent, @@ -191,8 +189,8 @@ class AddBalancePage extends BasePage { value: cryptoAmount(getIt .get() .wallet - .calculateEstimatedFee( - getIt.get().settingsStore.priority[getIt.get().wallet.type], + !.calculateEstimatedFee( + getIt.get().settingsStore!.priority[getIt.get().wallet!.type], addBalanceViewModel.buyAmountViewModel.doubleAmount.floor(), ) .toDouble())), @@ -212,7 +210,7 @@ class AddBalancePage extends BasePage { style: TextStyle( fontSize: 10, fontWeight: FontWeight.w600, - color: Theme.of(context).accentTextTheme.subhead.color, + color: Theme.of(context).accentTextTheme.subtitle1?.color, ), textAlign: TextAlign.center, ), @@ -222,8 +220,8 @@ class AddBalancePage extends BasePage { isDividerExists: true, rightButtonText: S.of(context).ok, leftButtonText: S.of(context).cancel, - rightActionButtonColor: Theme.of(context).accentTextTheme.body2.color, - leftActionButtonColor: Theme.of(context).primaryTextTheme.body2.backgroundColor, + rightActionButtonColor: Theme.of(context).accentTextTheme.bodyText1?.color, + leftActionButtonColor: Theme.of(context).primaryTextTheme.bodyText1?.backgroundColor, actionRightButton: () { Navigator.of(dialogContext).pop(); showPaymentConfirmationPopup(context); @@ -232,7 +230,7 @@ class AddBalancePage extends BasePage { }); }, text: S.of(context).buy, - color: Theme.of(context).accentTextTheme.body2.color, + color: Theme.of(context).accentTextTheme.bodyText1?.color, textColor: Colors.white, isLoading: false, isDisabled: addBalanceViewModel.buyAmountViewModel.amount.isEmpty, @@ -276,7 +274,7 @@ class AddBalancePage extends BasePage { style: TextStyle( fontSize: 12, fontWeight: FontWeight.w500, - color: Theme.of(context).accentTextTheme.subhead.color, + color: Theme.of(context).accentTextTheme.subtitle1?.color, ), ), ], @@ -328,7 +326,7 @@ class AddBalancePage extends BasePage { style: TextStyle( fontSize: 12, fontWeight: FontWeight.w500, - color: Theme.of(context).accentTextTheme.subhead.color, + color: Theme.of(context).accentTextTheme.subtitle1?.color, ), ), Padding( @@ -348,7 +346,7 @@ class AddBalancePage extends BasePage { style: TextStyle( fontSize: 12, fontWeight: FontWeight.w500, - color: Theme.of(context).accentTextTheme.subhead.color, + color: Theme.of(context).accentTextTheme.subtitle1?.color, ), ), Padding( diff --git a/lib/src/screens/cake_phone/cake_phone_auth_page.dart b/lib/src/screens/cake_phone/cake_phone_auth_page.dart index dec780081..704fa98e6 100644 --- a/lib/src/screens/cake_phone/cake_phone_auth_page.dart +++ b/lib/src/screens/cake_phone/cake_phone_auth_page.dart @@ -80,7 +80,7 @@ class CakePhoneAuthBodyState extends State { } }, text: widget.isLogin ? S.of(context).login : S.of(context).create_account, - color: Theme.of(context).accentTextTheme.body2.color, + color: Theme.of(context).accentTextTheme.bodyText1?.color, textColor: Colors.white, ), Padding( @@ -116,7 +116,7 @@ class CakePhoneAuthBodyState extends State { ], style: TextStyle( fontSize: 12, - color: Theme.of(context).accentTextTheme.subhead.color, + color: Theme.of(context).accentTextTheme.subtitle1?.color, ), ), textAlign: TextAlign.center, diff --git a/lib/src/screens/cake_phone/cake_phone_products_page.dart b/lib/src/screens/cake_phone/cake_phone_products_page.dart index 17f8e47b0..9db1c0ff2 100644 --- a/lib/src/screens/cake_phone/cake_phone_products_page.dart +++ b/lib/src/screens/cake_phone/cake_phone_products_page.dart @@ -57,8 +57,8 @@ class CakePhoneProductsBodyState extends State { borderRadius: BorderRadius.all(Radius.circular(24)), gradient: LinearGradient( colors: [ - Theme.of(context).primaryTextTheme.subhead.color, - Theme.of(context).primaryTextTheme.subhead.decorationColor, + Theme.of(context).primaryTextTheme.subtitle1!.color!, + Theme.of(context).primaryTextTheme.subtitle1!.decorationColor!, ], begin: Alignment.topLeft, end: Alignment.bottomRight, diff --git a/lib/src/screens/cake_phone/cake_phone_verification_page.dart b/lib/src/screens/cake_phone/cake_phone_verification_page.dart index 7a4d7b69a..a957b27d4 100644 --- a/lib/src/screens/cake_phone/cake_phone_verification_page.dart +++ b/lib/src/screens/cake_phone/cake_phone_verification_page.dart @@ -162,7 +162,7 @@ class CakePhoneVerificationBodyState extends State { } }, text: S.of(context).continue_text, - color: Theme.of(context).accentTextTheme.body2.color, + color: Theme.of(context).accentTextTheme.bodyText1?.color, textColor: Colors.white, isDisabled: disabled, ), diff --git a/lib/src/screens/cake_phone/cake_phone_welcome_page.dart b/lib/src/screens/cake_phone/cake_phone_welcome_page.dart index ee4628bc4..6fb07d016 100644 --- a/lib/src/screens/cake_phone/cake_phone_welcome_page.dart +++ b/lib/src/screens/cake_phone/cake_phone_welcome_page.dart @@ -55,7 +55,7 @@ class CakePhoneWelcomeBodyState extends State { Navigator.pushNamed(context, Routes.cakePhoneAuth); }, text: S.of(context).create_account, - color: Theme.of(context).accentTextTheme.body2.color, + color: Theme.of(context).accentTextTheme.bodyText1?.color, textColor: Colors.white, ), Padding( diff --git a/lib/src/screens/cake_phone/phone_number_service/auto_renew_settings_page.dart b/lib/src/screens/cake_phone/phone_number_service/auto_renew_settings_page.dart index c029e044b..4966a5f83 100644 --- a/lib/src/screens/cake_phone/phone_number_service/auto_renew_settings_page.dart +++ b/lib/src/screens/cake_phone/phone_number_service/auto_renew_settings_page.dart @@ -70,7 +70,7 @@ class AutoRenewSettingsBodyState extends State { S.of(context).auto_renew_term_description, style: TextStyle( fontSize: 12, - color: Theme.of(context).accentTextTheme.subhead.color, + color: Theme.of(context).accentTextTheme.subtitle1?.color, fontFamily: 'Lato', ), ), @@ -149,7 +149,7 @@ class AutoRenewSettingsBodyState extends State { onPressed: () { }, text: "${S.of(context).update} ${S.of(context).auto_renew}", - color: Theme.of(context).accentTextTheme.body2.color, + color: Theme.of(context).accentTextTheme.bodyText1?.color, textColor: Colors.white, ), ], diff --git a/lib/src/screens/cake_phone/phone_number_service/phone_number_product_page.dart b/lib/src/screens/cake_phone/phone_number_service/phone_number_product_page.dart index d0d357371..396371c76 100644 --- a/lib/src/screens/cake_phone/phone_number_service/phone_number_product_page.dart +++ b/lib/src/screens/cake_phone/phone_number_service/phone_number_product_page.dart @@ -88,7 +88,7 @@ class PhoneNumberProductBodyState extends State { : S.of(context).phone_number_promotion_text, style: TextStyle( fontSize: 12, - color: Theme.of(context).accentTextTheme.subhead.color, + color: Theme.of(context).accentTextTheme.subtitle1?.color, fontFamily: 'Lato', ), ), @@ -241,13 +241,13 @@ class PhoneNumberProductBodyState extends State { Text( S.of(context).additional_sms_messages, style: TextStyle( - color: Theme.of(context).accentTextTheme.subhead.color, + color: Theme.of(context).accentTextTheme.subtitle1?.color, ), ), Container( decoration: BoxDecoration( borderRadius: BorderRadius.circular(30), - color: Theme.of(context).primaryTextTheme.display3.decorationColor, + color: Theme.of(context).primaryTextTheme.displayMedium?.decorationColor, ), child: Row( children: [ @@ -300,7 +300,7 @@ class PhoneNumberProductBodyState extends State { ], style: TextStyle( fontSize: 15, - color: Theme.of(context).accentTextTheme.subhead.color, + color: Theme.of(context).accentTextTheme.subtitle1?.color, fontFamily: 'Lato', ), ), @@ -327,8 +327,8 @@ class PhoneNumberProductBodyState extends State { isDividerExists: true, rightButtonText: S.of(context).ok, leftButtonText: S.of(context).cancel, - rightActionButtonColor: Theme.of(context).accentTextTheme.body2.color, - leftActionButtonColor: Theme.of(context).primaryTextTheme.body2.backgroundColor, + rightActionButtonColor: Theme.of(context).accentTextTheme.bodyText1?.color, + leftActionButtonColor: Theme.of(context).primaryTextTheme.bodyText1?.backgroundColor, actionRightButton: () { Navigator.of(dialogContext).pop(); Navigator.pushNamedAndRemoveUntil( @@ -388,7 +388,7 @@ class PhoneNumberProductBodyState extends State { style: TextStyle( fontSize: 10, fontWeight: FontWeight.w600, - color: Theme.of(context).accentTextTheme.subhead.color, + color: Theme.of(context).accentTextTheme.subtitle1?.color, ), textAlign: TextAlign.center, ), @@ -397,8 +397,8 @@ class PhoneNumberProductBodyState extends State { isDividerExists: true, rightButtonText: S.of(context).ok, leftButtonText: S.of(context).cancel, - rightActionButtonColor: Theme.of(context).accentTextTheme.body2.color, - leftActionButtonColor: Theme.of(context).primaryTextTheme.body2.backgroundColor, + rightActionButtonColor: Theme.of(context).accentTextTheme.bodyText1?.color, + leftActionButtonColor: Theme.of(context).primaryTextTheme.bodyText1?.backgroundColor, actionRightButton: () { Navigator.of(dialogContext).pop(); showPaymentConfirmationPopup(); @@ -407,7 +407,7 @@ class PhoneNumberProductBodyState extends State { }); }, text: "${S.of(context).pay_with} ${getIt.get().wallet.currency.toString()}", - color: Theme.of(context).accentTextTheme.body2.color, + color: Theme.of(context).accentTextTheme.bodyText1?.color, textColor: Colors.white, ), ], @@ -422,7 +422,7 @@ class PhoneNumberProductBodyState extends State { padding: const EdgeInsets.all(8), margin: const EdgeInsets.all(4), decoration: BoxDecoration( - color: Theme.of(context).accentTextTheme.body2.color, + color: Theme.of(context).accentTextTheme.bodyText1?.color, shape: BoxShape.circle, ), child: Icon(icon, color: Colors.white, size: 15), @@ -433,13 +433,13 @@ class PhoneNumberProductBodyState extends State { child: DottedBorder( borderType: BorderType.Circle, dashPattern: [3, 3], - color: Theme.of(context).primaryTextTheme.display3.color, + color: Theme.of(context).primaryTextTheme.displayMedium?.color, strokeWidth: 3, child: Padding( padding: const EdgeInsets.all(6), child: Icon( icon, - color: Theme.of(context).primaryTextTheme.display3.color, + color: Theme.of(context).primaryTextTheme.displayMedium?.color, size: 15, ), ), @@ -490,7 +490,7 @@ class PhoneNumberProductBodyState extends State { style: TextStyle( fontSize: 12, fontWeight: FontWeight.w500, - color: Theme.of(context).accentTextTheme.subhead.color, + color: Theme.of(context).accentTextTheme.subtitle1?.color, ), ), ], @@ -539,7 +539,7 @@ class PhoneNumberProductBodyState extends State { style: TextStyle( fontSize: 12, fontWeight: FontWeight.w500, - color: Theme.of(context).accentTextTheme.subhead.color, + color: Theme.of(context).accentTextTheme.subtitle1?.color, ), ), Padding( @@ -559,7 +559,7 @@ class PhoneNumberProductBodyState extends State { style: TextStyle( fontSize: 12, fontWeight: FontWeight.w500, - color: Theme.of(context).accentTextTheme.subhead.color, + color: Theme.of(context).accentTextTheme.subtitle1?.color, ), ), Padding( diff --git a/lib/src/screens/cake_phone/widgets/add_options_tile.dart b/lib/src/screens/cake_phone/widgets/add_options_tile.dart index 4696eab56..711fd3868 100644 --- a/lib/src/screens/cake_phone/widgets/add_options_tile.dart +++ b/lib/src/screens/cake_phone/widgets/add_options_tile.dart @@ -14,7 +14,7 @@ class AddOptionsTile extends StatelessWidget { padding: const EdgeInsets.all(16), decoration: BoxDecoration( borderRadius: BorderRadius.all(Radius.circular(15)), - color: Theme.of(context).primaryTextTheme.display3.decorationColor, + color: Theme.of(context).primaryTextTheme.displayMedium?.decorationColor, ), child: Row( children: [ diff --git a/lib/src/screens/cake_phone/widgets/cake_phone_settings_tile.dart b/lib/src/screens/cake_phone/widgets/cake_phone_settings_tile.dart index 279ab6d5a..d388b7fdc 100644 --- a/lib/src/screens/cake_phone/widgets/cake_phone_settings_tile.dart +++ b/lib/src/screens/cake_phone/widgets/cake_phone_settings_tile.dart @@ -18,7 +18,7 @@ class CakePhoneSettingsTile extends StatelessWidget { Text( title, style: TextStyle( - color: Theme.of(context).accentTextTheme.subhead.color, + color: Theme.of(context).accentTextTheme.subtitle1?.color, ), ), Container( diff --git a/lib/src/screens/cake_phone/widgets/info_text_column.dart b/lib/src/screens/cake_phone/widgets/info_text_column.dart index a3f1662d2..615423410 100644 --- a/lib/src/screens/cake_phone/widgets/info_text_column.dart +++ b/lib/src/screens/cake_phone/widgets/info_text_column.dart @@ -36,7 +36,7 @@ class InfoTextColumn extends StatelessWidget { TextStyle subtitleTextStyle(BuildContext context) => TextStyle( fontSize: 12, - color: Theme.of(context).accentTextTheme.subhead.color, + color: Theme.of(context).accentTextTheme.subtitle1?.color, ); TextStyle titleTextStyle(BuildContext context) => TextStyle( diff --git a/lib/src/screens/cake_phone/widgets/plan_card.dart b/lib/src/screens/cake_phone/widgets/plan_card.dart index d8bd85c02..208fc9625 100644 --- a/lib/src/screens/cake_phone/widgets/plan_card.dart +++ b/lib/src/screens/cake_phone/widgets/plan_card.dart @@ -21,14 +21,14 @@ class PlanCard extends StatelessWidget { gradient: isSelected ? LinearGradient( colors: [ - Theme.of(context).primaryTextTheme.subhead.color, - Theme.of(context).primaryTextTheme.subhead.decorationColor, + Theme.of(context).primaryTextTheme.subtitle1!.color!, + Theme.of(context).primaryTextTheme.subtitle1!.decorationColor!, ], begin: Alignment.topLeft, end: Alignment.bottomRight, ) : null, - color: isSelected ? null : Theme.of(context).primaryTextTheme.display3.decorationColor, + color: isSelected ? null : Theme.of(context).primaryTextTheme.displayMedium?.decorationColor, ), child: Column( children: [ @@ -44,7 +44,7 @@ class PlanCard extends StatelessWidget { style: TextStyle( fontSize: 10, fontWeight: FontWeight.w500, - color: isSelected ? Colors.white : Theme.of(context).accentTextTheme.subhead.color, + color: isSelected ? Colors.white : Theme.of(context).accentTextTheme.subtitle1?.color, fontFamily: 'Lato', ), ), diff --git a/lib/src/screens/cake_phone/widgets/receipt_row.dart b/lib/src/screens/cake_phone/widgets/receipt_row.dart index fc0a2aea1..57c09ade5 100644 --- a/lib/src/screens/cake_phone/widgets/receipt_row.dart +++ b/lib/src/screens/cake_phone/widgets/receipt_row.dart @@ -18,7 +18,7 @@ class ReceiptRow extends StatelessWidget { style: TextStyle( fontSize: 16, fontWeight: FontWeight.w500, - color: Theme.of(context).accentTextTheme.subhead.color, + color: Theme.of(context).accentTextTheme.subtitle1?.color, ), ), value, diff --git a/lib/src/screens/cake_phone/widgets/subscribed_phone_numbers.dart b/lib/src/screens/cake_phone/widgets/subscribed_phone_numbers.dart index 7155afe42..b7a7c8c18 100644 --- a/lib/src/screens/cake_phone/widgets/subscribed_phone_numbers.dart +++ b/lib/src/screens/cake_phone/widgets/subscribed_phone_numbers.dart @@ -50,7 +50,7 @@ class _SubscribedPhoneNumbersState extends State { padding: EdgeInsets.all(5), decoration: BoxDecoration( borderRadius: BorderRadius.all(Radius.circular(30)), - color: Theme.of(context).primaryTextTheme.display3.decorationColor, + color: Theme.of(context).primaryTextTheme.headline2?.decorationColor, ), child: Row( mainAxisSize: MainAxisSize.min, @@ -96,8 +96,8 @@ class _SubscribedPhoneNumbersState extends State { decoration: BoxDecoration( borderRadius: BorderRadius.all(Radius.circular(30)), color: selected - ? Theme.of(context).accentTextTheme.body2.color - : Theme.of(context).primaryTextTheme.display3.decorationColor, + ? Theme.of(context).accentTextTheme.bodyText1?.color + : Theme.of(context).primaryTextTheme.headline2?.decorationColor, ), child: Text( title,