refactor: create CakeTextTheme

This commit is contained in:
Rafael Saes 2023-07-05 09:54:53 -03:00
parent cdc10cba0a
commit 034d7cf161
72 changed files with 263 additions and 317 deletions

View file

@ -7,6 +7,7 @@ import 'package:cake_wallet/src/screens/base_page.dart';
import 'package:cake_wallet/src/widgets/alert_with_two_actions.dart'; import 'package:cake_wallet/src/widgets/alert_with_two_actions.dart';
import 'package:cake_wallet/src/widgets/primary_button.dart'; import 'package:cake_wallet/src/widgets/primary_button.dart';
import 'package:cake_wallet/view_model/edit_backup_password_view_model.dart'; import 'package:cake_wallet/view_model/edit_backup_password_view_model.dart';
import 'package:cake_wallet/themes/extensions/cake_text_theme.dart';
class EditBackupPasswordPage extends BasePage { class EditBackupPasswordPage extends BasePage {
EditBackupPasswordPage(this.editBackupPasswordViewModel) EditBackupPasswordPage(this.editBackupPasswordViewModel)
@ -39,10 +40,7 @@ class EditBackupPasswordPage extends BasePage {
controller: textEditingController, controller: textEditingController,
style: TextStyle( style: TextStyle(
fontSize: 26, fontSize: 26,
color: Theme.of(context) color: Theme.of(context).extension<CakeTextTheme>()!.titleColor)))),
.primaryTextTheme!
.titleLarge!
.color!)))),
Positioned( Positioned(
child: Observer( child: Observer(
builder: (_) => PrimaryButton( builder: (_) => PrimaryButton(

View file

@ -1,3 +1,4 @@
import 'package:cake_wallet/themes/extensions/cake_text_theme.dart';
import 'package:cake_wallet/themes/theme_base.dart'; import 'package:cake_wallet/themes/theme_base.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
@ -52,8 +53,8 @@ abstract class BasePage extends StatelessWidget {
Color? pageIconColor(BuildContext context) => Color? pageIconColor(BuildContext context) =>
titleColor ?? titleColor ??
(gradientBackground (gradientBackground
? Theme.of(context).primaryTextTheme.titleLarge!.color! ? Theme.of(context).extension<CakeTextTheme>()!.titleColor
: Theme.of(context).primaryTextTheme.titleLarge!.color!); : Theme.of(context).extension<CakeTextTheme>()!.titleColor);
Widget closeButton(BuildContext context) => Image.asset( Widget closeButton(BuildContext context) => Image.asset(
currentTheme.type == ThemeType.dark currentTheme.type == ThemeType.dark
@ -106,7 +107,7 @@ abstract class BasePage extends StatelessWidget {
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
fontFamily: 'Lato', fontFamily: 'Lato',
color: titleColor ?? color: titleColor ??
Theme.of(context).primaryTextTheme.titleLarge!.color!), Theme.of(context).extension<CakeTextTheme>()!.titleColor),
); );
} }

View file

@ -3,6 +3,7 @@ import 'package:cake_wallet/buy/buy_provider.dart';
import 'package:cake_wallet/buy/moonpay/moonpay_buy_provider.dart'; import 'package:cake_wallet/buy/moonpay/moonpay_buy_provider.dart';
import 'package:cake_wallet/entities/fiat_currency.dart'; import 'package:cake_wallet/entities/fiat_currency.dart';
import 'package:cake_wallet/src/widgets/picker.dart'; import 'package:cake_wallet/src/widgets/picker.dart';
import 'package:cake_wallet/themes/extensions/cake_text_theme.dart';
import 'package:cake_wallet/themes/extensions/exchange_page_theme.dart'; import 'package:cake_wallet/themes/extensions/exchange_page_theme.dart';
import 'package:cake_wallet/themes/extensions/keyboard_theme.dart'; import 'package:cake_wallet/themes/extensions/keyboard_theme.dart';
import 'package:cake_wallet/themes/extensions/send_page_theme.dart'; import 'package:cake_wallet/themes/extensions/send_page_theme.dart';
@ -179,7 +180,7 @@ class PreOrderPage extends BasePage {
S.of(context).buy_with + ':', S.of(context).buy_with + ':',
textAlign: TextAlign.center, textAlign: TextAlign.center,
style: TextStyle( style: TextStyle(
color: Theme.of(context).primaryTextTheme.titleLarge!.color!, color: Theme.of(context).extension<CakeTextTheme>()!.titleColor,
fontSize: 18, fontSize: 18,
fontWeight: FontWeight.bold fontWeight: FontWeight.bold
), ),

View file

@ -13,6 +13,7 @@ import 'package:cake_wallet/src/screens/base_page.dart';
import 'package:cake_wallet/src/widgets/alert_with_two_actions.dart'; import 'package:cake_wallet/src/widgets/alert_with_two_actions.dart';
import 'package:cake_wallet/view_model/contact_list/contact_list_view_model.dart'; import 'package:cake_wallet/view_model/contact_list/contact_list_view_model.dart';
import 'package:cake_wallet/src/widgets/collapsible_standart_list.dart'; import 'package:cake_wallet/src/widgets/collapsible_standart_list.dart';
import 'package:cake_wallet/themes/extensions/cake_text_theme.dart';
class ContactListPage extends BasePage { class ContactListPage extends BasePage {
ContactListPage(this.contactListViewModel); ContactListPage(this.contactListViewModel);
@ -34,7 +35,7 @@ class ContactListPage extends BasePage {
alignment: Alignment.center, alignment: Alignment.center,
children: <Widget>[ children: <Widget>[
Icon(Icons.add, Icon(Icons.add,
color: Theme.of(context).primaryTextTheme!.titleLarge!.color!, color: Theme.of(context).extension<CakeTextTheme>()!.titleColor,
size: 22.0), size: 22.0),
ButtonTheme( ButtonTheme(
minWidth: 32.0, minWidth: 32.0,
@ -71,10 +72,7 @@ class ContactListPage extends BasePage {
return Container( return Container(
padding: EdgeInsets.only(bottom: 10), padding: EdgeInsets.only(bottom: 10),
child: Text(title, style: TextStyle( child: Text(title, style: TextStyle(
color: Theme.of(context) color: Theme.of(context).extension<CakeTextTheme>()!.titleColor,
.primaryTextTheme
.titleLarge!
.color!,
fontSize: 36))); fontSize: 36)));
}, },
itemCounter: (int sectionIndex) => itemCounter: (int sectionIndex) =>
@ -138,7 +136,7 @@ class ContactListPage extends BasePage {
style: TextStyle( style: TextStyle(
fontSize: 14, fontSize: 14,
fontWeight: FontWeight.normal, fontWeight: FontWeight.normal,
color: Theme.of(context).primaryTextTheme!.titleLarge!.color!), color: Theme.of(context).extension<CakeTextTheme>()!.titleColor),
), ),
) )
) )

View file

@ -19,6 +19,7 @@ import 'package:cake_wallet/src/widgets/scollable_with_bottom_section.dart';
import 'package:cake_wallet/src/widgets/base_text_form_field.dart'; import 'package:cake_wallet/src/widgets/base_text_form_field.dart';
import 'package:cake_wallet/src/screens/exchange/widgets/currency_picker.dart'; import 'package:cake_wallet/src/screens/exchange/widgets/currency_picker.dart';
import 'package:cake_wallet/themes/extensions/address_theme.dart'; import 'package:cake_wallet/themes/extensions/address_theme.dart';
import 'package:cake_wallet/themes/extensions/cake_text_theme.dart';
class ContactPage extends BasePage { class ContactPage extends BasePage {
ContactPage(this.contactViewModel) ContactPage(this.contactViewModel)
@ -103,10 +104,7 @@ class ContactPage extends BasePage {
], ],
buttonColor: Theme.of(context).extension<AddressTheme>()!.actionButtonColor, buttonColor: Theme.of(context).extension<AddressTheme>()!.actionButtonColor,
iconColor: PaletteDark.gray, iconColor: PaletteDark.gray,
borderColor: Theme.of(context) borderColor: Theme.of(context).extension<CakeTextTheme>()!.textfieldUnderlineColor,
.primaryTextTheme!
.titleLarge!
.backgroundColor!,
validator: validator:
AddressValidator(type: contactViewModel.currency!), AddressValidator(type: contactViewModel.currency!),
), ),

View file

@ -1,4 +1,5 @@
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:cake_wallet/themes/extensions/cake_text_theme.dart';
class SideMenuItem extends StatelessWidget { class SideMenuItem extends StatelessWidget {
const SideMenuItem({ const SideMenuItem({
@ -16,7 +17,7 @@ class SideMenuItem extends StatelessWidget {
Color _setColor(BuildContext context) { Color _setColor(BuildContext context) {
if (isSelected) { if (isSelected) {
return Theme.of(context).primaryTextTheme!.titleLarge!.color!; return Theme.of(context).extension<CakeTextTheme>()!.titleColor;
} else { } else {
return Theme.of(context).highlightColor; return Theme.of(context).highlightColor;
} }

View file

@ -1,4 +1,5 @@
import 'package:another_flushbar/flushbar.dart'; import 'package:another_flushbar/flushbar.dart';
import 'package:cake_wallet/themes/extensions/cake_text_theme.dart';
import 'package:cake_wallet/core/auth_service.dart'; import 'package:cake_wallet/core/auth_service.dart';
import 'package:cake_wallet/entities/desktop_dropdown_item.dart'; import 'package:cake_wallet/entities/desktop_dropdown_item.dart';
import 'package:cake_wallet/generated/i18n.dart'; import 'package:cake_wallet/generated/i18n.dart';
@ -36,14 +37,14 @@ class _DesktopWalletSelectionDropDownState extends State<DesktopWalletSelectionD
'assets/images/new_wallet.png', 'assets/images/new_wallet.png',
height: 12, height: 12,
width: 12, width: 12,
color: Theme.of(context).primaryTextTheme!.titleLarge!.color!, color: Theme.of(context).extension<CakeTextTheme>()!.titleColor,
); );
Image _restoreWalletImage(BuildContext context) => Image.asset( Image _restoreWalletImage(BuildContext context) => Image.asset(
'assets/images/restore_wallet.png', 'assets/images/restore_wallet.png',
height: 12, height: 12,
width: 12, width: 12,
color: Theme.of(context).primaryTextTheme!.titleLarge!.color!, color: Theme.of(context).extension<CakeTextTheme>()!.titleColor,
); );
Flushbar<void>? _progressBar; Flushbar<void>? _progressBar;

View file

@ -1,3 +1,4 @@
import 'package:cake_wallet/themes/extensions/cake_text_theme.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
class DropDownItemWidget extends StatelessWidget { class DropDownItemWidget extends StatelessWidget {
@ -23,7 +24,7 @@ class DropDownItemWidget extends StatelessWidget {
style: TextStyle( style: TextStyle(
fontSize: 22, fontSize: 22,
fontWeight: FontWeight.w500, fontWeight: FontWeight.w500,
color: Theme.of(context).primaryTextTheme!.titleLarge!.color!, color: Theme.of(context).extension<CakeTextTheme>()!.titleColor,
), ),
overflow: TextOverflow.ellipsis, overflow: TextOverflow.ellipsis,
maxLines: 1, maxLines: 1,

View file

@ -1,3 +1,4 @@
import 'package:cake_wallet/themes/extensions/cake_text_theme.dart';
import 'package:cake_wallet/src/screens/dashboard/widgets/filter_tile.dart'; import 'package:cake_wallet/src/screens/dashboard/widgets/filter_tile.dart';
import 'package:cake_wallet/src/widgets/section_divider.dart'; import 'package:cake_wallet/src/widgets/section_divider.dart';
import 'package:cake_wallet/src/widgets/standard_checkbox.dart'; import 'package:cake_wallet/src/widgets/standard_checkbox.dart';
@ -62,10 +63,7 @@ class FilterWidget extends StatelessWidget {
child: Text( child: Text(
title, title,
style: TextStyle( style: TextStyle(
color: Theme.of(context) color: Theme.of(context).extension<CakeTextTheme>()!.titleColor,
.primaryTextTheme!
.titleLarge!
.color!,
fontSize: 16, fontSize: 16,
fontFamily: 'Lato', fontFamily: 'Lato',
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,

View file

@ -1,3 +1,4 @@
import 'package:cake_wallet/themes/extensions/cake_text_theme.dart';
import 'package:cake_wallet/palette.dart'; import 'package:cake_wallet/palette.dart';
import 'package:cake_wallet/src/screens/ionia/widgets/rounded_checkbox.dart'; import 'package:cake_wallet/src/screens/ionia/widgets/rounded_checkbox.dart';
import 'package:cake_wallet/src/widgets/alert_background.dart'; import 'package:cake_wallet/src/widgets/alert_background.dart';
@ -111,10 +112,7 @@ class PresentReceiveOptionPicker extends StatelessWidget {
Text(option.toString(), Text(option.toString(),
textAlign: TextAlign.left, textAlign: TextAlign.left,
style: textSmall( style: textSmall(
color: Theme.of(context) color: Theme.of(context).extension<CakeTextTheme>()!.titleColor,
.primaryTextTheme!
.titleLarge!
.color!,
).copyWith( ).copyWith(
fontWeight: fontWeight:
value == option ? FontWeight.w800 : FontWeight.w500, value == option ? FontWeight.w800 : FontWeight.w500,

View file

@ -1,3 +1,4 @@
import 'package:cake_wallet/themes/extensions/cake_text_theme.dart';
import 'dart:ui'; import 'dart:ui';
import 'package:cake_wallet/palette.dart'; import 'package:cake_wallet/palette.dart';
import 'package:cake_wallet/routes.dart'; import 'package:cake_wallet/routes.dart';
@ -88,10 +89,7 @@ class DisclaimerBodyState extends State<DisclaimerPageBody> {
style: TextStyle( style: TextStyle(
fontSize: 20.0, fontSize: 20.0,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
color: Theme.of(context) color: Theme.of(context).extension<CakeTextTheme>()!.titleColor),
.primaryTextTheme!
.titleLarge!
.color!),
), ),
) )
], ],
@ -108,10 +106,7 @@ class DisclaimerBodyState extends State<DisclaimerPageBody> {
style: TextStyle( style: TextStyle(
fontSize: 12.0, fontSize: 12.0,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
color: Theme.of(context) color: Theme.of(context).extension<CakeTextTheme>()!.titleColor),
.primaryTextTheme!
.titleLarge!
.color!),
), ),
) )
], ],
@ -127,10 +122,7 @@ class DisclaimerBodyState extends State<DisclaimerPageBody> {
style: TextStyle( style: TextStyle(
fontSize: 12.0, fontSize: 12.0,
fontWeight: FontWeight.normal, fontWeight: FontWeight.normal,
color: Theme.of(context) color: Theme.of(context).extension<CakeTextTheme>()!.titleColor),
.primaryTextTheme!
.titleLarge!
.color!),
)) ))
], ],
), ),
@ -147,10 +139,7 @@ class DisclaimerBodyState extends State<DisclaimerPageBody> {
style: TextStyle( style: TextStyle(
fontSize: 14.0, fontSize: 14.0,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
color: Theme.of(context) color: Theme.of(context).extension<CakeTextTheme>()!.titleColor),
.primaryTextTheme!
.titleLarge!
.color!),
), ),
) )
], ],
@ -234,10 +223,7 @@ class DisclaimerBodyState extends State<DisclaimerPageBody> {
), ),
decoration: BoxDecoration( decoration: BoxDecoration(
border: Border.all( border: Border.all(
color: Theme.of(context) color: Theme.of(context).extension<CakeTextTheme>()!.secondaryTextColor,
.primaryTextTheme!
.bodySmall!
.color!,
width: 1.0), width: 1.0),
borderRadius: BorderRadius.all( borderRadius: BorderRadius.all(
Radius.circular(8.0)), Radius.circular(8.0)),
@ -255,10 +241,7 @@ class DisclaimerBodyState extends State<DisclaimerPageBody> {
style: TextStyle( style: TextStyle(
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
fontSize: 14.0, fontSize: 14.0,
color: Theme.of(context) color: Theme.of(context).extension<CakeTextTheme>()!.titleColor),
.primaryTextTheme!
.titleLarge!
.color!),
) )
], ],
), ),

View file

@ -1,3 +1,4 @@
import 'package:cake_wallet/themes/extensions/cake_text_theme.dart';
import 'package:cake_wallet/themes/extensions/cake_scrollbar_theme.dart'; import 'package:cake_wallet/themes/extensions/cake_scrollbar_theme.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:cake_wallet/palette.dart'; import 'package:cake_wallet/palette.dart';
@ -42,10 +43,7 @@ class PickerItemWidget extends StatelessWidget {
style: TextStyle( style: TextStyle(
color: isSelected color: isSelected
? Palette.blueCraiola ? Palette.blueCraiola
: Theme.of(context) : Theme.of(context).extension<CakeTextTheme>()!.titleColor,
.primaryTextTheme!
.titleLarge!
.color!,
fontSize: isSelected ? 16 : 14.0, fontSize: isSelected ? 16 : 14.0,
fontFamily: 'Lato', fontFamily: 'Lato',
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,

View file

@ -1,3 +1,4 @@
import 'package:cake_wallet/themes/extensions/cake_text_theme.dart';
import 'package:cake_wallet/exchange/exchange_provider_description.dart'; import 'package:cake_wallet/exchange/exchange_provider_description.dart';
import 'package:cake_wallet/store/dashboard/trades_store.dart'; import 'package:cake_wallet/store/dashboard/trades_store.dart';
import 'package:cake_wallet/themes/extensions/exchange_page_theme.dart'; import 'package:cake_wallet/themes/extensions/exchange_page_theme.dart';
@ -38,10 +39,7 @@ class ExchangeConfirmPage extends BasePage {
style: TextStyle( style: TextStyle(
fontSize: 18.0, fontSize: 18.0,
fontWeight: FontWeight.w500, fontWeight: FontWeight.w500,
color: Theme.of(context) color: Theme.of(context).extension<CakeTextTheme>()!.titleColor),
.primaryTextTheme!
.titleLarge!
.color!),
), ),
)), )),
Container( Container(
@ -75,10 +73,7 @@ class ExchangeConfirmPage extends BasePage {
style: TextStyle( style: TextStyle(
fontSize: 20, fontSize: 20,
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
color: Theme.of(context) color: Theme.of(context).extension<CakeTextTheme>()!.titleColor),
.primaryTextTheme!
.titleLarge!
.color!),
), ),
], ],
), ),
@ -94,10 +89,7 @@ class ExchangeConfirmPage extends BasePage {
}, },
text: S.of(context).copy_id, text: S.of(context).copy_id,
color: Theme.of(context).extension<ExchangePageTheme>()!.buttonBackgroundColor, color: Theme.of(context).extension<ExchangePageTheme>()!.buttonBackgroundColor,
textColor: Theme.of(context) textColor: Theme.of(context).extension<CakeTextTheme>()!.titleColor),
.primaryTextTheme!
.titleLarge!
.color!),
), ),
) )
], ],

View file

@ -1,3 +1,4 @@
import 'package:cake_wallet/themes/extensions/cake_text_theme.dart';
import 'dart:ui'; import 'dart:ui';
import 'package:cake_wallet/themes/extensions/exchange_page_theme.dart'; import 'package:cake_wallet/themes/extensions/exchange_page_theme.dart';
import 'package:cake_wallet/utils/request_review_handler.dart'; import 'package:cake_wallet/utils/request_review_handler.dart';
@ -53,7 +54,7 @@ class ExchangeTradePage extends BasePage {
@override @override
Widget trailing(BuildContext context) { Widget trailing(BuildContext context) {
final questionImage = Image.asset('assets/images/question_mark.png', final questionImage = Image.asset('assets/images/question_mark.png',
color: Theme.of(context).primaryTextTheme!.titleLarge!.color!); color: Theme.of(context).extension<CakeTextTheme>()!.titleColor);
return SizedBox( return SizedBox(
height: 20.0, height: 20.0,
@ -139,10 +140,7 @@ class ExchangeTradeState extends State<ExchangeTradeForm> {
), ),
if (trade.expiredAt != null) if (trade.expiredAt != null)
TimerWidget(trade.expiredAt!, TimerWidget(trade.expiredAt!,
color: Theme.of(context) color: Theme.of(context).extension<CakeTextTheme>()!.titleColor)
.primaryTextTheme!
.titleLarge!
.color!)
]) ])
: Offstage(), : Offstage(),
Padding( Padding(
@ -331,10 +329,7 @@ class ExchangeTradeState extends State<ExchangeTradeForm> {
style: TextStyle( style: TextStyle(
fontSize: 22, fontSize: 22,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
color: Theme.of(popupContext) color: Theme.of(popupContext).extension<CakeTextTheme>()!.titleColor,
.primaryTextTheme!
.titleLarge!
.color,
decoration: TextDecoration.none, decoration: TextDecoration.none,
), ),
), ),
@ -383,10 +378,7 @@ class ExchangeTradeState extends State<ExchangeTradeForm> {
style: TextStyle( style: TextStyle(
fontSize: 22, fontSize: 22,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
color: Theme.of(popupContext) color: Theme.of(popupContext).extension<CakeTextTheme>()!.titleColor,
.primaryTextTheme!
.titleLarge!
.color!,
decoration: TextDecoration.none, decoration: TextDecoration.none,
), ),
), ),

View file

@ -1,3 +1,4 @@
import 'package:cake_wallet/themes/extensions/cake_text_theme.dart';
import 'dart:ui'; import 'dart:ui';
import 'package:cake_wallet/generated/i18n.dart'; import 'package:cake_wallet/generated/i18n.dart';
import 'package:cake_wallet/src/widgets/primary_button.dart'; import 'package:cake_wallet/src/widgets/primary_button.dart';
@ -48,7 +49,7 @@ class InformationPage extends StatelessWidget {
onPressed: () => Navigator.of(context).pop(), onPressed: () => Navigator.of(context).pop(),
text: S.of(context).send_got_it, text: S.of(context).send_got_it,
color: Theme.of(context).extension<ExchangePageTheme>()!.buttonBackgroundColor, color: Theme.of(context).extension<ExchangePageTheme>()!.buttonBackgroundColor,
textColor: Theme.of(context).primaryTextTheme!.titleLarge!.color! textColor: Theme.of(context).extension<CakeTextTheme>()!.titleColor
), ),
) )
], ],

View file

@ -1,3 +1,4 @@
import 'package:cake_wallet/themes/extensions/cake_text_theme.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:cake_wallet/palette.dart'; import 'package:cake_wallet/palette.dart';
@ -26,12 +27,12 @@ class FAQItemState extends State<FAQItem> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
final addIcon = Icon(Icons.add, final addIcon = Icon(Icons.add,
color: Theme.of(context).primaryTextTheme!.titleLarge!.color!); color: Theme.of(context).extension<CakeTextTheme>()!.titleColor);
final removeIcon = Icon(Icons.remove, color: Palette.blueCraiola); final removeIcon = Icon(Icons.remove, color: Palette.blueCraiola);
final icon = isActive ? removeIcon : addIcon; final icon = isActive ? removeIcon : addIcon;
final color = isActive final color = isActive
? Palette.blueCraiola ? Palette.blueCraiola
: Theme.of(context).primaryTextTheme!.titleLarge!.color!; : Theme.of(context).extension<CakeTextTheme>()!.titleColor;
return ListTileTheme( return ListTileTheme(
contentPadding: EdgeInsets.fromLTRB(0, 6, 24, 6), contentPadding: EdgeInsets.fromLTRB(0, 6, 24, 6),
@ -54,7 +55,7 @@ class FAQItemState extends State<FAQItem> {
fontSize: 14, fontSize: 14,
fontWeight: FontWeight.normal, fontWeight: FontWeight.normal,
color: color:
Theme.of(context).primaryTextTheme!.titleLarge!.color!), Theme.of(context).extension<CakeTextTheme>()!.titleColor),
), ),
)) ))
]) ])

View file

@ -1,3 +1,4 @@
import 'package:cake_wallet/themes/extensions/cake_text_theme.dart';
import 'package:cake_wallet/core/email_validator.dart'; import 'package:cake_wallet/core/email_validator.dart';
import 'package:cake_wallet/ionia/ionia_create_state.dart'; import 'package:cake_wallet/ionia/ionia_create_state.dart';
import 'package:cake_wallet/routes.dart'; import 'package:cake_wallet/routes.dart';
@ -40,7 +41,7 @@ class IoniaCreateAccountPage extends BasePage {
return Text( return Text(
S.current.sign_up, S.current.sign_up,
style: textMediumSemiBold( style: textMediumSemiBold(
color: Theme.of(context).primaryTextTheme.titleLarge!.color!, color: Theme.of(context).extension<CakeTextTheme>()!.titleColor,
), ),
); );
} }

View file

@ -1,4 +1,5 @@
import 'package:cake_wallet/core/email_validator.dart'; import 'package:cake_wallet/core/email_validator.dart';
import 'package:cake_wallet/themes/extensions/cake_text_theme.dart';
import 'package:cake_wallet/ionia/ionia_create_state.dart'; import 'package:cake_wallet/ionia/ionia_create_state.dart';
import 'package:cake_wallet/routes.dart'; import 'package:cake_wallet/routes.dart';
import 'package:cake_wallet/src/screens/base_page.dart'; import 'package:cake_wallet/src/screens/base_page.dart';
@ -33,7 +34,7 @@ class IoniaLoginPage extends BasePage {
return Text( return Text(
S.current.login, S.current.login,
style: textMediumSemiBold( style: textMediumSemiBold(
color: Theme.of(context).primaryTextTheme.titleLarge!.color!, color: Theme.of(context).extension<CakeTextTheme>()!.titleColor,
), ),
); );
} }

View file

@ -1,3 +1,4 @@
import 'package:cake_wallet/themes/extensions/cake_text_theme.dart';
import 'package:cake_wallet/themes/extensions/keyboard_theme.dart'; import 'package:cake_wallet/themes/extensions/keyboard_theme.dart';
import 'package:cake_wallet/ionia/ionia_create_state.dart'; import 'package:cake_wallet/ionia/ionia_create_state.dart';
import 'package:cake_wallet/palette.dart'; import 'package:cake_wallet/palette.dart';
@ -42,7 +43,7 @@ class IoniaVerifyIoniaOtp extends BasePage {
return Text( return Text(
S.current.verification, S.current.verification,
style: textMediumSemiBold( style: textMediumSemiBold(
color: Theme.of(context).primaryTextTheme.titleLarge!.color!, color: Theme.of(context).extension<CakeTextTheme>()!.titleColor,
), ),
); );
} }

View file

@ -1,3 +1,4 @@
import 'package:cake_wallet/themes/extensions/cake_text_theme.dart';
import 'package:cake_wallet/palette.dart'; import 'package:cake_wallet/palette.dart';
import 'package:cake_wallet/routes.dart'; import 'package:cake_wallet/routes.dart';
import 'package:cake_wallet/src/screens/base_page.dart'; import 'package:cake_wallet/src/screens/base_page.dart';
@ -14,7 +15,7 @@ class IoniaWelcomePage extends BasePage {
return Text( return Text(
S.current.welcome_to_cakepay, S.current.welcome_to_cakepay,
style: textMediumSemiBold( style: textMediumSemiBold(
color: Theme.of(context).primaryTextTheme.titleLarge!.color!, color: Theme.of(context).extension<CakeTextTheme>()!.titleColor,
), ),
); );
} }
@ -35,7 +36,7 @@ class IoniaWelcomePage extends BasePage {
fontSize: 18, fontSize: 18,
fontWeight: FontWeight.w400, fontWeight: FontWeight.w400,
fontFamily: 'Lato', fontFamily: 'Lato',
color: Theme.of(context).primaryTextTheme!.titleLarge!.color!, color: Theme.of(context).extension<CakeTextTheme>()!.titleColor,
), ),
), ),
SizedBox(height: 20), SizedBox(height: 20),
@ -45,7 +46,7 @@ class IoniaWelcomePage extends BasePage {
fontSize: 18, fontSize: 18,
fontWeight: FontWeight.w400, fontWeight: FontWeight.w400,
fontFamily: 'Lato', fontFamily: 'Lato',
color: Theme.of(context).primaryTextTheme!.titleLarge!.color!, color: Theme.of(context).extension<CakeTextTheme>()!.titleColor,
), ),
), ),
], ],
@ -68,7 +69,7 @@ class IoniaWelcomePage extends BasePage {
fontSize: 15, fontSize: 15,
fontWeight: FontWeight.w500, fontWeight: FontWeight.w500,
fontFamily: 'Lato', fontFamily: 'Lato',
color: Theme.of(context).primaryTextTheme!.titleLarge!.color!, color: Theme.of(context).extension<CakeTextTheme>()!.titleColor,
), ),
), ),
SizedBox(height: 8), SizedBox(height: 8),

View file

@ -1,4 +1,5 @@
import 'package:cake_wallet/themes/extensions/cake_text_theme.dart';
import 'package:cake_wallet/ionia/ionia_create_state.dart'; import 'package:cake_wallet/ionia/ionia_create_state.dart';
import 'package:cake_wallet/ionia/ionia_gift_card.dart'; import 'package:cake_wallet/ionia/ionia_gift_card.dart';
import 'package:cake_wallet/routes.dart'; import 'package:cake_wallet/routes.dart';
@ -24,7 +25,7 @@ class IoniaAccountCardsPage extends BasePage {
return Text( return Text(
S.of(context).cards, S.of(context).cards,
style: textLargeSemiBold( style: textLargeSemiBold(
color: Theme.of(context).primaryTextTheme.titleLarge!.color!, color: Theme.of(context).extension<CakeTextTheme>()!.titleColor,
), ),
); );
} }
@ -73,7 +74,7 @@ class _IoniaCardTabsState extends State<_IoniaCardTabs> with SingleTickerProvide
width: 230, width: 230,
padding: EdgeInsets.all(5), padding: EdgeInsets.all(5),
decoration: BoxDecoration( decoration: BoxDecoration(
color: Theme.of(context).primaryTextTheme.titleLarge!.color! color: Theme.of(context).extension<CakeTextTheme>()!.titleColor
.withOpacity(0.1), .withOpacity(0.1),
borderRadius: BorderRadius.circular( borderRadius: BorderRadius.circular(
25.0, 25.0,
@ -91,7 +92,7 @@ class _IoniaCardTabsState extends State<_IoniaCardTabs> with SingleTickerProvide
), ),
labelColor: Theme.of(context).extension<OrderTheme>()!.iconColor, labelColor: Theme.of(context).extension<OrderTheme>()!.iconColor,
unselectedLabelColor: unselectedLabelColor:
Theme.of(context).primaryTextTheme!.titleLarge!.color!, Theme.of(context).extension<CakeTextTheme>()!.titleColor,
tabs: [ tabs: [
Tab( Tab(
text: S.of(context).active, text: S.of(context).active,
@ -186,12 +187,12 @@ class _IoniaCardListView extends StatelessWidget {
child: CardItem( child: CardItem(
onTap: () => onTap?.call(merchant), onTap: () => onTap?.call(merchant),
title: merchant.legalName, title: merchant.legalName,
backgroundColor: Theme.of(context).primaryTextTheme.titleLarge!.color! backgroundColor: Theme.of(context).extension<CakeTextTheme>()!.titleColor
.withOpacity(0.1), .withOpacity(0.1),
discount: 0, discount: 0,
hideBorder: true, hideBorder: true,
discountBackground: AssetImage('assets/images/red_badge_discount.png'), discountBackground: AssetImage('assets/images/red_badge_discount.png'),
titleColor: Theme.of(context).primaryTextTheme.titleLarge!.color!, titleColor: Theme.of(context).extension<CakeTextTheme>()!.titleColor,
subtitleColor: Theme.of(context).hintColor, subtitleColor: Theme.of(context).hintColor,
subTitle: '', subTitle: '',
logoUrl: merchant.logoUrl, logoUrl: merchant.logoUrl,

View file

@ -1,3 +1,4 @@
import 'package:cake_wallet/themes/extensions/cake_text_theme.dart';
import 'package:cake_wallet/routes.dart'; import 'package:cake_wallet/routes.dart';
import 'package:cake_wallet/src/screens/base_page.dart'; import 'package:cake_wallet/src/screens/base_page.dart';
import 'package:cake_wallet/generated/i18n.dart'; import 'package:cake_wallet/generated/i18n.dart';
@ -20,7 +21,7 @@ class IoniaAccountPage extends BasePage {
return Text( return Text(
S.current.account, S.current.account,
style: textMediumSemiBold( style: textMediumSemiBold(
color: Theme.of(context).primaryTextTheme.titleLarge!.color, color: Theme.of(context).extension<CakeTextTheme>()!.titleColor,
), ),
); );
} }

View file

@ -1,3 +1,4 @@
import 'package:cake_wallet/themes/extensions/cake_text_theme.dart';
import 'package:cake_wallet/ionia/ionia_create_state.dart'; import 'package:cake_wallet/ionia/ionia_create_state.dart';
import 'package:cake_wallet/routes.dart'; import 'package:cake_wallet/routes.dart';
import 'package:cake_wallet/src/screens/base_page.dart'; import 'package:cake_wallet/src/screens/base_page.dart';
@ -23,7 +24,7 @@ class IoniaActivateDebitCardPage extends BasePage {
return Text( return Text(
S.current.debit_card, S.current.debit_card,
style: textMediumSemiBold( style: textMediumSemiBold(
color: Theme.of(context).primaryTextTheme.titleLarge!.color!, color: Theme.of(context).extension<CakeTextTheme>()!.titleColor,
), ),
); );
} }

View file

@ -1,4 +1,5 @@
import 'package:cake_wallet/core/execution_state.dart'; import 'package:cake_wallet/core/execution_state.dart';
import 'package:cake_wallet/themes/extensions/cake_text_theme.dart';
import 'package:cake_wallet/ionia/ionia_merchant.dart'; import 'package:cake_wallet/ionia/ionia_merchant.dart';
import 'package:cake_wallet/ionia/ionia_tip.dart'; import 'package:cake_wallet/ionia/ionia_tip.dart';
import 'package:cake_wallet/palette.dart'; import 'package:cake_wallet/palette.dart';
@ -31,7 +32,7 @@ class IoniaBuyGiftCardDetailPage extends BasePage {
Widget middle(BuildContext context) { Widget middle(BuildContext context) {
return Text( return Text(
ioniaPurchaseViewModel.ioniaMerchant.legalName, ioniaPurchaseViewModel.ioniaMerchant.legalName,
style: textMediumSemiBold(color: Theme.of(context).primaryTextTheme.titleLarge!.color!), style: textMediumSemiBold(color: Theme.of(context).extension<CakeTextTheme>()!.titleColor),
); );
} }
@ -166,7 +167,7 @@ class IoniaBuyGiftCardDetailPage extends BasePage {
Text( Text(
S.of(context).tip, S.of(context).tip,
style: TextStyle( style: TextStyle(
color: Theme.of(context).primaryTextTheme!.titleLarge!.color!, color: Theme.of(context).extension<CakeTextTheme>()!.titleColor,
fontWeight: FontWeight.w700, fontWeight: FontWeight.w700,
fontSize: 14, fontSize: 14,
), ),
@ -402,17 +403,17 @@ class TipButton extends StatelessWidget {
Color captionTextColor(BuildContext context) { Color captionTextColor(BuildContext context) {
if (isDark(context)) { if (isDark(context)) {
return Theme.of(context).primaryTextTheme!.titleLarge!.color!; return Theme.of(context).extension<CakeTextTheme>()!.titleColor;
} }
return isSelected return isSelected
? Theme.of(context).dialogTheme.backgroundColor! ? Theme.of(context).dialogTheme.backgroundColor!
: Theme.of(context).primaryTextTheme!.titleLarge!.color!; : Theme.of(context).extension<CakeTextTheme>()!.titleColor;
} }
Color subTitleTextColor(BuildContext context) { Color subTitleTextColor(BuildContext context) {
if (isDark(context)) { if (isDark(context)) {
return Theme.of(context).primaryTextTheme!.titleLarge!.color!; return Theme.of(context).extension<CakeTextTheme>()!.titleColor;
} }
return isSelected return isSelected
@ -424,12 +425,12 @@ class TipButton extends StatelessWidget {
if (isDark(context)) { if (isDark(context)) {
return isSelected return isSelected
? null ? null
: Theme.of(context).primaryTextTheme.titleLarge!.color!.withOpacity(0.01); : Theme.of(context).extension<CakeTextTheme>()!.titleColor.withOpacity(0.01);
} }
return isSelected return isSelected
? null ? null
: Theme.of(context).primaryTextTheme.titleLarge!.color!.withOpacity(0.1); : Theme.of(context).extension<CakeTextTheme>()!.titleColor.withOpacity(0.1);
} }
@override @override

View file

@ -1,4 +1,5 @@
import 'package:cake_wallet/themes/extensions/keyboard_theme.dart'; import 'package:cake_wallet/themes/extensions/keyboard_theme.dart';
import 'package:cake_wallet/themes/extensions/cake_text_theme.dart';
import 'package:cake_wallet/routes.dart'; import 'package:cake_wallet/routes.dart';
import 'package:cake_wallet/src/screens/base_page.dart'; import 'package:cake_wallet/src/screens/base_page.dart';
import 'package:cake_wallet/src/screens/ionia/widgets/card_item.dart'; import 'package:cake_wallet/src/screens/ionia/widgets/card_item.dart';
@ -147,10 +148,10 @@ class IoniaBuyGiftCardPage extends BasePage {
padding: const EdgeInsets.all(24.0), padding: const EdgeInsets.all(24.0),
child: CardItem( child: CardItem(
title: merchant.legalName, title: merchant.legalName,
backgroundColor: Theme.of(context).primaryTextTheme.titleLarge!.color! backgroundColor: Theme.of(context).extension<CakeTextTheme>()!.titleColor
.withOpacity(0.1), .withOpacity(0.1),
discount: merchant.discount, discount: merchant.discount,
titleColor: Theme.of(context).primaryTextTheme.titleLarge!.color!, titleColor: Theme.of(context).extension<CakeTextTheme>()!.titleColor,
subtitleColor: Theme.of(context).hintColor, subtitleColor: Theme.of(context).hintColor,
subTitle: merchant.avaibilityStatus, subTitle: merchant.avaibilityStatus,
logoUrl: merchant.logoUrl, logoUrl: merchant.logoUrl,

View file

@ -1,4 +1,5 @@
import 'package:cake_wallet/themes/extensions/keyboard_theme.dart'; import 'package:cake_wallet/themes/extensions/keyboard_theme.dart';
import 'package:cake_wallet/themes/extensions/cake_text_theme.dart';
import 'package:cake_wallet/core/execution_state.dart'; import 'package:cake_wallet/core/execution_state.dart';
import 'package:cake_wallet/src/screens/base_page.dart'; import 'package:cake_wallet/src/screens/base_page.dart';
import 'package:cake_wallet/src/screens/ionia/widgets/card_item.dart'; import 'package:cake_wallet/src/screens/ionia/widgets/card_item.dart';
@ -137,12 +138,12 @@ class IoniaCustomRedeemPage extends BasePage {
padding: const EdgeInsets.all(24.0), padding: const EdgeInsets.all(24.0),
child: CardItem( child: CardItem(
title: giftCard.legalName, title: giftCard.legalName,
backgroundColor: Theme.of(context).primaryTextTheme.titleLarge!.color! backgroundColor: Theme.of(context).extension<CakeTextTheme>()!.titleColor
.withOpacity(0.1), .withOpacity(0.1),
discount: giftCard.remainingAmount, discount: giftCard.remainingAmount,
isAmount: true, isAmount: true,
discountBackground: AssetImage('assets/images/red_badge_discount.png'), discountBackground: AssetImage('assets/images/red_badge_discount.png'),
titleColor: Theme.of(context).primaryTextTheme.titleLarge!.color!, titleColor: Theme.of(context).extension<CakeTextTheme>()!.titleColor,
subtitleColor: Theme.of(context).hintColor, subtitleColor: Theme.of(context).hintColor,
subTitle: S.of(context).online, subTitle: S.of(context).online,
logoUrl: giftCard.logoUrl, logoUrl: giftCard.logoUrl,

View file

@ -1,4 +1,5 @@
import 'package:cake_wallet/themes/extensions/keyboard_theme.dart'; import 'package:cake_wallet/themes/extensions/keyboard_theme.dart';
import 'package:cake_wallet/themes/extensions/cake_text_theme.dart';
import 'package:cake_wallet/ionia/ionia_merchant.dart'; import 'package:cake_wallet/ionia/ionia_merchant.dart';
import 'package:cake_wallet/src/screens/base_page.dart'; import 'package:cake_wallet/src/screens/base_page.dart';
import 'package:cake_wallet/src/screens/ionia/widgets/card_item.dart'; import 'package:cake_wallet/src/screens/ionia/widgets/card_item.dart';
@ -145,10 +146,10 @@ class IoniaCustomTipPage extends BasePage {
padding: const EdgeInsets.all(24.0), padding: const EdgeInsets.all(24.0),
child: CardItem( child: CardItem(
title: merchant.legalName, title: merchant.legalName,
backgroundColor: Theme.of(context).primaryTextTheme.titleLarge!.color! backgroundColor: Theme.of(context).extension<CakeTextTheme>()!.titleColor
.withOpacity(0.1), .withOpacity(0.1),
discount: 0.0, discount: 0.0,
titleColor: Theme.of(context).primaryTextTheme.titleLarge!.color!, titleColor: Theme.of(context).extension<CakeTextTheme>()!.titleColor,
subtitleColor: Theme.of(context).hintColor, subtitleColor: Theme.of(context).hintColor,
subTitle: merchant.isOnline ? S.of(context).online : S.of(context).offline, subTitle: merchant.isOnline ? S.of(context).online : S.of(context).offline,
logoUrl: merchant.logoUrl, logoUrl: merchant.logoUrl,

View file

@ -1,4 +1,5 @@
import 'package:cake_wallet/ionia/ionia_create_state.dart'; import 'package:cake_wallet/ionia/ionia_create_state.dart';
import 'package:cake_wallet/themes/extensions/cake_text_theme.dart';
import 'package:cake_wallet/ionia/ionia_virtual_card.dart'; import 'package:cake_wallet/ionia/ionia_virtual_card.dart';
import 'package:cake_wallet/routes.dart'; import 'package:cake_wallet/routes.dart';
import 'package:cake_wallet/src/screens/base_page.dart'; import 'package:cake_wallet/src/screens/base_page.dart';
@ -25,7 +26,7 @@ class IoniaDebitCardPage extends BasePage {
return Text( return Text(
S.current.debit_card, S.current.debit_card,
style: textMediumSemiBold( style: textMediumSemiBold(
color: Theme.of(context).primaryTextTheme.titleLarge!.color!, color: Theme.of(context).extension<CakeTextTheme>()!.titleColor,
), ),
); );
} }

View file

@ -1,4 +1,5 @@
import 'package:cake_wallet/core/execution_state.dart'; import 'package:cake_wallet/core/execution_state.dart';
import 'package:cake_wallet/themes/extensions/cake_text_theme.dart';
import 'package:cake_wallet/ionia/ionia_gift_card.dart'; import 'package:cake_wallet/ionia/ionia_gift_card.dart';
import 'package:cake_wallet/routes.dart'; import 'package:cake_wallet/routes.dart';
import 'package:cake_wallet/src/screens/base_page.dart'; import 'package:cake_wallet/src/screens/base_page.dart';
@ -33,7 +34,7 @@ class IoniaGiftCardDetailPage extends BasePage {
final _backButton = Icon( final _backButton = Icon(
Icons.arrow_back_ios, Icons.arrow_back_ios,
color: Theme.of(context).primaryTextTheme!.titleLarge!.color!, color: Theme.of(context).extension<CakeTextTheme>()!.titleColor,
size: 16, size: 16,
); );
return Padding( return Padding(
@ -60,7 +61,7 @@ class IoniaGiftCardDetailPage extends BasePage {
return Text( return Text(
viewModel.giftCard.legalName, viewModel.giftCard.legalName,
style: textMediumSemiBold( style: textMediumSemiBold(
color: Theme.of(context).primaryTextTheme.titleLarge!.color!), color: Theme.of(context).extension<CakeTextTheme>()!.titleColor),
); );
} }
@ -143,7 +144,7 @@ class IoniaGiftCardDetailPage extends BasePage {
}, },
text: S.of(context).more_options, text: S.of(context).more_options,
color: Theme.of(context).cardColor, color: Theme.of(context).cardColor,
textColor: Theme.of(context).primaryTextTheme!.titleLarge!.color!, textColor: Theme.of(context).extension<CakeTextTheme>()!.titleColor,
), ),
SizedBox(height: 12), SizedBox(height: 12),
LoadingPrimaryButton( LoadingPrimaryButton(

View file

@ -1,4 +1,5 @@
import 'package:cake_wallet/ionia/ionia_gift_card.dart'; import 'package:cake_wallet/ionia/ionia_gift_card.dart';
import 'package:cake_wallet/themes/extensions/cake_text_theme.dart';
import 'package:cake_wallet/routes.dart'; import 'package:cake_wallet/routes.dart';
import 'package:cake_wallet/src/screens/base_page.dart'; import 'package:cake_wallet/src/screens/base_page.dart';
import 'package:cake_wallet/generated/i18n.dart'; import 'package:cake_wallet/generated/i18n.dart';
@ -16,7 +17,7 @@ class IoniaMoreOptionsPage extends BasePage {
return Text( return Text(
S.current.more_options, S.current.more_options,
style: textMediumSemiBold( style: textMediumSemiBold(
color: Theme.of(context).primaryTextTheme.titleLarge!.color!, color: Theme.of(context).extension<CakeTextTheme>()!.titleColor,
), ),
); );
} }
@ -35,7 +36,7 @@ class IoniaMoreOptionsPage extends BasePage {
child: Text( child: Text(
S.of(context).choose_from_available_options, S.of(context).choose_from_available_options,
style: textMedium( style: textMedium(
color: Theme.of(context).primaryTextTheme!.titleLarge!.color!, color: Theme.of(context).extension<CakeTextTheme>()!.titleColor,
), ),
), ),
), ),

View file

@ -1,4 +1,5 @@
import 'package:cake_wallet/ionia/ionia_gift_card.dart'; import 'package:cake_wallet/ionia/ionia_gift_card.dart';
import 'package:cake_wallet/themes/extensions/cake_text_theme.dart';
import 'package:cake_wallet/routes.dart'; import 'package:cake_wallet/routes.dart';
import 'package:cake_wallet/src/screens/base_page.dart'; import 'package:cake_wallet/src/screens/base_page.dart';
import 'package:cake_wallet/src/widgets/primary_button.dart'; import 'package:cake_wallet/src/widgets/primary_button.dart';
@ -24,7 +25,7 @@ class IoniaPaymentStatusPage extends BasePage {
S.of(context).generating_gift_card, S.of(context).generating_gift_card,
textAlign: TextAlign.center, textAlign: TextAlign.center,
style: textMediumSemiBold( style: textMediumSemiBold(
color: Theme.of(context).primaryTextTheme.titleLarge!.color!)); color: Theme.of(context).extension<CakeTextTheme>()!.titleColor));
} }
@override @override
@ -91,7 +92,7 @@ class _IoniaPaymentStatusPageBodyBodyState extends State<_IoniaPaymentStatusPage
Text( Text(
S.of(context).awaiting_payment_confirmation, S.of(context).awaiting_payment_confirmation,
style: textLargeSemiBold( style: textLargeSemiBold(
color: Theme.of(context).primaryTextTheme!.titleLarge!.color!)) color: Theme.of(context).extension<CakeTextTheme>()!.titleColor))
]), ]),
SizedBox(height: 40), SizedBox(height: 40),
Row(children: [ Row(children: [
@ -130,7 +131,7 @@ class _IoniaPaymentStatusPageBodyBodyState extends State<_IoniaPaymentStatusPage
Text( Text(
S.of(context).gift_card_is_generated, S.of(context).gift_card_is_generated,
style: textLargeSemiBold( style: textLargeSemiBold(
color: Theme.of(context).primaryTextTheme!.titleLarge!.color!)) color: Theme.of(context).extension<CakeTextTheme>()!.titleColor))
])); ]));
} }
@ -148,7 +149,7 @@ class _IoniaPaymentStatusPageBodyBodyState extends State<_IoniaPaymentStatusPage
Text( Text(
S.of(context).generating_gift_card, S.of(context).generating_gift_card,
style: textLargeSemiBold( style: textLargeSemiBold(
color: Theme.of(context).primaryTextTheme!.titleLarge!.color!))]); color: Theme.of(context).extension<CakeTextTheme>()!.titleColor))]);
}), }),
], ],
), ),
@ -161,7 +162,7 @@ class _IoniaPaymentStatusPageBodyBodyState extends State<_IoniaPaymentStatusPage
widget.viewModel.payingByBitcoin ? S.of(context).bitcoin_payments_require_1_confirmation widget.viewModel.payingByBitcoin ? S.of(context).bitcoin_payments_require_1_confirmation
: S.of(context).proceed_after_one_minute, : S.of(context).proceed_after_one_minute,
style: textMedium( style: textMedium(
color: Theme.of(context).primaryTextTheme!.titleLarge!.color!, color: Theme.of(context).extension<CakeTextTheme>()!.titleColor,
).copyWith(fontWeight: FontWeight.w500), ).copyWith(fontWeight: FontWeight.w500),
textAlign: TextAlign.center, textAlign: TextAlign.center,
)), )),
@ -181,7 +182,7 @@ class _IoniaPaymentStatusPageBodyBodyState extends State<_IoniaPaymentStatusPage
onPressed: () => Navigator.of(context).pushNamed(Routes.support), onPressed: () => Navigator.of(context).pushNamed(Routes.support),
text: S.of(context).contact_support, text: S.of(context).contact_support,
color: Theme.of(context).cardColor, color: Theme.of(context).cardColor,
textColor: Theme.of(context).primaryTextTheme!.titleLarge!.color!); textColor: Theme.of(context).extension<CakeTextTheme>()!.titleColor);
}) })
]) ])
), ),
@ -204,7 +205,7 @@ class _IoniaPaymentStatusPageBodyBodyState extends State<_IoniaPaymentStatusPage
Text( Text(
subtitle, subtitle,
style: textMedium( style: textMedium(
color: Theme.of(context).primaryTextTheme!.titleLarge!.color!, color: Theme.of(context).extension<CakeTextTheme>()!.titleColor,
), ),
), ),
], ],

View file

@ -1,4 +1,5 @@
import 'package:cake_wallet/src/widgets/alert_background.dart'; import 'package:cake_wallet/src/widgets/alert_background.dart';
import 'package:cake_wallet/themes/extensions/cake_text_theme.dart';
import 'package:cake_wallet/src/widgets/primary_button.dart'; import 'package:cake_wallet/src/widgets/primary_button.dart';
import 'package:cake_wallet/themes/extensions/cake_scrollbar_theme.dart'; import 'package:cake_wallet/themes/extensions/cake_scrollbar_theme.dart';
import 'package:cake_wallet/typography.dart'; import 'package:cake_wallet/typography.dart';
@ -59,7 +60,7 @@ class IoniaAlertModal extends StatelessWidget {
text: actionTitle, text: actionTitle,
color: Theme.of(context).cardColor, color: Theme.of(context).cardColor,
textColor: textColor:
Theme.of(context).primaryTextTheme!.titleLarge!.color!, Theme.of(context).extension<CakeTextTheme>()!.titleColor,
), ),
SizedBox(height: 21), SizedBox(height: 21),
], ],

View file

@ -1,4 +1,5 @@
import 'package:cake_wallet/src/screens/ionia/widgets/rounded_checkbox.dart'; import 'package:cake_wallet/src/screens/ionia/widgets/rounded_checkbox.dart';
import 'package:cake_wallet/themes/extensions/cake_text_theme.dart';
import 'package:cake_wallet/src/widgets/alert_background.dart'; import 'package:cake_wallet/src/widgets/alert_background.dart';
import 'package:cake_wallet/typography.dart'; import 'package:cake_wallet/typography.dart';
import 'package:cake_wallet/generated/i18n.dart'; import 'package:cake_wallet/generated/i18n.dart';
@ -47,7 +48,7 @@ class IoniaFilterModal extends StatelessWidget {
child: TextField( child: TextField(
onChanged: ioniaGiftCardsListViewModel.onSearchFilter, onChanged: ioniaGiftCardsListViewModel.onSearchFilter,
style: textMedium( style: textMedium(
color: Theme.of(context).primaryTextTheme!.titleLarge!.color!, color: Theme.of(context).extension<CakeTextTheme>()!.titleColor,
), ),
decoration: InputDecoration( decoration: InputDecoration(
filled: true, filled: true,
@ -85,12 +86,12 @@ class IoniaFilterModal extends StatelessWidget {
children: [ children: [
Image.asset( Image.asset(
category.iconPath, category.iconPath,
color: Theme.of(context).primaryTextTheme!.titleLarge!.color!, color: Theme.of(context).extension<CakeTextTheme>()!.titleColor,
), ),
SizedBox(width: 10), SizedBox(width: 10),
Text(category.title, Text(category.title,
style: textSmall( style: textSmall(
color: Theme.of(context).primaryTextTheme!.titleLarge!.color!, color: Theme.of(context).extension<CakeTextTheme>()!.titleColor,
).copyWith(fontWeight: FontWeight.w500)), ).copyWith(fontWeight: FontWeight.w500)),
], ],
), ),

View file

@ -1,4 +1,5 @@
import 'package:cake_wallet/typography.dart'; import 'package:cake_wallet/typography.dart';
import 'package:cake_wallet/themes/extensions/cake_text_theme.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:cake_wallet/themes/extensions/transaction_trade_theme.dart'; import 'package:cake_wallet/themes/extensions/transaction_trade_theme.dart';
@ -34,7 +35,7 @@ class IoniaTile extends StatelessWidget {
Text( Text(
subTitle, subTitle,
style: textMediumBold( style: textMediumBold(
color: Theme.of(context).primaryTextTheme!.titleLarge!.color!, color: Theme.of(context).extension<CakeTextTheme>()!.titleColor,
), ),
), ),
], ],

View file

@ -1,4 +1,5 @@
import 'package:cake_wallet/typography.dart'; import 'package:cake_wallet/typography.dart';
import 'package:cake_wallet/themes/extensions/cake_text_theme.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
class TextIconButton extends StatelessWidget { class TextIconButton extends StatelessWidget {
@ -22,12 +23,12 @@ class TextIconButton extends StatelessWidget {
Text( Text(
label, label,
style: textMediumSemiBold( style: textMediumSemiBold(
color: Theme.of(context).primaryTextTheme!.titleLarge!.color!, color: Theme.of(context).extension<CakeTextTheme>()!.titleColor,
), ),
), ),
Icon( Icon(
Icons.chevron_right_rounded, Icons.chevron_right_rounded,
color: Theme.of(context).primaryTextTheme!.titleLarge!.color!, color: Theme.of(context).extension<CakeTextTheme>()!.titleColor,
), ),
], ],
), ),

View file

@ -1,4 +1,5 @@
import 'package:cake_wallet/entities/generate_name.dart'; import 'package:cake_wallet/entities/generate_name.dart';
import 'package:cake_wallet/themes/extensions/cake_text_theme.dart';
import 'package:cake_wallet/main.dart'; import 'package:cake_wallet/main.dart';
import 'package:cake_wallet/routes.dart'; import 'package:cake_wallet/routes.dart';
import 'package:cake_wallet/themes/theme_base.dart'; import 'package:cake_wallet/themes/theme_base.dart';
@ -119,10 +120,7 @@ class _WalletNameFormState extends State<WalletNameForm> {
style: TextStyle( style: TextStyle(
fontSize: 20.0, fontSize: 20.0,
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
color: Theme.of(context) color: Theme.of(context).extension<CakeTextTheme>()!.titleColor),
.primaryTextTheme!
.titleLarge!
.color!),
decoration: InputDecoration( decoration: InputDecoration(
hintStyle: TextStyle( hintStyle: TextStyle(
fontSize: 18.0, fontSize: 18.0,
@ -183,10 +181,7 @@ class _WalletNameFormState extends State<WalletNameForm> {
style: TextStyle( style: TextStyle(
fontSize: 16.0, fontSize: 16.0,
fontWeight: FontWeight.w500, fontWeight: FontWeight.w500,
color: Theme.of(context) color: Theme.of(context).extension<CakeTextTheme>()!.titleColor),
.primaryTextTheme!
.titleLarge!
.color!),
), ),
), ),
Padding( Padding(

View file

@ -1,4 +1,5 @@
import 'package:cake_wallet/utils/responsive_layout_util.dart'; import 'package:cake_wallet/utils/responsive_layout_util.dart';
import 'package:cake_wallet/themes/extensions/cake_text_theme.dart';
import 'package:cw_core/wallet_type.dart'; import 'package:cw_core/wallet_type.dart';
import 'package:cake_wallet/themes/theme_base.dart'; import 'package:cake_wallet/themes/theme_base.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
@ -80,10 +81,7 @@ class WalletTypeFormState extends State<WalletTypeForm> {
style: TextStyle( style: TextStyle(
fontSize: 16, fontSize: 16,
fontWeight: FontWeight.w500, fontWeight: FontWeight.w500,
color: Theme.of(context) color: Theme.of(context).extension<CakeTextTheme>()!.titleColor),
.primaryTextTheme!
.titleLarge!
.color!),
), ),
), ),
...types.map((type) => Padding( ...types.map((type) => Padding(

View file

@ -1,4 +1,5 @@
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:cake_wallet/themes/extensions/cake_text_theme.dart';
import 'package:cake_wallet/themes/extensions/filter_theme.dart'; import 'package:cake_wallet/themes/extensions/filter_theme.dart';
import 'package:cake_wallet/themes/extensions/wallet_list_theme.dart'; import 'package:cake_wallet/themes/extensions/wallet_list_theme.dart';
@ -22,7 +23,7 @@ class SelectButton extends StatelessWidget {
: Theme.of(context).cardColor; : Theme.of(context).cardColor;
final textColor = isSelected final textColor = isSelected
? Theme.of(context).extension<WalletListTheme>()!.restoreWalletButtonTextColor ? Theme.of(context).extension<WalletListTheme>()!.restoreWalletButtonTextColor
: Theme.of(context).primaryTextTheme!.titleLarge!.color!; : Theme.of(context).extension<CakeTextTheme>()!.titleColor;
final arrowColor = isSelected final arrowColor = isSelected
? Theme.of(context).extension<WalletListTheme>()!.restoreWalletButtonTextColor ? Theme.of(context).extension<WalletListTheme>()!.restoreWalletButtonTextColor
: Theme.of(context).extension<FilterTheme>()!.titlesColor; : Theme.of(context).extension<FilterTheme>()!.titlesColor;

View file

@ -1,4 +1,5 @@
import 'package:cake_wallet/themes/extensions/pin_code_theme.dart'; import 'package:cake_wallet/themes/extensions/pin_code_theme.dart';
import 'package:cake_wallet/themes/extensions/cake_text_theme.dart';
import 'package:cake_wallet/utils/responsive_layout_util.dart'; import 'package:cake_wallet/utils/responsive_layout_util.dart';
import 'package:cake_wallet/utils/show_bar.dart'; import 'package:cake_wallet/utils/show_bar.dart';
import 'package:another_flushbar/flushbar.dart'; import 'package:another_flushbar/flushbar.dart';
@ -111,11 +112,11 @@ class PinCodeState<T extends PinCodeWidget> extends State<T> {
Widget body(BuildContext context) { Widget body(BuildContext context) {
final deleteIconImage = Image.asset( final deleteIconImage = Image.asset(
'assets/images/delete_icon.png', 'assets/images/delete_icon.png',
color: Theme.of(context).primaryTextTheme!.titleLarge!.color!, color: Theme.of(context).extension<CakeTextTheme>()!.titleColor,
); );
final faceImage = Image.asset( final faceImage = Image.asset(
'assets/images/face.png', 'assets/images/face.png',
color: Theme.of(context).primaryTextTheme!.titleLarge!.color!, color: Theme.of(context).extension<CakeTextTheme>()!.titleColor,
); );
return RawKeyboardListener( return RawKeyboardListener(
@ -144,7 +145,7 @@ class PinCodeState<T extends PinCodeWidget> extends State<T> {
fontSize: 20, fontSize: 20,
fontWeight: FontWeight.w500, fontWeight: FontWeight.w500,
color: color:
Theme.of(context).primaryTextTheme!.titleLarge!.color!)), Theme.of(context).extension<CakeTextTheme>()!.titleColor)),
Spacer(flex: 3), Spacer(flex: 3),
Container( Container(
width: 180, width: 180,
@ -160,10 +161,7 @@ class PinCodeState<T extends PinCodeWidget> extends State<T> {
decoration: BoxDecoration( decoration: BoxDecoration(
shape: BoxShape.circle, shape: BoxShape.circle,
color: isFilled color: isFilled
? Theme.of(context) ? Theme.of(context).extension<CakeTextTheme>()!.titleColor
.primaryTextTheme!
.titleLarge!
.color!
: Theme.of(context).extension<PinCodeTheme>()!.indicatorsColor : Theme.of(context).extension<PinCodeTheme>()!.indicatorsColor
.withOpacity(0.25), .withOpacity(0.25),
)); ));
@ -251,10 +249,7 @@ class PinCodeState<T extends PinCodeWidget> extends State<T> {
style: TextStyle( style: TextStyle(
fontSize: 30.0, fontSize: 30.0,
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
color: Theme.of(context) color: Theme.of(context).extension<CakeTextTheme>()!.titleColor)),
.primaryTextTheme!
.titleLarge!
.color!)),
), ),
); );
}), }),

View file

@ -1,4 +1,5 @@
import 'package:cake_wallet/anonpay/anonpay_invoice_info.dart'; import 'package:cake_wallet/anonpay/anonpay_invoice_info.dart';
import 'package:cake_wallet/themes/extensions/cake_text_theme.dart';
import 'package:cake_wallet/generated/i18n.dart'; import 'package:cake_wallet/generated/i18n.dart';
import 'package:cake_wallet/src/screens/dashboard/widgets/sync_indicator_icon.dart'; import 'package:cake_wallet/src/screens/dashboard/widgets/sync_indicator_icon.dart';
import 'package:cake_wallet/themes/extensions/address_theme.dart'; import 'package:cake_wallet/themes/extensions/address_theme.dart';
@ -54,10 +55,7 @@ class AnonInvoiceStatusSection extends StatelessWidget {
Text( Text(
invoiceInfo.status ?? '', invoiceInfo.status ?? '',
style: textSmallSemiBold( style: textSmallSemiBold(
color: Theme.of(context) color: Theme.of(context).extension<CakeTextTheme>()!.titleColor,
.primaryTextTheme!
.titleLarge!
.color,
), ),
) )
], ],
@ -80,7 +78,7 @@ class AnonInvoiceStatusSection extends StatelessWidget {
Text( Text(
invoiceInfo.invoiceId ?? '', invoiceInfo.invoiceId ?? '',
style: textSmallSemiBold( style: textSmallSemiBold(
color: Theme.of(context).primaryTextTheme!.titleLarge!.color, color: Theme.of(context).extension<CakeTextTheme>()!.titleColor,
), ),
), ),
], ],

View file

@ -1,4 +1,5 @@
import 'package:cake_wallet/themes/theme_base.dart'; import 'package:cake_wallet/themes/theme_base.dart';
import 'package:cake_wallet/themes/extensions/cake_text_theme.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:cake_wallet/src/screens/base_page.dart'; import 'package:cake_wallet/src/screens/base_page.dart';
import 'package:cake_wallet/generated/i18n.dart'; import 'package:cake_wallet/generated/i18n.dart';
@ -95,10 +96,7 @@ class _SweepingWalletWidgetState extends State<SweepingWalletWidget> {
style: TextStyle( style: TextStyle(
fontSize: 36, fontSize: 36,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
color: Theme.of(context) color: Theme.of(context).extension<CakeTextTheme>()!.titleColor,
.primaryTextTheme!
.titleLarge!
.color!,
), ),
textAlign: TextAlign.center, textAlign: TextAlign.center,
), ),

View file

@ -1,4 +1,5 @@
import 'package:cake_wallet/themes/extensions/keyboard_theme.dart'; import 'package:cake_wallet/themes/extensions/keyboard_theme.dart';
import 'package:cake_wallet/themes/extensions/cake_text_theme.dart';
import 'package:cake_wallet/src/widgets/keyboard_done_button.dart'; import 'package:cake_wallet/src/widgets/keyboard_done_button.dart';
import 'package:cake_wallet/src/widgets/scollable_with_bottom_section.dart'; import 'package:cake_wallet/src/widgets/scollable_with_bottom_section.dart';
import 'package:cake_wallet/utils/responsive_layout_util.dart'; import 'package:cake_wallet/utils/responsive_layout_util.dart';
@ -94,7 +95,7 @@ class WalletRestorePage extends BasePage {
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
fontFamily: 'Lato', fontFamily: 'Lato',
color: titleColor ?? color: titleColor ??
Theme.of(context).primaryTextTheme!.titleLarge!.color!), Theme.of(context).extension<CakeTextTheme>()!.titleColor),
)); ));
final WalletRestoreViewModel walletRestoreViewModel; final WalletRestoreViewModel walletRestoreViewModel;

View file

@ -1,4 +1,5 @@
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:cake_wallet/themes/extensions/cake_text_theme.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:cake_wallet/themes/extensions/transaction_trade_theme.dart'; import 'package:cake_wallet/themes/extensions/transaction_trade_theme.dart';
@ -46,10 +47,7 @@ class RestoreButton extends StatelessWidget {
style: TextStyle( style: TextStyle(
fontSize: 16, fontSize: 16,
fontWeight: FontWeight.w500, fontWeight: FontWeight.w500,
color: Theme.of(context) color: Theme.of(context).extension<CakeTextTheme>()!.titleColor),
.primaryTextTheme!
.titleLarge!
.color!),
), ),
Padding( Padding(
padding: EdgeInsets.only(top: 5), padding: EdgeInsets.only(top: 5),

View file

@ -1,4 +1,5 @@
import 'package:cake_wallet/utils/responsive_layout_util.dart'; import 'package:cake_wallet/utils/responsive_layout_util.dart';
import 'package:cake_wallet/themes/extensions/cake_text_theme.dart';
import 'package:cw_core/wallet_type.dart'; import 'package:cw_core/wallet_type.dart';
import 'package:cake_wallet/routes.dart'; import 'package:cake_wallet/routes.dart';
import 'package:cake_wallet/themes/theme_base.dart'; import 'package:cake_wallet/themes/theme_base.dart';
@ -60,10 +61,7 @@ class PreSeedPage extends BasePage {
style: TextStyle( style: TextStyle(
fontSize: 14, fontSize: 14,
fontWeight: FontWeight.normal, fontWeight: FontWeight.normal,
color: Theme.of(context) color: Theme.of(context).extension<CakeTextTheme>()!.secondaryTextColor),
.primaryTextTheme!
.bodySmall!
.color!),
), ),
), ),
PrimaryButton( PrimaryButton(

View file

@ -1,4 +1,5 @@
import 'package:cake_wallet/palette.dart'; import 'package:cake_wallet/palette.dart';
import 'package:cake_wallet/themes/extensions/cake_text_theme.dart';
import 'package:cake_wallet/themes/extensions/pin_code_theme.dart'; import 'package:cake_wallet/themes/extensions/pin_code_theme.dart';
import 'package:cake_wallet/themes/theme_base.dart'; import 'package:cake_wallet/themes/theme_base.dart';
import 'package:cake_wallet/src/widgets/alert_with_two_actions.dart'; import 'package:cake_wallet/src/widgets/alert_with_two_actions.dart';
@ -115,10 +116,7 @@ class WalletSeedPage extends BasePage {
style: TextStyle( style: TextStyle(
fontSize: 20, fontSize: 20,
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
color: Theme.of(context) color: Theme.of(context).extension<CakeTextTheme>()!.titleColor),
.primaryTextTheme!
.titleLarge!
.color!),
), ),
Padding( Padding(
padding: padding:
@ -129,10 +127,7 @@ class WalletSeedPage extends BasePage {
style: TextStyle( style: TextStyle(
fontSize: 14, fontSize: 14,
fontWeight: FontWeight.normal, fontWeight: FontWeight.normal,
color: Theme.of(context) color: Theme.of(context).extension<CakeTextTheme>()!.secondaryTextColor),
.primaryTextTheme!
.bodySmall!
.color!),
), ),
) )
], ],

View file

@ -1,3 +1,4 @@
import 'package:cake_wallet/themes/extensions/cake_text_theme.dart';
import 'package:cake_wallet/themes/theme_base.dart'; import 'package:cake_wallet/themes/theme_base.dart';
import 'package:cake_wallet/src/widgets/seed_language_selector.dart'; import 'package:cake_wallet/src/widgets/seed_language_selector.dart';
import 'package:flutter_mobx/flutter_mobx.dart'; import 'package:flutter_mobx/flutter_mobx.dart';
@ -67,7 +68,7 @@ class SeedLanguageFormState extends State<SeedLanguageForm> {
fontSize: 16.0, fontSize: 16.0,
fontWeight: FontWeight.w500, fontWeight: FontWeight.w500,
color: color:
Theme.of(context).primaryTextTheme!.titleLarge!.color!), Theme.of(context).extension<CakeTextTheme>()!.titleColor),
), ),
), ),
Padding( Padding(

View file

@ -1,3 +1,4 @@
import 'package:cake_wallet/themes/extensions/cake_text_theme.dart';
import 'package:cake_wallet/src/widgets/cake_scrollbar.dart'; import 'package:cake_wallet/src/widgets/cake_scrollbar.dart';
import 'package:cake_wallet/src/widgets/section_divider.dart'; import 'package:cake_wallet/src/widgets/section_divider.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
@ -95,7 +96,7 @@ class ChooseYatAddressButtonsState extends State<ChooseYatAddressButtons> {
fontSize: 15, fontSize: 15,
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
fontFamily: 'Lato', fontFamily: 'Lato',
color: Theme.of(context).primaryTextTheme!.titleLarge!.color!, color: Theme.of(context).extension<CakeTextTheme>()!.titleColor,
decoration: TextDecoration.none, decoration: TextDecoration.none,
), ),
) )

View file

@ -1,3 +1,4 @@
import 'package:cake_wallet/themes/extensions/cake_text_theme.dart';
import 'package:cake_wallet/palette.dart'; import 'package:cake_wallet/palette.dart';
import 'package:cake_wallet/view_model/send/output.dart'; import 'package:cake_wallet/view_model/send/output.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
@ -205,8 +206,7 @@ class ConfirmSendingAlertContentState extends State<ConfirmSendingAlertContent>
fontSize: 16, fontSize: 16,
fontWeight: FontWeight.normal, fontWeight: FontWeight.normal,
fontFamily: 'Lato', fontFamily: 'Lato',
color: Theme.of(context).primaryTextTheme! color: Theme.of(context).extension<CakeTextTheme>()!.titleColor,
.titleLarge!.color!,
decoration: TextDecoration.none, decoration: TextDecoration.none,
), ),
), ),
@ -219,8 +219,7 @@ class ConfirmSendingAlertContentState extends State<ConfirmSendingAlertContent>
fontSize: 18, fontSize: 18,
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
fontFamily: 'Lato', fontFamily: 'Lato',
color: Theme.of(context).primaryTextTheme! color: Theme.of(context).extension<CakeTextTheme>()!.titleColor,
.titleLarge!.color!,
decoration: TextDecoration.none, decoration: TextDecoration.none,
), ),
), ),
@ -240,10 +239,7 @@ class ConfirmSendingAlertContentState extends State<ConfirmSendingAlertContent>
fontSize: 16, fontSize: 16,
fontWeight: FontWeight.normal, fontWeight: FontWeight.normal,
fontFamily: 'Lato', fontFamily: 'Lato',
color: Theme.of(context) color: Theme.of(context).extension<CakeTextTheme>()!.titleColor,
.primaryTextTheme!
.titleLarge!
.color!,
decoration: TextDecoration.none, decoration: TextDecoration.none,
), ),
), ),
@ -256,10 +252,7 @@ class ConfirmSendingAlertContentState extends State<ConfirmSendingAlertContent>
fontSize: 18, fontSize: 18,
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
fontFamily: 'Lato', fontFamily: 'Lato',
color: Theme.of(context) color: Theme.of(context).extension<CakeTextTheme>()!.titleColor,
.primaryTextTheme!
.titleLarge!
.color,
decoration: TextDecoration.none, decoration: TextDecoration.none,
), ),
), ),
@ -290,7 +283,7 @@ class ConfirmSendingAlertContentState extends State<ConfirmSendingAlertContent>
fontSize: 16, fontSize: 16,
fontWeight: FontWeight.normal, fontWeight: FontWeight.normal,
fontFamily: 'Lato', fontFamily: 'Lato',
color: Theme.of(context).primaryTextTheme!.titleLarge!.color!, color: Theme.of(context).extension<CakeTextTheme>()!.titleColor,
decoration: TextDecoration.none, decoration: TextDecoration.none,
), ),
), ),
@ -303,7 +296,7 @@ class ConfirmSendingAlertContentState extends State<ConfirmSendingAlertContent>
fontSize: 18, fontSize: 18,
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
fontFamily: 'Lato', fontFamily: 'Lato',
color: Theme.of(context).primaryTextTheme!.titleLarge!.color!, color: Theme.of(context).extension<CakeTextTheme>()!.titleColor,
decoration: TextDecoration.none, decoration: TextDecoration.none,
), ),
), ),
@ -332,10 +325,7 @@ class ConfirmSendingAlertContentState extends State<ConfirmSendingAlertContent>
fontSize: 16, fontSize: 16,
fontWeight: FontWeight.normal, fontWeight: FontWeight.normal,
fontFamily: 'Lato', fontFamily: 'Lato',
color: Theme.of(context) color: Theme.of(context).extension<CakeTextTheme>()!.titleColor,
.primaryTextTheme!
.titleLarge!
.color!,
decoration: TextDecoration.none, decoration: TextDecoration.none,
), ),
), ),

View file

@ -1,3 +1,4 @@
import 'package:cake_wallet/themes/extensions/cake_text_theme.dart';
import 'package:cake_wallet/view_model/settings/choices_list_item.dart'; import 'package:cake_wallet/view_model/settings/choices_list_item.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:cake_wallet/themes/extensions/address_theme.dart'; import 'package:cake_wallet/themes/extensions/address_theme.dart';
@ -23,7 +24,7 @@ class SettingsChoicesCell extends StatelessWidget {
style: TextStyle( style: TextStyle(
fontSize: 14, fontSize: 14,
fontWeight: FontWeight.normal, fontWeight: FontWeight.normal,
color: Theme.of(context).primaryTextTheme!.titleLarge!.color!, color: Theme.of(context).extension<CakeTextTheme>()!.titleColor,
), ),
), ),
], ],
@ -58,10 +59,7 @@ class SettingsChoicesCell extends StatelessWidget {
style: TextStyle( style: TextStyle(
color: isSelected color: isSelected
? Colors.white ? Colors.white
: Theme.of(context) : Theme.of(context).extension<CakeTextTheme>()!.secondaryTextColor,
.primaryTextTheme!
.bodySmall!
.color!,
fontWeight: isSelected ? FontWeight.w700 : FontWeight.normal, fontWeight: isSelected ? FontWeight.w700 : FontWeight.normal,
), ),
), ),

View file

@ -1,3 +1,4 @@
import 'package:cake_wallet/themes/extensions/cake_text_theme.dart';
import 'package:cake_wallet/src/widgets/alert_close_button.dart'; import 'package:cake_wallet/src/widgets/alert_close_button.dart';
import 'package:cake_wallet/src/widgets/primary_button.dart'; import 'package:cake_wallet/src/widgets/primary_button.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
@ -30,7 +31,7 @@ class PopUpCancellableAlertDialog extends StatelessWidget {
fontSize: 16, fontSize: 16,
fontWeight: FontWeight.normal, fontWeight: FontWeight.normal,
fontFamily: 'Lato', fontFamily: 'Lato',
color: Theme.of(context).primaryTextTheme.titleLarge!.color!, color: Theme.of(context).extension<CakeTextTheme>()!.titleColor,
decoration: TextDecoration.none, decoration: TextDecoration.none,
), ),
); );

View file

@ -1,3 +1,4 @@
import 'package:cake_wallet/themes/extensions/cake_text_theme.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:cake_wallet/generated/i18n.dart'; import 'package:cake_wallet/generated/i18n.dart';
import 'package:cake_wallet/themes/extensions/transaction_trade_theme.dart'; import 'package:cake_wallet/themes/extensions/transaction_trade_theme.dart';
@ -47,7 +48,7 @@ class TextFieldListRow extends StatelessWidget {
fontSize: valueFontSize, fontSize: valueFontSize,
fontWeight: FontWeight.w500, fontWeight: FontWeight.w500,
color: color:
Theme.of(context).primaryTextTheme!.titleLarge!.color!), Theme.of(context).extension<CakeTextTheme>()!.titleColor),
decoration: InputDecoration( decoration: InputDecoration(
isDense: true, isDense: true,
contentPadding: EdgeInsets.only(top: 12, bottom: 0), contentPadding: EdgeInsets.only(top: 12, bottom: 0),

View file

@ -18,7 +18,7 @@ class UnspentCoinsListPage extends BasePage {
//@override //@override
//Widget trailing(BuildContext context) { //Widget trailing(BuildContext context) {
// final questionImage = Image.asset('assets/images/question_mark.png', // final questionImage = Image.asset('assets/images/question_mark.png',
// color: Theme.of(context).primaryTextTheme!.titleLarge!.color!); // color: Theme.of(context).extension<CakeTextTheme>()!.titleColor);
// return SizedBox( // return SizedBox(
// height: 20.0, // height: 20.0,

View file

@ -1,3 +1,4 @@
import 'package:cake_wallet/themes/extensions/cake_text_theme.dart';
import 'package:cake_wallet/core/auth_service.dart'; import 'package:cake_wallet/core/auth_service.dart';
import 'package:cake_wallet/src/widgets/alert_with_two_actions.dart'; import 'package:cake_wallet/src/widgets/alert_with_two_actions.dart';
import 'package:cake_wallet/utils/responsive_layout_util.dart'; import 'package:cake_wallet/utils/responsive_layout_util.dart';
@ -58,7 +59,7 @@ class WalletListBodyState extends State<WalletListBody> {
final newWalletImage = final newWalletImage =
Image.asset('assets/images/new_wallet.png', height: 12, width: 12, color: Colors.white); Image.asset('assets/images/new_wallet.png', height: 12, width: 12, color: Colors.white);
final restoreWalletImage = Image.asset('assets/images/restore_wallet.png', final restoreWalletImage = Image.asset('assets/images/restore_wallet.png',
height: 12, width: 12, color: Theme.of(context).primaryTextTheme!.titleLarge!.color!); height: 12, width: 12, color: Theme.of(context).extension<CakeTextTheme>()!.titleColor);
return Container( return Container(
padding: EdgeInsets.only(top: 16), padding: EdgeInsets.only(top: 16),
@ -135,10 +136,7 @@ class WalletListBodyState extends State<WalletListBody> {
style: TextStyle( style: TextStyle(
fontSize: 22, fontSize: 22,
fontWeight: FontWeight.w500, fontWeight: FontWeight.w500,
color: Theme.of(context) color: Theme.of(context).extension<CakeTextTheme>()!.titleColor),
.primaryTextTheme
.titleLarge!
.color!),
) )
], ],
), ),
@ -183,7 +181,7 @@ class WalletListBodyState extends State<WalletListBody> {
image: restoreWalletImage, image: restoreWalletImage,
text: S.of(context).wallet_list_restore_wallet, text: S.of(context).wallet_list_restore_wallet,
color: Theme.of(context).cardColor, color: Theme.of(context).cardColor,
textColor: Theme.of(context).primaryTextTheme!.titleLarge!.color!) textColor: Theme.of(context).extension<CakeTextTheme>()!.titleColor)
])), ])),
); );
} }

View file

@ -1,3 +1,4 @@
import 'package:cake_wallet/themes/extensions/cake_text_theme.dart';
import 'package:cake_wallet/themes/theme_base.dart'; import 'package:cake_wallet/themes/theme_base.dart';
import 'package:cake_wallet/utils/responsive_layout_util.dart'; import 'package:cake_wallet/utils/responsive_layout_util.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
@ -57,7 +58,7 @@ class WelcomePage extends BasePage {
final restoreWalletImage = Image.asset('assets/images/restore_wallet.png', final restoreWalletImage = Image.asset('assets/images/restore_wallet.png',
height: 12, height: 12,
width: 12, width: 12,
color: Theme.of(context).primaryTextTheme!.titleLarge!.color!); color: Theme.of(context).extension<CakeTextTheme>()!.titleColor);
return WillPopScope( return WillPopScope(
onWillPop: () async => false, onWillPop: () async => false,
@ -101,10 +102,7 @@ class WelcomePage extends BasePage {
style: TextStyle( style: TextStyle(
fontSize: 36, fontSize: 36,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
color: Theme.of(context) color: Theme.of(context).extension<CakeTextTheme>()!.titleColor,
.primaryTextTheme!
.titleLarge!
.color!,
), ),
textAlign: TextAlign.center, textAlign: TextAlign.center,
), ),
@ -155,10 +153,7 @@ class WelcomePage extends BasePage {
image: restoreWalletImage, image: restoreWalletImage,
text: S.of(context).restore_wallet, text: S.of(context).restore_wallet,
color: Theme.of(context).cardColor, color: Theme.of(context).cardColor,
textColor: Theme.of(context) textColor: Theme.of(context).extension<CakeTextTheme>()!.titleColor),
.primaryTextTheme!
.titleLarge!
.color!),
) )
], ],
) )

View file

@ -1,4 +1,5 @@
import 'package:cake_wallet/themes/extensions/cake_text_theme.dart';
import 'package:cake_wallet/utils/device_info.dart'; import 'package:cake_wallet/utils/device_info.dart';
import 'package:cake_wallet/utils/responsive_layout_util.dart'; import 'package:cake_wallet/utils/responsive_layout_util.dart';
import 'package:flutter/services.dart'; import 'package:flutter/services.dart';
@ -69,7 +70,7 @@ class AddressTextField extends StatelessWidget {
style: textStyle ?? style: textStyle ??
TextStyle( TextStyle(
fontSize: 16, fontSize: 16,
color: Theme.of(context).primaryTextTheme!.titleLarge!.color!), color: Theme.of(context).extension<CakeTextTheme>()!.titleColor),
decoration: InputDecoration( decoration: InputDecoration(
suffixIcon: SizedBox( suffixIcon: SizedBox(
width: prefixIconWidth * options.length + width: prefixIconWidth * options.length +

View file

@ -1,3 +1,4 @@
import 'package:cake_wallet/themes/extensions/cake_text_theme.dart';
import 'dart:ui'; import 'dart:ui';
import 'package:cake_wallet/src/widgets/section_divider.dart'; import 'package:cake_wallet/src/widgets/section_divider.dart';
import 'package:cake_wallet/themes/extensions/alert_theme.dart'; import 'package:cake_wallet/themes/extensions/alert_theme.dart';
@ -26,7 +27,7 @@ class BaseAlertDialog extends StatelessWidget {
fontSize: 20, fontSize: 20,
fontFamily: 'Lato', fontFamily: 'Lato',
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
color: Theme.of(context).primaryTextTheme!.titleLarge!.color!, color: Theme.of(context).extension<CakeTextTheme>()!.titleColor,
decoration: TextDecoration.none, decoration: TextDecoration.none,
), ),
); );
@ -40,7 +41,7 @@ class BaseAlertDialog extends StatelessWidget {
fontSize: 16, fontSize: 16,
fontWeight: FontWeight.normal, fontWeight: FontWeight.normal,
fontFamily: 'Lato', fontFamily: 'Lato',
color: Theme.of(context).primaryTextTheme!.titleLarge!.color!, color: Theme.of(context).extension<CakeTextTheme>()!.titleColor,
decoration: TextDecoration.none, decoration: TextDecoration.none,
), ),
); );

View file

@ -1,3 +1,4 @@
import 'package:cake_wallet/themes/extensions/cake_text_theme.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter/services.dart'; import 'package:flutter/services.dart';
@ -78,7 +79,7 @@ class BaseTextFormField extends StatelessWidget {
TextStyle( TextStyle(
fontSize: 16.0, fontSize: 16.0,
color: textColor ?? color: textColor ??
Theme.of(context).primaryTextTheme!.titleLarge!.color!), Theme.of(context).extension<CakeTextTheme>()!.titleColor),
decoration: InputDecoration( decoration: InputDecoration(
prefix: prefix, prefix: prefix,
prefixIcon: prefixIcon, prefixIcon: prefixIcon,
@ -92,26 +93,17 @@ class BaseTextFormField extends StatelessWidget {
focusedBorder: UnderlineInputBorder( focusedBorder: UnderlineInputBorder(
borderSide: BorderSide( borderSide: BorderSide(
color: borderColor ?? color: borderColor ??
Theme.of(context) Theme.of(context).extension<CakeTextTheme>()!.textfieldUnderlineColor,
.primaryTextTheme!
.titleLarge!
.backgroundColor!,
width: borderWidth)), width: borderWidth)),
disabledBorder: UnderlineInputBorder( disabledBorder: UnderlineInputBorder(
borderSide: BorderSide( borderSide: BorderSide(
color: borderColor ?? color: borderColor ??
Theme.of(context) Theme.of(context).extension<CakeTextTheme>()!.textfieldUnderlineColor,
.primaryTextTheme!
.titleLarge!
.backgroundColor!,
width: borderWidth)), width: borderWidth)),
enabledBorder: UnderlineInputBorder( enabledBorder: UnderlineInputBorder(
borderSide: BorderSide( borderSide: BorderSide(
color: borderColor ?? color: borderColor ??
Theme.of(context) Theme.of(context).extension<CakeTextTheme>()!.textfieldUnderlineColor,
.primaryTextTheme!
.titleLarge!
.backgroundColor!,
width: borderWidth))), width: borderWidth))),
validator: validator, validator: validator,
); );

View file

@ -1,3 +1,4 @@
import 'package:cake_wallet/themes/extensions/cake_text_theme.dart';
import 'package:cake_wallet/utils/date_picker.dart'; import 'package:cake_wallet/utils/date_picker.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:intl/intl.dart'; import 'package:intl/intl.dart';
@ -81,7 +82,7 @@ class BlockchainHeightState extends State<BlockchainHeightWidget> {
fontSize: 16.0, fontSize: 16.0,
fontWeight: FontWeight.w500, fontWeight: FontWeight.w500,
color: color:
Theme.of(context).primaryTextTheme!.titleLarge!.color!), Theme.of(context).extension<CakeTextTheme>()!.titleColor),
), ),
), ),
Row( Row(

View file

@ -1,3 +1,4 @@
import 'package:cake_wallet/themes/extensions/cake_text_theme.dart';
import 'package:cake_wallet/palette.dart'; import 'package:cake_wallet/palette.dart';
import 'package:cake_wallet/utils/responsive_layout_util.dart'; import 'package:cake_wallet/utils/responsive_layout_util.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
@ -132,7 +133,7 @@ class CheckBoxPickerState extends State<CheckBoxPicker> {
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
color: item.isDisabled color: item.isDisabled
? Colors.grey.withOpacity(0.5) ? Colors.grey.withOpacity(0.5)
: Theme.of(context).primaryTextTheme!.titleLarge!.color!, : Theme.of(context).extension<CakeTextTheme>()!.titleColor,
decoration: TextDecoration.none, decoration: TextDecoration.none,
), ),
), ),

View file

@ -1,3 +1,4 @@
import 'package:cake_wallet/themes/extensions/cake_text_theme.dart';
import 'dart:ui'; import 'dart:ui';
import 'package:cake_wallet/palette.dart'; import 'package:cake_wallet/palette.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
@ -65,7 +66,7 @@ class CheckboxWidgetState extends State<CheckboxWidget> {
child: Text( child: Text(
caption, caption,
style: TextStyle( style: TextStyle(
color: Theme.of(context).primaryTextTheme!.titleLarge!.color!, color: Theme.of(context).extension<CakeTextTheme>()!.titleColor,
fontSize: 18, fontSize: 18,
fontFamily: 'Lato', fontFamily: 'Lato',
fontWeight: FontWeight.w500, fontWeight: FontWeight.w500,
@ -77,4 +78,4 @@ class CheckboxWidgetState extends State<CheckboxWidget> {
), ),
); );
} }
} }

View file

@ -1,3 +1,4 @@
import 'package:cake_wallet/themes/extensions/cake_text_theme.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:cake_wallet/themes/extensions/transaction_trade_theme.dart'; import 'package:cake_wallet/themes/extensions/transaction_trade_theme.dart';
@ -45,10 +46,7 @@ class ListRow extends StatelessWidget {
style: TextStyle( style: TextStyle(
fontSize: valueFontSize, fontSize: valueFontSize,
fontWeight: FontWeight.w500, fontWeight: FontWeight.w500,
color: Theme.of(context) color: Theme.of(context).extension<CakeTextTheme>()!.titleColor)),
.primaryTextTheme!
.titleLarge!
.color!)),
), ),
image != null image != null
? Padding( ? Padding(

View file

@ -1,5 +1,6 @@
// ignore_for_file: deprecated_member_use // ignore_for_file: deprecated_member_use
import 'package:cake_wallet/themes/extensions/cake_text_theme.dart';
import 'package:cake_wallet/themes/extensions/cake_scrollbar_theme.dart'; import 'package:cake_wallet/themes/extensions/cake_scrollbar_theme.dart';
import 'package:cake_wallet/utils/responsive_layout_util.dart'; import 'package:cake_wallet/utils/responsive_layout_util.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
@ -161,10 +162,7 @@ class _PickerState<Item> extends State<Picker<Item>> {
child: TextFormField( child: TextFormField(
controller: searchController, controller: searchController,
style: TextStyle( style: TextStyle(
color: Theme.of(context) color: Theme.of(context).extension<CakeTextTheme>()!.titleColor),
.primaryTextTheme!
.titleLarge!
.color!),
decoration: InputDecoration( decoration: InputDecoration(
hintText: widget.hintText, hintText: widget.hintText,
prefixIcon: prefixIcon:
@ -216,10 +214,7 @@ class _PickerState<Item> extends State<Picker<Item>> {
fontWeight: FontWeight.w500, fontWeight: FontWeight.w500,
fontFamily: 'Lato', fontFamily: 'Lato',
decoration: TextDecoration.none, decoration: TextDecoration.none,
color: Theme.of(context) color: Theme.of(context).extension<CakeTextTheme>()!.titleColor,
.primaryTextTheme!
.titleLarge!
.color!,
), ),
), ),
) )
@ -311,10 +306,7 @@ class _PickerState<Item> extends State<Picker<Item>> {
fontSize: 14, fontSize: 14,
fontFamily: 'Lato', fontFamily: 'Lato',
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
color: Theme.of(context) color: Theme.of(context).extension<CakeTextTheme>()!.titleColor,
.primaryTextTheme!
.titleLarge!
.color!,
decoration: TextDecoration.none, decoration: TextDecoration.none,
), ),
), ),
@ -392,10 +384,7 @@ class _PickerState<Item> extends State<Picker<Item>> {
fontSize: 16, fontSize: 16,
fontFamily: 'Lato', fontFamily: 'Lato',
fontWeight: FontWeight.w700, fontWeight: FontWeight.w700,
color: Theme.of(context) color: Theme.of(context).extension<CakeTextTheme>()!.titleColor,
.primaryTextTheme!
.titleLarge!
.color!,
decoration: TextDecoration.none, decoration: TextDecoration.none,
), ),
), ),

View file

@ -1,3 +1,4 @@
import 'package:cake_wallet/themes/extensions/cake_text_theme.dart';
import 'package:cw_core/wallet_type.dart'; import 'package:cw_core/wallet_type.dart';
import 'package:cake_wallet/src/widgets/validable_annotated_editable_text.dart'; import 'package:cake_wallet/src/widgets/validable_annotated_editable_text.dart';
import 'package:cake_wallet/src/widgets/blockchain_height_widget.dart'; import 'package:cake_wallet/src/widgets/blockchain_height_widget.dart';
@ -90,10 +91,7 @@ class SeedWidgetState extends State<SeedWidget> {
cursorColor: Colors.blue, cursorColor: Colors.blue,
backgroundCursorColor: Colors.blue, backgroundCursorColor: Colors.blue,
validStyle: TextStyle( validStyle: TextStyle(
color: Theme.of(context) color: Theme.of(context).extension<CakeTextTheme>()!.titleColor,
.primaryTextTheme!
.titleLarge!
.color!,
backgroundColor: Colors.transparent, backgroundColor: Colors.transparent,
fontWeight: FontWeight.normal, fontWeight: FontWeight.normal,
fontSize: 16), fontSize: 16),
@ -106,10 +104,7 @@ class SeedWidgetState extends State<SeedWidget> {
controller: controller, controller: controller,
words: words, words: words,
textStyle: TextStyle( textStyle: TextStyle(
color: Theme.of(context) color: Theme.of(context).extension<CakeTextTheme>()!.titleColor,
.primaryTextTheme!
.titleLarge!
.color!,
backgroundColor: Colors.transparent, backgroundColor: Colors.transparent,
fontWeight: FontWeight.normal, fontWeight: FontWeight.normal,
fontSize: 16), fontSize: 16),
@ -135,10 +130,7 @@ class SeedWidgetState extends State<SeedWidget> {
Container( Container(
margin: EdgeInsets.only(top: 15), margin: EdgeInsets.only(top: 15),
height: 1.0, height: 1.0,
color: Theme.of(context) color: Theme.of(context).extension<CakeTextTheme>()!.textfieldUnderlineColor),
.primaryTextTheme!
.titleLarge!
.backgroundColor!),
])); ]));
} }

View file

@ -1,3 +1,4 @@
import 'package:cake_wallet/themes/extensions/cake_text_theme.dart';
import 'dart:ui'; import 'dart:ui';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
@ -27,7 +28,7 @@ class StandardCheckbox extends StatelessWidget {
], begin: Alignment.centerLeft, end: Alignment.centerRight); ], begin: Alignment.centerLeft, end: Alignment.centerRight);
final boxBorder = Border.all( final boxBorder = Border.all(
color: borderColor ?? Theme.of(context).primaryTextTheme!.bodySmall!.color!, width: 1.0); color: borderColor ?? Theme.of(context).extension<CakeTextTheme>()!.secondaryTextColor, width: 1.0);
final checkedBoxDecoration = BoxDecoration( final checkedBoxDecoration = BoxDecoration(
gradient: gradientBackground ? baseGradient : null, gradient: gradientBackground ? baseGradient : null,
@ -61,7 +62,7 @@ class StandardCheckbox extends StatelessWidget {
child: Text( child: Text(
caption, caption,
style: TextStyle( style: TextStyle(
fontSize: 16.0, color: Theme.of(context).primaryTextTheme!.titleLarge!.color!), fontSize: 16.0, color: Theme.of(context).extension<CakeTextTheme>()!.titleColor),
)) ))
], ],
), ),

View file

@ -1,3 +1,4 @@
import 'package:cake_wallet/themes/extensions/cake_text_theme.dart';
import 'package:cake_wallet/palette.dart'; import 'package:cake_wallet/palette.dart';
import 'package:cake_wallet/src/widgets/standard_list_card.dart'; import 'package:cake_wallet/src/widgets/standard_list_card.dart';
import 'package:cake_wallet/src/widgets/standard_list_status_row.dart'; import 'package:cake_wallet/src/widgets/standard_list_status_row.dart';
@ -54,7 +55,7 @@ class StandardListRow extends StatelessWidget {
Color titleColor(BuildContext context) => isSelected Color titleColor(BuildContext context) => isSelected
? Palette.blueCraiola ? Palette.blueCraiola
: Theme.of(context).primaryTextTheme.titleLarge!.color!; : Theme.of(context).extension<CakeTextTheme>()!.titleColor;
} }
class SectionHeaderListRow extends StatelessWidget { class SectionHeaderListRow extends StatelessWidget {

View file

@ -1,3 +1,4 @@
import 'package:cake_wallet/themes/extensions/cake_text_theme.dart';
import 'package:cake_wallet/palette.dart'; import 'package:cake_wallet/palette.dart';
import 'package:cake_wallet/src/screens/dashboard/widgets/sync_indicator_icon.dart'; import 'package:cake_wallet/src/screens/dashboard/widgets/sync_indicator_icon.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
@ -52,10 +53,7 @@ class StandardListStatusRow extends StatelessWidget {
style: TextStyle( style: TextStyle(
fontSize: 16, fontSize: 16,
fontWeight: FontWeight.w500, fontWeight: FontWeight.w500,
color: Theme.of(context) color: Theme.of(context).extension<CakeTextTheme>()!.titleColor))
.primaryTextTheme!
.titleLarge!
.color!))
], ],
), ),
), ),

View file

@ -1,3 +1,4 @@
import 'package:cake_wallet/themes/extensions/cake_text_theme.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:cake_wallet/palette.dart'; import 'package:cake_wallet/palette.dart';
import 'package:cake_wallet/themes/extensions/send_page_theme.dart'; import 'package:cake_wallet/themes/extensions/send_page_theme.dart';
@ -48,7 +49,7 @@ class TemplateTileState extends State<TemplateTile> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
final color = isRemovable ? Colors.white : Theme.of(context).primaryTextTheme!.titleLarge!.color!; final color = isRemovable ? Colors.white : Theme.of(context).extension<CakeTextTheme>()!.titleColor;
final toIcon = Image.asset('assets/images/to_icon.png', color: color); final toIcon = Image.asset('assets/images/to_icon.png', color: color);
final content = Row( final content = Row(
@ -151,4 +152,4 @@ class TemplateTileState extends State<TemplateTile> {
return isRemovable ? removableTile : tile; return isRemovable ? removableTile : tile;
} }
} }

View file

@ -146,14 +146,5 @@ class BrightTheme extends LightTheme {
Colors.white // background of tiles (account list) Colors.white // background of tiles (account list)
), ),
), ),
primaryTextTheme: TextTheme(
titleLarge: TextStyle(
color: Palette.darkBlueCraiola, // title color
backgroundColor: Palette.wildPeriwinkle // textfield underline
),
bodySmall: TextStyle(
color: PaletteDark.pigeonBlue, // secondary text
),
),
); );
} }

View file

@ -2,6 +2,7 @@ import 'package:cake_wallet/themes/extensions/address_theme.dart';
import 'package:cake_wallet/themes/extensions/alert_theme.dart'; import 'package:cake_wallet/themes/extensions/alert_theme.dart';
import 'package:cake_wallet/themes/extensions/balance_page_theme.dart'; import 'package:cake_wallet/themes/extensions/balance_page_theme.dart';
import 'package:cake_wallet/themes/extensions/cake_scrollbar_theme.dart'; import 'package:cake_wallet/themes/extensions/cake_scrollbar_theme.dart';
import 'package:cake_wallet/themes/extensions/cake_text_theme.dart';
import 'package:cake_wallet/themes/extensions/dashboard_page_theme.dart'; import 'package:cake_wallet/themes/extensions/dashboard_page_theme.dart';
import 'package:cake_wallet/themes/extensions/exchange_page_theme.dart'; import 'package:cake_wallet/themes/extensions/exchange_page_theme.dart';
import 'package:cake_wallet/themes/extensions/filter_theme.dart'; import 'package:cake_wallet/themes/extensions/filter_theme.dart';
@ -166,6 +167,12 @@ class DarkTheme extends ThemeBase {
detailsTitlesColor: PaletteDark.lightBlueGrey, detailsTitlesColor: PaletteDark.lightBlueGrey,
rowsColor: PaletteDark.wildNightBlue); rowsColor: PaletteDark.wildNightBlue);
@override
CakeTextTheme get cakeTextTheme => CakeTextTheme(
secondaryTextColor: PaletteDark.darkCyanBlue,
textfieldUnderlineColor: PaletteDark.darkOceanBlue,
titleColor: Colors.white);
@override @override
ThemeData get themeData => super.themeData.copyWith( ThemeData get themeData => super.themeData.copyWith(
indicatorColor: PaletteDark.cyanBlue, // page indicator indicatorColor: PaletteDark.cyanBlue, // page indicator
@ -216,15 +223,5 @@ class DarkTheme extends ThemeBase {
.darkOceanBlue // background of tiles (account list) .darkOceanBlue // background of tiles (account list)
), ),
), ),
primaryTextTheme: TextTheme(
// title -> titleLarge
titleLarge: TextStyle(
color: Colors.white, // title color
backgroundColor: PaletteDark.darkOceanBlue // textfield underline
),
bodySmall: TextStyle(
color: PaletteDark.darkCyanBlue, // secondary text
),
),
); );
} }

View file

@ -0,0 +1,37 @@
import 'package:flutter/material.dart';
class CakeTextTheme extends ThemeExtension<CakeTextTheme> {
final Color secondaryTextColor;
final Color textfieldUnderlineColor;
final Color titleColor;
CakeTextTheme(
{required this.secondaryTextColor,
required this.textfieldUnderlineColor,
required this.titleColor});
@override
CakeTextTheme copyWith(
{Color? secondaryTextColor,
Color? textfieldUnderlineColor,
Color? titleColor}) =>
CakeTextTheme(
secondaryTextColor: secondaryTextColor ?? this.secondaryTextColor,
textfieldUnderlineColor:
textfieldUnderlineColor ?? this.textfieldUnderlineColor,
titleColor: titleColor ?? this.titleColor);
@override
CakeTextTheme lerp(ThemeExtension<CakeTextTheme>? other, double t) {
if (other is! CakeTextTheme) {
return this;
}
return CakeTextTheme(
secondaryTextColor:
Color.lerp(secondaryTextColor, other.secondaryTextColor, t)!,
textfieldUnderlineColor: Color.lerp(
textfieldUnderlineColor, other.textfieldUnderlineColor, t)!,
titleColor: Color.lerp(titleColor, other.titleColor, t)!);
}
}

View file

@ -2,6 +2,7 @@ import 'package:cake_wallet/themes/extensions/address_theme.dart';
import 'package:cake_wallet/themes/extensions/alert_theme.dart'; import 'package:cake_wallet/themes/extensions/alert_theme.dart';
import 'package:cake_wallet/themes/extensions/balance_page_theme.dart'; import 'package:cake_wallet/themes/extensions/balance_page_theme.dart';
import 'package:cake_wallet/themes/extensions/cake_scrollbar_theme.dart'; import 'package:cake_wallet/themes/extensions/cake_scrollbar_theme.dart';
import 'package:cake_wallet/themes/extensions/cake_text_theme.dart';
import 'package:cake_wallet/themes/extensions/dashboard_page_theme.dart'; import 'package:cake_wallet/themes/extensions/dashboard_page_theme.dart';
import 'package:cake_wallet/themes/extensions/exchange_page_theme.dart'; import 'package:cake_wallet/themes/extensions/exchange_page_theme.dart';
import 'package:cake_wallet/themes/extensions/filter_theme.dart'; import 'package:cake_wallet/themes/extensions/filter_theme.dart';
@ -168,6 +169,12 @@ class LightTheme extends ThemeBase {
detailsTitlesColor: Palette.darkGray, detailsTitlesColor: Palette.darkGray,
rowsColor: Palette.blueAlice); rowsColor: Palette.blueAlice);
@override
CakeTextTheme get cakeTextTheme => CakeTextTheme(
secondaryTextColor: PaletteDark.pigeonBlue,
textfieldUnderlineColor: Palette.wildPeriwinkle,
titleColor: Palette.darkBlueCraiola);
@override @override
ThemeData get themeData => super.themeData.copyWith( ThemeData get themeData => super.themeData.copyWith(
indicatorColor: indicatorColor:
@ -220,15 +227,5 @@ class LightTheme extends ThemeBase {
Colors.white // background of tiles (account list) Colors.white // background of tiles (account list)
), ),
), ),
primaryTextTheme: TextTheme(
// title -> titleLarge
titleLarge: TextStyle(
color: Palette.darkBlueCraiola, // title color
backgroundColor: Palette.wildPeriwinkle // textfield underline
),
bodySmall: TextStyle(
color: PaletteDark.pigeonBlue, // secondary text
),
),
); );
} }

View file

@ -2,6 +2,7 @@ import 'package:cake_wallet/themes/extensions/address_theme.dart';
import 'package:cake_wallet/themes/extensions/alert_theme.dart'; import 'package:cake_wallet/themes/extensions/alert_theme.dart';
import 'package:cake_wallet/themes/extensions/balance_page_theme.dart'; import 'package:cake_wallet/themes/extensions/balance_page_theme.dart';
import 'package:cake_wallet/themes/extensions/cake_scrollbar_theme.dart'; import 'package:cake_wallet/themes/extensions/cake_scrollbar_theme.dart';
import 'package:cake_wallet/themes/extensions/cake_text_theme.dart';
import 'package:cake_wallet/themes/extensions/dashboard_page_theme.dart'; import 'package:cake_wallet/themes/extensions/dashboard_page_theme.dart';
import 'package:cake_wallet/themes/extensions/exchange_page_theme.dart'; import 'package:cake_wallet/themes/extensions/exchange_page_theme.dart';
import 'package:cake_wallet/themes/extensions/filter_theme.dart'; import 'package:cake_wallet/themes/extensions/filter_theme.dart';
@ -97,6 +98,8 @@ abstract class ThemeBase {
TransactionTradeTheme get transactionTradeTheme; TransactionTradeTheme get transactionTradeTheme;
CakeTextTheme get cakeTextTheme;
ThemeData get themeData => generatedThemeData.copyWith( ThemeData get themeData => generatedThemeData.copyWith(
primaryColor: primaryColor, primaryColor: primaryColor,
cardColor: containerColor, cardColor: containerColor,
@ -123,6 +126,7 @@ abstract class ThemeBase {
seedWidgetTheme, seedWidgetTheme,
placeholderTheme, placeholderTheme,
transactionTradeTheme, transactionTradeTheme,
cakeTextTheme,
], ],
scrollbarTheme: ScrollbarThemeData( scrollbarTheme: ScrollbarThemeData(
thumbColor: MaterialStateProperty.all(scrollbarTheme.thumbColor), thumbColor: MaterialStateProperty.all(scrollbarTheme.thumbColor),