Cw 396 additional themes (#962)

* fix: SectionStandardList using BuildContext as param

* refactor: deprecated backgroundColor -> colorScheme.background

* refactor: themeBase and current themes

* refactor: accentTextTheme.titleLarge.color -> dialogTheme.backgroundColor

* refactor: gradient background

* refactor: text themes using the same color as primaryColor

* refactor: accentTextTheme.bodySmall.color -> cardColor

* refactor: text themes using same dialogBackgroundColor

* refactor: scrollbarTheme

* refactor: create SyncIndicatorTheme

* refactor: SectionDivider

* refactor: base_page improvements and simplify

* refactor: collapsible_standart_list improvements

* refactor: accentTextTheme.bodyLarge.backgroundColor -> KeyboardTheme.keyboardBarColor

* refactor: create PinCodeTheme for accentTextTheme.bodyMedium

* refactor: create SupportPageTheme for accentTextTheme.displayLarge.backgroundColor and fix cases that use it

* refactor: accentTextTheme.displayLarge.color -> disabledColor

* refactor: create ExchangePageTheme

* refactor: create DashboardPageTheme and use textColor

* refactor: create NewWalletTheme for accentTextTheme.displayMedium

* refactor: create BalancePageTheme for accentTextTheme.displaySmall.backgroundColor

* refactor: create AddressTheme for accentTextTheme.displaySmall.color

* refactor: create IndicatorDotTheme

* refactor: create CakeMenuTheme

* refactor: create FilterTheme

* refactor: create WalletListTheme

* refactor: accentTextTheme.bodySmall.decorationColor -> InfoTheme.textColor

* refactor: accentTextTheme.titleLarge.backgroundColor -> PickerTheme.dividerColor

* refactor: primaryTextTheme.bodyLarge.backgroundColor -> AlertTheme.leftButtonTextColor

* refactor: primaryTextTheme.displayLarge.backgroundColor -> OrderTheme.iconColor

* refactor: create SendPageTheme

* fix: missing migrated styles

* refactor: primaryTextTheme.labelSmall.decorationColor -> PlaceholderTheme.color

* refactor: create TransactionTradeTheme

* refactor: create CakeTextTheme

* refactor: create AccountListTheme

* refactor: create ReceivePageTheme

* refactor: create QRCodeTheme

* refactor: move remaining items to CakeTextTheme and some missing fixes

* feat(display_settings): add new theme selector

* feat: additional themes

* fix: conflict error

* fix(lag): move colorScheme initialization to constructor

* feat: add backdropColor to alert and picker backdrop filters

* fix: merge fixes

* fix: send template page missing new colors

* fix: anonpay pages title and icon colors

* fix: merge fixes

* fix: unspent coins page

* fix: also fix exchange template

* fix: missing checkbox

* fix: fixes for high contrast theme

* Merge branch 'main' into CW-396-additional-themes

* fix: merge fixes

* fix: .gitignore and rm added files

* Fix review comments

---------

Co-authored-by: OmarHatem <omarh.ismail1@gmail.com>
This commit is contained in:
Rafael Saes 2023-08-17 12:28:31 -03:00 committed by GitHub
parent 5ec930cbc6
commit 09c942564e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
229 changed files with 4089 additions and 2869 deletions

2
.gitignore vendored
View file

@ -143,4 +143,4 @@ assets/images/app_logo.png
macos/Runner/Info.plist macos/Runner/Info.plist
macos/Runner/DebugProfile.entitlements macos/Runner/DebugProfile.entitlements
macos/Runner/Release.entitlements macos/Runner/Release.entitlements

View file

@ -746,5 +746,5 @@ packages:
source: hosted source: hosted
version: "3.1.1" version: "3.1.1"
sdks: sdks:
dart: ">=2.19.0 <4.0.0" dart: ">=2.19.0 <3.0.0"
flutter: ">=3.0.0" flutter: ">=3.0.0"

View file

@ -665,5 +665,5 @@ packages:
source: hosted source: hosted
version: "3.1.1" version: "3.1.1"
sdks: sdks:
dart: ">=2.19.0 <4.0.0" dart: ">=2.19.0 <3.0.0"
flutter: ">=3.0.0" flutter: ">=3.0.0"

View file

@ -399,5 +399,5 @@ packages:
source: hosted source: hosted
version: "0.2.0+3" version: "0.2.0+3"
sdks: sdks:
dart: ">=2.18.1 <4.0.0" dart: ">=2.18.1 <3.0.0"
flutter: ">=3.0.0" flutter: ">=3.0.0"

View file

@ -672,5 +672,5 @@ packages:
source: hosted source: hosted
version: "3.1.1" version: "3.1.1"
sdks: sdks:
dart: ">=2.19.0 <4.0.0" dart: ">=2.19.0 <3.0.0"
flutter: ">=3.0.0" flutter: ">=3.0.0"

View file

@ -15,6 +15,9 @@ class Palette {
static const Color nightBlue = Color.fromRGBO(46, 57, 96, 1.0); static const Color nightBlue = Color.fromRGBO(46, 57, 96, 1.0);
static const Color moderateOrangeYellow = Color.fromRGBO(245, 134, 82, 1.0); static const Color moderateOrangeYellow = Color.fromRGBO(245, 134, 82, 1.0);
static const Color moderateOrange = Color.fromRGBO(235, 117, 63, 1.0); static const Color moderateOrange = Color.fromRGBO(235, 117, 63, 1.0);
static const Color moneroOrange = Color.fromRGBO(255, 102, 0, 1.0);
static const Color moneroLightOrange = Color.fromRGBO(250, 240, 246, 1.0);
static const Color bitcoinOrange = Color.fromRGBO(242, 169, 0, 1.0);
static const Color shineGreen = Color.fromRGBO(76, 189, 87, 1.0); static const Color shineGreen = Color.fromRGBO(76, 189, 87, 1.0);
static const Color moderateGreen = Color.fromRGBO(45, 158, 56, 1.0); static const Color moderateGreen = Color.fromRGBO(45, 158, 56, 1.0);
static const Color cornflower = Color.fromRGBO(85, 147, 240, 1.0); static const Color cornflower = Color.fromRGBO(85, 147, 240, 1.0);
@ -48,6 +51,7 @@ class Palette {
static const Color paleCornflowerBlue = Color.fromRGBO(185, 196, 237, 1.0); static const Color paleCornflowerBlue = Color.fromRGBO(185, 196, 237, 1.0);
static const Color manatee = Color.fromRGBO(153, 161, 176, 1.0); static const Color manatee = Color.fromRGBO(153, 161, 176, 1.0);
static const Color stateGray = Color.fromRGBO(68, 74, 89, 1.0); static const Color stateGray = Color.fromRGBO(68, 74, 89, 1.0);
static const Color highContrastGray = Color.fromRGBO(76, 76, 76, 1.0);
static const Color frostySky = Color.fromRGBO(0, 184, 250, 1.0); static const Color frostySky = Color.fromRGBO(0, 184, 250, 1.0);
} }
@ -90,4 +94,7 @@ class PaletteDark {
static const Color lightPurpleBlue = Color.fromRGBO(120, 133, 170, 1.0); static const Color lightPurpleBlue = Color.fromRGBO(120, 133, 170, 1.0);
static const Color indicatorVioletBlue = Color.fromRGBO(59, 72, 119, 1.0); static const Color indicatorVioletBlue = Color.fromRGBO(59, 72, 119, 1.0);
static const Color granite = Color.fromRGBO(48, 51, 60, 1.0); static const Color granite = Color.fromRGBO(48, 51, 60, 1.0);
} static const Color matrixGreen = Color.fromRGBO(18, 229, 90, 1.0);
static const Color moneroOrange = Color.fromRGBO(255, 102, 0, 1.0);
static const Color moneroCard = Color.fromRGBO(20, 21, 24, 1.0);
}

View file

@ -42,10 +42,9 @@ class _AnonpayDetailsPageBodyState extends State<AnonpayDetailsPageBody> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return SectionStandardList( return SectionStandardList(
context: context,
sectionCount: 1, sectionCount: 1,
itemCounter: (int _) => widget.anonpayDetailsViewModel.items.length, itemCounter: (int _) => widget.anonpayDetailsViewModel.items.length,
itemBuilder: (_, __, index) { itemBuilder: (__, index) {
final item = widget.anonpayDetailsViewModel.items[index]; final item = widget.anonpayDetailsViewModel.items[index];
if (item is DetailsListStatusItem) { if (item is DetailsListStatusItem) {

View file

@ -80,7 +80,7 @@ class BackupPage extends BasePage {
isLoading: backupViewModelBase.state is IsExecutingState, isLoading: backupViewModelBase.state is IsExecutingState,
onPressed: () => onExportBackup(context), onPressed: () => onExportBackup(context),
text: S.of(context).export_backup, text: S.of(context).export_backup,
color: Theme.of(context).accentTextTheme.bodyLarge!.color!, color: Theme.of(context).primaryColor,
textColor: Colors.white, textColor: Colors.white,
), ),
), ),

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,19 +40,13 @@ 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(
onPressed: () => onSave(context), onPressed: () => onSave(context),
text: S.of(context).save, text: S.of(context).save,
color: Theme.of(context) color: Theme.of(context).primaryColor,
.accentTextTheme!
.bodyLarge!
.color!,
textColor: Colors.white, textColor: Colors.white,
isDisabled: !editBackupPasswordViewModel.canSave)), isDisabled: !editBackupPasswordViewModel.canSave)),
bottom: 24, bottom: 24,

View file

@ -1,7 +1,6 @@
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';
import 'package:cake_wallet/palette.dart';
import 'package:cake_wallet/di.dart'; import 'package:cake_wallet/di.dart';
import 'package:cake_wallet/store/settings_store.dart'; import 'package:cake_wallet/store/settings_store.dart';
import 'package:cake_wallet/src/widgets/nav_bar.dart'; import 'package:cake_wallet/src/widgets/nav_bar.dart';
@ -10,22 +9,22 @@ import 'package:cake_wallet/generated/i18n.dart';
enum AppBarStyle { regular, withShadow, transparent } enum AppBarStyle { regular, withShadow, transparent }
abstract class BasePage extends StatelessWidget { abstract class BasePage extends StatelessWidget {
BasePage() BasePage() : _scaffoldKey = GlobalKey<ScaffoldState>();
: _scaffoldKey = GlobalKey<ScaffoldState>();
final GlobalKey<ScaffoldState> _scaffoldKey; final GlobalKey<ScaffoldState> _scaffoldKey;
final Image closeButtonImage = final Image closeButtonImage = Image.asset('assets/images/close_button.png');
Image.asset('assets/images/close_button.png');
final Image closeButtonImageDarkTheme = final Image closeButtonImageDarkTheme =
Image.asset('assets/images/close_button_dark_theme.png'); Image.asset('assets/images/close_button_dark_theme.png');
String? get title => null; String? get title => null;
Color get backgroundLightColor => Colors.white; Color? get backgroundLightColor => null;
Color get backgroundDarkColor => PaletteDark.backgroundColor; Color? get backgroundDarkColor => null;
Color? get titleColor => null; bool get gradientBackground => false;
bool get gradientAll => false;
bool get resizeToAvoidBottomInset => true; bool get resizeToAvoidBottomInset => true;
@ -43,15 +42,41 @@ abstract class BasePage extends StatelessWidget {
void onClose(BuildContext context) => Navigator.of(context).pop(); void onClose(BuildContext context) => Navigator.of(context).pop();
Color pageBackgroundColor(BuildContext context) =>
(currentTheme.type == ThemeType.dark
? backgroundDarkColor
: backgroundLightColor) ??
(gradientBackground && currentTheme.type == ThemeType.bright
? Colors.transparent
: Theme.of(context).colorScheme.background);
Color titleColor(BuildContext context) =>
(gradientBackground && currentTheme.type == ThemeType.bright) ||
(gradientAll && currentTheme.brightness == Brightness.light)
? Colors.white
: Theme.of(context).appBarTheme.titleTextStyle!.color!;
Color? pageIconColor(BuildContext context) => titleColor(context);
Widget closeButton(BuildContext context) => Image.asset(
currentTheme.type == ThemeType.dark
? 'assets/images/close_button_dark_theme.png'
: 'assets/images/close_button.png',
color: pageIconColor(context),
height: 16,
);
Widget backButton(BuildContext context) => Icon(
Icons.arrow_back_ios,
color: pageIconColor(context),
size: 16,
);
Widget? leading(BuildContext context) { Widget? leading(BuildContext context) {
if (ModalRoute.of(context)?.isFirst ?? true) { if (ModalRoute.of(context)?.isFirst ?? true) {
return null; return null;
} }
final _backButton = Icon(Icons.arrow_back_ios,
color: titleColor ?? Theme.of(context).primaryTextTheme!.titleLarge!.color!,
size: 16,);
return MergeSemantics( return MergeSemantics(
child: SizedBox( child: SizedBox(
height: 37, height: 37,
@ -66,7 +91,7 @@ abstract class BasePage extends StatelessWidget {
(states) => Colors.transparent), (states) => Colors.transparent),
), ),
onPressed: () => onClose(context), onPressed: () => onClose(context),
child: _backButton, child: backButton(context),
), ),
), ),
), ),
@ -83,8 +108,7 @@ abstract class BasePage extends StatelessWidget {
fontSize: 18.0, fontSize: 18.0,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
fontFamily: 'Lato', fontFamily: 'Lato',
color: titleColor ?? color: titleColor(context)),
Theme.of(context).primaryTextTheme!.titleLarge!.color!),
); );
} }
@ -93,9 +117,8 @@ abstract class BasePage extends StatelessWidget {
Widget? floatingActionButton(BuildContext context) => null; Widget? floatingActionButton(BuildContext context) => null;
ObstructingPreferredSizeWidget appBar(BuildContext context) { ObstructingPreferredSizeWidget appBar(BuildContext context) {
final appBarColor = currentTheme.type == ThemeType.dark final appBarColor = pageBackgroundColor(context);
? backgroundDarkColor : backgroundLightColor;
switch (appBarStyle) { switch (appBarStyle) {
case AppBarStyle.regular: case AppBarStyle.regular:
// FIX-ME: NavBar no context // FIX-ME: NavBar no context
@ -139,12 +162,9 @@ abstract class BasePage extends StatelessWidget {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
final _backgroundColor = currentTheme.type == ThemeType.dark
? backgroundDarkColor : backgroundLightColor;
final root = Scaffold( final root = Scaffold(
key: _scaffoldKey, key: _scaffoldKey,
backgroundColor: _backgroundColor, backgroundColor: pageBackgroundColor(context),
resizeToAvoidBottomInset: resizeToAvoidBottomInset, resizeToAvoidBottomInset: resizeToAvoidBottomInset,
extendBodyBehindAppBar: extendBodyBehindAppBar, extendBodyBehindAppBar: extendBodyBehindAppBar,
endDrawer: endDrawer, endDrawer: endDrawer,

View file

@ -24,9 +24,6 @@ class BuyWebViewPage extends BasePage {
@override @override
Color get backgroundDarkColor => Colors.white; Color get backgroundDarkColor => Colors.white;
@override
Color get titleColor => Palette.darkBlueCraiola;
@override @override
Widget body(BuildContext context) => Widget body(BuildContext context) =>
BuyWebViewPageBody(buyViewModel, ordersStore: ordersStore, url: url); BuyWebViewPageBody(buyViewModel, ordersStore: ordersStore, url: url);

View file

@ -3,6 +3,10 @@ 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/keyboard_theme.dart';
import 'package:cake_wallet/themes/extensions/send_page_theme.dart';
import 'package:cw_core/wallet_type.dart'; import 'package:cw_core/wallet_type.dart';
import 'package:cake_wallet/src/screens/buy/widgets/buy_list_item.dart'; import 'package:cake_wallet/src/screens/buy/widgets/buy_list_item.dart';
import 'package:cake_wallet/src/widgets/alert_with_one_action.dart'; import 'package:cake_wallet/src/widgets/alert_with_one_action.dart';
@ -58,9 +62,6 @@ class PreOrderPage extends BasePage {
@override @override
String get title => S.current.buy + ' ' + walletTypeToString(buyViewModel.wallet.type); String get title => S.current.buy + ' ' + walletTypeToString(buyViewModel.wallet.type);
@override
Color get titleColor => Colors.white;
@override @override
bool get resizeToAvoidBottomInset => false; bool get resizeToAvoidBottomInset => false;
@ -80,10 +81,7 @@ class PreOrderPage extends BasePage {
return KeyboardActions( return KeyboardActions(
config: KeyboardActionsConfig( config: KeyboardActionsConfig(
keyboardActionsPlatform: KeyboardActionsPlatform.IOS, keyboardActionsPlatform: KeyboardActionsPlatform.IOS,
keyboardBarColor: Theme.of(context) keyboardBarColor: Theme.of(context).extension<KeyboardTheme>()!.keyboardBarColor,
.accentTextTheme!
.bodyLarge!
.backgroundColor!,
nextFocus: false, nextFocus: false,
actions: [ actions: [
KeyboardActionsItem( KeyboardActionsItem(
@ -104,10 +102,8 @@ class PreOrderPage extends BasePage {
bottomLeft: Radius.circular(24), bottomLeft: Radius.circular(24),
bottomRight: Radius.circular(24)), bottomRight: Radius.circular(24)),
gradient: LinearGradient(colors: [ gradient: LinearGradient(colors: [
Theme.of(context).primaryTextTheme!.titleMedium!.color!, Theme.of(context).extension<SendPageTheme>()!.firstGradientColor,
Theme.of(context) Theme.of(context).extension<SendPageTheme>()!.secondGradientColor,
.primaryTextTheme!.titleMedium!
.decorationColor!,
], begin: Alignment.topLeft, end: Alignment.bottomRight), ], begin: Alignment.topLeft, end: Alignment.bottomRight),
), ),
child: Padding( child: Padding(
@ -162,11 +158,11 @@ class PreOrderPage extends BasePage {
), ),
), ),
hintText: '0.00', hintText: '0.00',
borderColor: Theme.of(context).primaryTextTheme!.bodyLarge!.decorationColor!, borderColor: Theme.of(context).extension<ExchangePageTheme>()!.textFieldBorderBottomPanelColor,
borderWidth: 0.5, borderWidth: 0.5,
textStyle: TextStyle(fontSize: 36, fontWeight: FontWeight.w500, color: Colors.white), textStyle: TextStyle(fontSize: 36, fontWeight: FontWeight.w500, color: Colors.white),
placeholderTextStyle: TextStyle( placeholderTextStyle: TextStyle(
color: Theme.of(context).primaryTextTheme!.headlineSmall!.decorationColor!, color: Theme.of(context).extension<SendPageTheme>()!.textFieldHintColor,
fontWeight: FontWeight.w500, fontWeight: FontWeight.w500,
fontSize: 36, fontSize: 36,
), ),
@ -181,7 +177,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
), ),
@ -248,7 +244,7 @@ class PreOrderPage extends BasePage {
? S.of(context).buy ? S.of(context).buy
: S.of(context).buy_with + : S.of(context).buy_with +
' ${buyViewModel.selectedProvider!.description.title}', ' ${buyViewModel.selectedProvider!.description.title}',
color: Theme.of(context).accentTextTheme!.bodyLarge!.color!, color: Theme.of(context).primaryColor,
textColor: Colors.white, textColor: Colors.white,
isLoading: buyViewModel.isRunning, isLoading: buyViewModel.isRunning,
isDisabled: (buyViewModel.selectedProvider == null) || isDisabled: (buyViewModel.selectedProvider == null) ||

View file

@ -1,6 +1,7 @@
import 'package:cake_wallet/core/auth_service.dart'; import 'package:cake_wallet/core/auth_service.dart';
import 'package:cake_wallet/entities/contact_base.dart'; import 'package:cake_wallet/entities/contact_base.dart';
import 'package:cake_wallet/entities/contact_record.dart'; import 'package:cake_wallet/entities/contact_record.dart';
import 'package:cake_wallet/themes/extensions/exchange_page_theme.dart';
import 'package:cake_wallet/utils/show_bar.dart'; import 'package:cake_wallet/utils/show_bar.dart';
import 'package:cake_wallet/utils/show_pop_up.dart'; import 'package:cake_wallet/utils/show_pop_up.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
@ -32,13 +33,13 @@ class ContactListPage extends BasePage {
height: 32.0, height: 32.0,
decoration: BoxDecoration( decoration: BoxDecoration(
shape: BoxShape.circle, shape: BoxShape.circle,
color: Theme.of(context).accentTextTheme!.bodySmall!.color!), color: Theme.of(context).extension<ExchangePageTheme>()!.buttonBackgroundColor),
child: Stack( child: Stack(
alignment: Alignment.center, alignment: Alignment.center,
children: <Widget>[ children: <Widget>[
Icon( Icon(
Icons.add, Icons.add,
color: Theme.of(context).primaryTextTheme.titleLarge!.color!, color: Theme.of(context).dialogTheme.backgroundColor,
size: 22.0, size: 22.0,
), ),
ButtonTheme( ButtonTheme(
@ -48,17 +49,15 @@ class ContactListPage extends BasePage {
// FIX-ME: Style // FIX-ME: Style
//shape: CircleBorder(), //shape: CircleBorder(),
onPressed: () async { onPressed: () async {
if (contactListViewModel if (contactListViewModel.shouldRequireTOTP2FAForAddingContacts) {
.shouldRequireTOTP2FAForAddingContacts) {
authService.authenticateAction( authService.authenticateAction(
context, context,
route: Routes.addressBookAddContact, route: Routes.addressBookAddContact,
conditionToDetermineIfToUse2FA: contactListViewModel conditionToDetermineIfToUse2FA:
.shouldRequireTOTP2FAForAddingContacts, contactListViewModel.shouldRequireTOTP2FAForAddingContacts,
); );
} else { } else {
await Navigator.of(context) await Navigator.of(context).pushNamed(Routes.addressBookAddContact);
.pushNamed(Routes.addressBookAddContact);
} }
}, },
child: Offstage()), child: Offstage()),
@ -77,12 +76,8 @@ class ContactListPage extends BasePage {
final contacts = contactListViewModel.contactsToShow; final contacts = contactListViewModel.contactsToShow;
final walletContacts = contactListViewModel.walletContactsToShow; final walletContacts = contactListViewModel.walletContactsToShow;
return CollapsibleSectionList( return CollapsibleSectionList(
context: context,
sectionCount: 2, sectionCount: 2,
themeColor: Theme.of(context).primaryTextTheme.titleLarge!.color!, sectionTitleBuilder: (int sectionIndex) {
dividerThemeColor:
Theme.of(context).primaryTextTheme.bodySmall!.decorationColor!,
sectionTitleBuilder: (_, int sectionIndex) {
var title = S.current.contact_list_contacts; var title = S.current.contact_list_contacts;
if (sectionIndex == 0) { if (sectionIndex == 0) {
@ -95,7 +90,7 @@ class ContactListPage extends BasePage {
}, },
itemCounter: (int sectionIndex) => itemCounter: (int sectionIndex) =>
sectionIndex == 0 ? walletContacts.length : contacts.length, sectionIndex == 0 ? walletContacts.length : contacts.length,
itemBuilder: (_, sectionIndex, index) { itemBuilder: (int sectionIndex, index) {
if (sectionIndex == 0) { if (sectionIndex == 0) {
final walletInfo = walletContacts[index]; final walletInfo = walletContacts[index];
return generateRaw(context, walletInfo); return generateRaw(context, walletInfo);
@ -128,8 +123,7 @@ class ContactListPage extends BasePage {
return; return;
} }
final isCopied = await showNameAndAddressDialog( final isCopied = await showNameAndAddressDialog(context, contact.name, contact.address);
context, contact.name, contact.address);
if (isCopied) { if (isCopied) {
await Clipboard.setData(ClipboardData(text: contact.address)); await Clipboard.setData(ClipboardData(text: contact.address));
@ -152,7 +146,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).dialogTheme.backgroundColor,
), ),
), ),
)) ))
@ -177,8 +171,7 @@ class ContactListPage extends BasePage {
false; false;
} }
Future<bool> showNameAndAddressDialog( Future<bool> showNameAndAddressDialog(BuildContext context, String name, String address) async {
BuildContext context, String name, String address) async {
return await showPopUp<bool>( return await showPopUp<bool>(
context: context, context: context,
builder: (BuildContext context) { builder: (BuildContext context) {
@ -193,8 +186,7 @@ class ContactListPage extends BasePage {
false; false;
} }
ActionPane _actionPane(BuildContext context, ContactRecord contact) => ActionPane _actionPane(BuildContext context, ContactRecord contact) => ActionPane(
ActionPane(
motion: const ScrollMotion(), motion: const ScrollMotion(),
extentRatio: 0.4, extentRatio: 0.4,
children: [ children: [

View file

@ -1,5 +1,6 @@
import 'package:cake_wallet/core/address_validator.dart'; import 'package:cake_wallet/core/address_validator.dart';
import 'package:cake_wallet/palette.dart'; import 'package:cake_wallet/palette.dart';
import 'package:cake_wallet/themes/extensions/transaction_trade_theme.dart';
import 'package:cake_wallet/utils/show_pop_up.dart'; import 'package:cake_wallet/utils/show_pop_up.dart';
import 'package:cw_core/currency.dart'; import 'package:cw_core/currency.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
@ -17,6 +18,8 @@ import 'package:cake_wallet/src/widgets/address_text_field.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/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/cake_text_theme.dart';
class ContactPage extends BasePage { class ContactPage extends BasePage {
ContactPage(this.contactViewModel) ContactPage(this.contactViewModel)
@ -47,7 +50,7 @@ class ContactPage extends BasePage {
@override @override
Widget body(BuildContext context) { Widget body(BuildContext context) {
final downArrow = Image.asset('assets/images/arrow_bottom_purple_icon.png', final downArrow = Image.asset('assets/images/arrow_bottom_purple_icon.png',
color: Theme.of(context).primaryTextTheme!.labelSmall!.color!, color: Theme.of(context).extension<TransactionTradeTheme>()!.detailsTitlesColor,
height: 8); height: 8);
reaction((_) => contactViewModel.state, (ExecutionState state) { reaction((_) => contactViewModel.state, (ExecutionState state) {
@ -99,15 +102,9 @@ class ContactPage extends BasePage {
AddressTextFieldOption.paste, AddressTextFieldOption.paste,
AddressTextFieldOption.qrCode, AddressTextFieldOption.qrCode,
], ],
buttonColor: Theme.of(context) buttonColor: Theme.of(context).extension<AddressTheme>()!.actionButtonColor,
.accentTextTheme!
.displaySmall!
.color!,
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!),
), ),
@ -143,10 +140,7 @@ class ContactPage extends BasePage {
await contactViewModel.save(); await contactViewModel.save();
}, },
text: S.of(context).save, text: S.of(context).save,
color: Theme.of(context) color: Theme.of(context).primaryColor,
.accentTextTheme!
.bodyLarge!
.color!,
textColor: Colors.white, textColor: Colors.white,
isDisabled: !contactViewModel.isReady))) isDisabled: !contactViewModel.isReady)))
], ],

View file

@ -4,6 +4,8 @@ import 'package:cake_wallet/di.dart';
import 'package:cake_wallet/entities/main_actions.dart'; import 'package:cake_wallet/entities/main_actions.dart';
import 'package:cake_wallet/src/screens/dashboard/desktop_widgets/desktop_sidebar_wrapper.dart'; import 'package:cake_wallet/src/screens/dashboard/desktop_widgets/desktop_sidebar_wrapper.dart';
import 'package:cake_wallet/src/screens/dashboard/widgets/market_place_page.dart'; import 'package:cake_wallet/src/screens/dashboard/widgets/market_place_page.dart';
import 'package:cake_wallet/src/widgets/gradient_background.dart';
import 'package:cake_wallet/themes/extensions/sync_indicator_theme.dart';
import 'package:cake_wallet/utils/device_info.dart'; import 'package:cake_wallet/utils/device_info.dart';
import 'package:cake_wallet/utils/version_comparator.dart'; import 'package:cake_wallet/utils/version_comparator.dart';
import 'package:cake_wallet/view_model/dashboard/market_place_view_model.dart'; import 'package:cake_wallet/view_model/dashboard/market_place_view_model.dart';
@ -29,6 +31,8 @@ import 'package:shared_preferences/shared_preferences.dart';
import 'package:smooth_page_indicator/smooth_page_indicator.dart'; import 'package:smooth_page_indicator/smooth_page_indicator.dart';
import 'package:cake_wallet/main.dart'; import 'package:cake_wallet/main.dart';
import 'package:cake_wallet/src/screens/release_notes/release_notes_screen.dart'; import 'package:cake_wallet/src/screens/release_notes/release_notes_screen.dart';
import 'package:cake_wallet/themes/extensions/dashboard_page_theme.dart';
import 'package:cake_wallet/themes/extensions/balance_page_theme.dart';
class DashboardPage extends StatelessWidget { class DashboardPage extends StatelessWidget {
DashboardPage({ DashboardPage({
@ -81,28 +85,11 @@ class _DashboardPageView extends BasePage {
final BalancePage balancePage; final BalancePage balancePage;
@override @override
Color get backgroundLightColor => bool get gradientBackground => true;
currentTheme.type == ThemeType.bright ? Colors.transparent : Colors.white;
@override
Color get backgroundDarkColor => Colors.transparent;
@override @override
Widget Function(BuildContext, Widget) get rootWrapper => Widget Function(BuildContext, Widget) get rootWrapper =>
(BuildContext context, Widget scaffold) => Container( (BuildContext context, Widget scaffold) => GradientBackground(scaffold: scaffold);
decoration: BoxDecoration(
gradient: LinearGradient(
colors: [
Theme.of(context).colorScheme.secondary,
Theme.of(context).scaffoldBackgroundColor,
Theme.of(context).primaryColor,
],
begin: Alignment.topRight,
end: Alignment.bottomLeft,
),
),
child: scaffold,
);
@override @override
bool get resizeToAvoidBottomInset => false; bool get resizeToAvoidBottomInset => false;
@ -199,8 +186,10 @@ class _DashboardPageView extends BasePage {
dotWidth: 6.0, dotWidth: 6.0,
dotHeight: 6.0, dotHeight: 6.0,
dotColor: Theme.of(context).indicatorColor, dotColor: Theme.of(context).indicatorColor,
activeDotColor: activeDotColor: Theme.of(context)
Theme.of(context).accentTextTheme.headlineMedium!.backgroundColor!, .extension<DashboardPageTheme>()!
.indicatorDotTheme
.activeIndicatorColor,
), ),
), ),
); );
@ -216,12 +205,11 @@ class _DashboardPageView extends BasePage {
decoration: BoxDecoration( decoration: BoxDecoration(
borderRadius: BorderRadius.circular(50.0), borderRadius: BorderRadius.circular(50.0),
border: Border.all( border: Border.all(
color: currentTheme.type == ThemeType.bright color: Theme.of(context).extension<BalancePageTheme>()!.cardBorderColor,
? Color.fromRGBO(255, 255, 255, 0.2)
: Colors.transparent,
width: 1, width: 1,
), ),
color: Theme.of(context).textTheme.titleLarge!.backgroundColor!, color:
Theme.of(context).extension<SyncIndicatorTheme>()!.syncedBackgroundColor,
), ),
child: Container( child: Container(
padding: EdgeInsets.only(left: 32, right: 32), padding: EdgeInsets.only(left: 32, right: 32),
@ -240,13 +228,11 @@ class _DashboardPageView extends BasePage {
width: 24, width: 24,
color: action.isEnabled?.call(dashboardViewModel) ?? true color: action.isEnabled?.call(dashboardViewModel) ?? true
? Theme.of(context) ? Theme.of(context)
.accentTextTheme .extension<DashboardPageTheme>()!
.displayMedium! .mainActionsIconColor
.backgroundColor!
: Theme.of(context) : Theme.of(context)
.accentTextTheme .extension<BalancePageTheme>()!
.displaySmall! .labelTextColor,
.backgroundColor!,
), ),
title: action.name(context), title: action.name(context),
onClick: () async => onClick: () async =>
@ -254,9 +240,8 @@ class _DashboardPageView extends BasePage {
textColor: action.isEnabled?.call(dashboardViewModel) ?? true textColor: action.isEnabled?.call(dashboardViewModel) ?? true
? null ? null
: Theme.of(context) : Theme.of(context)
.accentTextTheme .extension<BalancePageTheme>()!
.displaySmall! .labelTextColor,
.backgroundColor!,
), ),
), ),
) )

View file

@ -1,4 +1,7 @@
import 'package:auto_size_text/auto_size_text.dart'; import 'package:auto_size_text/auto_size_text.dart';
import 'package:cake_wallet/themes/extensions/balance_page_theme.dart';
import 'package:cake_wallet/themes/extensions/dashboard_page_theme.dart';
import 'package:cake_wallet/themes/extensions/sync_indicator_theme.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
class DesktopActionButton extends StatelessWidget { class DesktopActionButton extends StatelessWidget {
@ -30,7 +33,7 @@ class DesktopActionButton extends StatelessWidget {
width: double.infinity, width: double.infinity,
decoration: BoxDecoration( decoration: BoxDecoration(
borderRadius: BorderRadius.circular(15.0), borderRadius: BorderRadius.circular(15.0),
color: Theme.of(context).textTheme!.titleLarge!.backgroundColor!, color: Theme.of(context).extension<SyncIndicatorTheme>()!.syncedBackgroundColor,
), ),
child: Center( child: Center(
child: Row( child: Row(
@ -41,14 +44,8 @@ class DesktopActionButton extends StatelessWidget {
height: 30, height: 30,
width: 30, width: 30,
color: isEnabled color: isEnabled
? Theme.of(context) ? Theme.of(context).extension<DashboardPageTheme>()!.textColor
.accentTextTheme! : Theme.of(context).extension<BalancePageTheme>()!.labelTextColor,
.displayMedium!
.backgroundColor!
: Theme.of(context)
.accentTextTheme!
.displaySmall!
.backgroundColor!,
), ),
const SizedBox(width: 10), const SizedBox(width: 10),
AutoSizeText( AutoSizeText(
@ -58,10 +55,7 @@ class DesktopActionButton extends StatelessWidget {
fontFamily: 'Lato', fontFamily: 'Lato',
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
color: isEnabled color: isEnabled
? Theme.of(context) ? Theme.of(context).extension<DashboardPageTheme>()!.textColor
.accentTextTheme!
.displayMedium!
.backgroundColor!
: null, : null,
height: 1, height: 1,
), ),

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,10 +1,12 @@
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';
import 'package:cake_wallet/routes.dart'; import 'package:cake_wallet/routes.dart';
import 'package:cake_wallet/src/screens/dashboard/desktop_widgets/dropdown_item_widget.dart'; import 'package:cake_wallet/src/screens/dashboard/desktop_widgets/dropdown_item_widget.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/themes/extensions/menu_theme.dart';
import 'package:cake_wallet/utils/show_bar.dart'; import 'package:cake_wallet/utils/show_bar.dart';
import 'package:cake_wallet/utils/show_pop_up.dart'; import 'package:cake_wallet/utils/show_pop_up.dart';
import 'package:cake_wallet/view_model/wallet_list/wallet_list_item.dart'; import 'package:cake_wallet/view_model/wallet_list/wallet_list_item.dart';
@ -37,14 +39,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;
@ -94,8 +96,8 @@ class _DesktopWalletSelectionDropDownState extends State<DesktopWalletSelectionD
onChanged: (item) { onChanged: (item) {
item?.onSelected(); item?.onSelected();
}, },
dropdownColor: themeData.textTheme!.bodyLarge?.decorationColor, dropdownColor: themeData.extension<CakeMenuTheme>()!.backgroundColor,
style: TextStyle(color: themeData.primaryTextTheme!.titleLarge?.color), style: TextStyle(color: themeData.extension<CakeTextTheme>()!.titleColor),
selectedItemBuilder: (context) => dropDownItems.map((item) => item.child).toList(), selectedItemBuilder: (context) => dropDownItems.map((item) => item.child).toList(),
value: dropDownItems.firstWhere((element) => element.isSelected), value: dropDownItems.firstWhere((element) => element.isSelected),
underline: const SizedBox(), underline: const SizedBox(),

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

@ -6,6 +6,7 @@ import 'package:cake_wallet/src/widgets/base_text_form_field.dart';
import 'package:cake_wallet/src/widgets/checkbox_widget.dart'; import 'package:cake_wallet/src/widgets/checkbox_widget.dart';
import 'package:cake_wallet/src/widgets/primary_button.dart'; import 'package:cake_wallet/src/widgets/primary_button.dart';
import 'package:cake_wallet/src/widgets/scollable_with_bottom_section.dart'; import 'package:cake_wallet/src/widgets/scollable_with_bottom_section.dart';
import 'package:cake_wallet/themes/extensions/transaction_trade_theme.dart';
import 'package:cake_wallet/view_model/dashboard/home_settings_view_model.dart'; import 'package:cake_wallet/view_model/dashboard/home_settings_view_model.dart';
import 'package:cw_core/erc20_token.dart'; import 'package:cw_core/erc20_token.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
@ -111,7 +112,7 @@ class _EditTokenPageBodyState extends State<EditTokenPageBody> {
Container( Container(
padding: EdgeInsets.symmetric(vertical: 16, horizontal: 28), padding: EdgeInsets.symmetric(vertical: 16, horizontal: 28),
decoration: BoxDecoration( decoration: BoxDecoration(
color: Theme.of(context).accentTextTheme.bodySmall!.color!, color: Theme.of(context).cardColor,
borderRadius: BorderRadius.circular(12), borderRadius: BorderRadius.circular(12),
), ),
child: Row( child: Row(
@ -128,7 +129,7 @@ class _EditTokenPageBodyState extends State<EditTokenPageBody> {
style: TextStyle( style: TextStyle(
fontSize: 16, fontSize: 16,
fontWeight: FontWeight.w500, fontWeight: FontWeight.w500,
color: Theme.of(context).primaryTextTheme.titleLarge!.color!, color: Theme.of(context).dialogTheme.backgroundColor,
), ),
), ),
Padding( Padding(
@ -138,7 +139,7 @@ class _EditTokenPageBodyState extends State<EditTokenPageBody> {
style: TextStyle( style: TextStyle(
fontSize: 14, fontSize: 14,
fontWeight: FontWeight.normal, fontWeight: FontWeight.normal,
color: Theme.of(context).primaryTextTheme.labelSmall!.color!, color: Theme.of(context).extension<TransactionTradeTheme>()!.detailsTitlesColor,
), ),
), ),
), ),
@ -197,7 +198,7 @@ class _EditTokenPageBodyState extends State<EditTokenPageBody> {
} }
}, },
text: S.of(context).save, text: S.of(context).save,
color: Theme.of(context).accentTextTheme.bodyLarge!.color!, color: Theme.of(context).primaryColor,
textColor: Colors.white, textColor: Colors.white,
), ),
), ),

View file

@ -7,6 +7,8 @@ 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/settings/widgets/settings_picker_cell.dart'; import 'package:cake_wallet/src/screens/settings/widgets/settings_picker_cell.dart';
import 'package:cake_wallet/src/screens/settings/widgets/settings_switcher_cell.dart'; import 'package:cake_wallet/src/screens/settings/widgets/settings_switcher_cell.dart';
import 'package:cake_wallet/themes/extensions/address_theme.dart';
import 'package:cake_wallet/themes/extensions/menu_theme.dart';
import 'package:cake_wallet/view_model/dashboard/home_settings_view_model.dart'; import 'package:cake_wallet/view_model/dashboard/home_settings_view_model.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_mobx/flutter_mobx.dart'; import 'package:flutter_mobx/flutter_mobx.dart';
@ -34,7 +36,7 @@ class HomeSettingsPage extends BasePage {
onItemSelected: _homeSettingsViewModel.setSortBalanceBy, onItemSelected: _homeSettingsViewModel.setSortBalanceBy,
), ),
), ),
Divider(color: Theme.of(context).primaryTextTheme.bodySmall!.decorationColor!), Divider(color: Theme.of(context).extension<CakeMenuTheme>()!.dividerColor),
Observer( Observer(
builder: (_) => SettingsSwitcherCell( builder: (_) => SettingsSwitcherCell(
title: S.of(context).pin_at_top(_homeSettingsViewModel.nativeToken.title), title: S.of(context).pin_at_top(_homeSettingsViewModel.nativeToken.title),
@ -44,7 +46,7 @@ class HomeSettingsPage extends BasePage {
}, },
), ),
), ),
Divider(color: Theme.of(context).primaryTextTheme.bodySmall!.decorationColor!), Divider(color: Theme.of(context).extension<CakeMenuTheme>()!.dividerColor),
const SizedBox(height: 20), const SizedBox(height: 20),
Row( Row(
children: [ children: [
@ -53,12 +55,12 @@ class HomeSettingsPage extends BasePage {
padding: const EdgeInsetsDirectional.only(start: 16), padding: const EdgeInsetsDirectional.only(start: 16),
child: TextFormField( child: TextFormField(
controller: _searchController, controller: _searchController,
style: TextStyle(color: Theme.of(context).primaryTextTheme.titleLarge!.color!), style: TextStyle(color: Theme.of(context).dialogTheme.backgroundColor),
decoration: InputDecoration( decoration: InputDecoration(
hintText: S.of(context).search_add_token, hintText: S.of(context).search_add_token,
prefixIcon: Image.asset("assets/images/search_icon.png"), prefixIcon: Image.asset("assets/images/search_icon.png"),
filled: true, filled: true,
fillColor: Theme.of(context).accentTextTheme.displaySmall!.color!, fillColor: Theme.of(context).extension<AddressTheme>()!.actionButtonColor,
alignLabelWithHint: false, alignLabelWithHint: false,
contentPadding: const EdgeInsets.symmetric(vertical: 4, horizontal: 16), contentPadding: const EdgeInsets.symmetric(vertical: 4, horizontal: 16),
enabledBorder: OutlineInputBorder( enabledBorder: OutlineInputBorder(
@ -84,15 +86,15 @@ class HomeSettingsPage extends BasePage {
}); });
}, },
elevation: 0, elevation: 0,
fillColor: Theme.of(context).accentTextTheme.bodySmall!.color!, fillColor: Theme.of(context).cardColor,
child: Icon( child: Icon(
Icons.add, Icons.add,
color: Theme.of(context).primaryTextTheme.titleLarge!.color!, color: Theme.of(context).dialogTheme.backgroundColor,
size: 22.0, size: 22.0,
), ),
padding: EdgeInsets.all(12), padding: EdgeInsets.all(12),
shape: CircleBorder(), shape: CircleBorder(),
splashColor: Theme.of(context).accentTextTheme.bodySmall!.color!, splashColor: Theme.of(context).cardColor,
), ),
], ],
), ),
@ -146,7 +148,7 @@ class HomeSettingsPage extends BasePage {
), ),
), ),
decoration: BoxDecoration( decoration: BoxDecoration(
color: Theme.of(context).accentTextTheme.bodySmall!.color!, color: Theme.of(context).cardColor,
borderRadius: BorderRadius.circular(30), borderRadius: BorderRadius.circular(30),
), ),
); );

View file

@ -1,4 +1,5 @@
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:cake_wallet/themes/extensions/dashboard_page_theme.dart';
class ActionButton extends StatelessWidget { class ActionButton extends StatelessWidget {
ActionButton( ActionButton(
@ -46,14 +47,11 @@ class ActionButton extends StatelessWidget {
style: TextStyle( style: TextStyle(
fontSize: 10, fontSize: 10,
color: textColor ?? color: textColor ??
Theme.of(context) Theme.of(context).extension<DashboardPageTheme>()!.cardTextColor),
.accentTextTheme!
.displayMedium!
.backgroundColor!),
) )
], ],
), ),
), ),
); );
} }
} }

View file

@ -1,10 +1,15 @@
import 'package:cake_wallet/themes/extensions/keyboard_theme.dart';
import 'package:cake_wallet/themes/extensions/cake_text_theme.dart';
import 'package:cake_wallet/anonpay/anonpay_donation_link_info.dart'; import 'package:cake_wallet/anonpay/anonpay_donation_link_info.dart';
import 'package:cake_wallet/entities/preferences_key.dart'; import 'package:cake_wallet/entities/preferences_key.dart';
import 'package:cake_wallet/entities/receive_page_option.dart'; import 'package:cake_wallet/entities/receive_page_option.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/dashboard/widgets/present_receive_option_picker.dart'; import 'package:cake_wallet/src/screens/dashboard/widgets/present_receive_option_picker.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/gradient_background.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/themes/extensions/receive_page_theme.dart';
import 'package:cake_wallet/themes/extensions/sync_indicator_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:cake_wallet/utils/share_util.dart'; import 'package:cake_wallet/utils/share_util.dart';
@ -21,6 +26,8 @@ import 'package:keyboard_actions/keyboard_actions.dart';
import 'package:mobx/mobx.dart'; import 'package:mobx/mobx.dart';
import 'package:shared_preferences/shared_preferences.dart'; import 'package:shared_preferences/shared_preferences.dart';
import 'package:cake_wallet/di.dart'; import 'package:cake_wallet/di.dart';
import 'package:cake_wallet/themes/extensions/dashboard_page_theme.dart';
import 'package:cake_wallet/themes/extensions/balance_page_theme.dart';
class AddressPage extends BasePage { class AddressPage extends BasePage {
AddressPage({ AddressPage({
@ -48,11 +55,7 @@ class AddressPage extends BasePage {
final FocusNode _cryptoAmountFocus; final FocusNode _cryptoAmountFocus;
@override @override
Color get backgroundLightColor => bool get gradientBackground => true;
currentTheme.type == ThemeType.bright ? Colors.transparent : Colors.white;
@override
Color get backgroundDarkColor => Colors.transparent;
@override @override
bool get resizeToAvoidBottomInset => false; bool get resizeToAvoidBottomInset => false;
@ -84,7 +87,7 @@ class AddressPage extends BasePage {
overlayColor: MaterialStateColor.resolveWith((states) => Colors.transparent), overlayColor: MaterialStateColor.resolveWith((states) => Colors.transparent),
), ),
onPressed: () => onClose(context), onPressed: () => onClose(context),
child: !isMobileView ? _closeButton : _backButton, child: !isMobileView ? closeButton(context) : backButton(context),
), ),
), ),
), ),
@ -94,20 +97,11 @@ class AddressPage extends BasePage {
@override @override
Widget middle(BuildContext context) => PresentReceiveOptionPicker( Widget middle(BuildContext context) => PresentReceiveOptionPicker(
receiveOptionViewModel: receiveOptionViewModel, color: titleColor(context), receiveOptionViewModel: receiveOptionViewModel);
hasWhiteBackground: currentTheme.type == ThemeType.light,
);
@override @override
Widget Function(BuildContext, Widget) get rootWrapper => Widget Function(BuildContext, Widget) get rootWrapper =>
(BuildContext context, Widget scaffold) => Container( (BuildContext context, Widget scaffold) => GradientBackground(scaffold: scaffold);
decoration: BoxDecoration(
gradient: LinearGradient(colors: [
Theme.of(context).colorScheme.secondary,
Theme.of(context).scaffoldBackgroundColor,
Theme.of(context).primaryColor,
], begin: Alignment.topRight, end: Alignment.bottomLeft)),
child: scaffold);
@override @override
Widget? trailing(BuildContext context) { Widget? trailing(BuildContext context) {
@ -201,8 +195,13 @@ class AddressPage extends BasePage {
decoration: BoxDecoration( decoration: BoxDecoration(
borderRadius: BorderRadius.all(Radius.circular(25)), borderRadius: BorderRadius.all(Radius.circular(25)),
border: Border.all( border: Border.all(
color: Theme.of(context).textTheme.titleMedium!.color!, width: 1), color: Theme.of(context)
color: Theme.of(context).textTheme.titleLarge!.backgroundColor!), .extension<ReceivePageTheme>()!
.iconsBackgroundColor,
width: 1),
color: Theme.of(context)
.extension<SyncIndicatorTheme>()!
.syncedBackgroundColor),
child: Row( child: Row(
mainAxisSize: MainAxisSize.max, mainAxisSize: MainAxisSize.max,
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
@ -215,15 +214,13 @@ class AddressPage extends BasePage {
style: TextStyle( style: TextStyle(
fontSize: 14, fontSize: 14,
fontWeight: FontWeight.w500, fontWeight: FontWeight.w500,
color: Theme.of(context) color: Theme.of(context).extension<DashboardPageTheme>()!.textColor),
.accentTextTheme.displayMedium!
.backgroundColor!),
)), )),
Icon( Icon(
Icons.arrow_forward_ios, Icons.arrow_forward_ios,
size: 14, size: 14,
color: color:
Theme.of(context).accentTextTheme.displayMedium!.backgroundColor!, Theme.of(context).extension<DashboardPageTheme>()!.textColor,
) )
], ],
), ),
@ -234,8 +231,7 @@ class AddressPage extends BasePage {
textAlign: TextAlign.center, textAlign: TextAlign.center,
style: TextStyle( style: TextStyle(
fontSize: 15, fontSize: 15,
color: color: Theme.of(context).extension<BalancePageTheme>()!.labelTextColor));
Theme.of(context).accentTextTheme.displaySmall!.backgroundColor!));
} else { } else {
return const SizedBox(); return const SizedBox();
} }

View file

@ -1,4 +1,6 @@
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/dashboard_page_theme.dart';
class AnonpayTransactionRow extends StatelessWidget { class AnonpayTransactionRow extends StatelessWidget {
AnonpayTransactionRow({ AnonpayTransactionRow({
@ -37,19 +39,19 @@ class AnonpayTransactionRow extends StatelessWidget {
style: TextStyle( style: TextStyle(
fontSize: 16, fontSize: 16,
fontWeight: FontWeight.w500, fontWeight: FontWeight.w500,
color: Theme.of(context).accentTextTheme!.displayMedium!.backgroundColor!)), color: Theme.of(context).extension<DashboardPageTheme>()!.textColor)),
Text(amount + ' ' + currency, Text(amount + ' ' + currency,
style: TextStyle( style: TextStyle(
fontSize: 16, fontSize: 16,
fontWeight: FontWeight.w500, fontWeight: FontWeight.w500,
color: Theme.of(context).accentTextTheme!.displayMedium!.backgroundColor!)) color: Theme.of(context).extension<DashboardPageTheme>()!.textColor))
]), ]),
SizedBox(height: 5), SizedBox(height: 5),
Row(mainAxisAlignment: MainAxisAlignment.spaceBetween, children: <Widget>[ Row(mainAxisAlignment: MainAxisAlignment.spaceBetween, children: <Widget>[
Text(createdAt, Text(createdAt,
style: TextStyle( style: TextStyle(
fontSize: 14, fontSize: 14,
color: Theme.of(context).textTheme!.labelSmall!.backgroundColor!)) color: Theme.of(context).extension<CakeTextTheme>()!.dateSectionRowColor))
]) ])
], ],
)) ))

View file

@ -1,6 +1,7 @@
import 'package:cake_wallet/routes.dart'; import 'package:cake_wallet/routes.dart';
import 'package:cake_wallet/src/screens/exchange_trade/information_page.dart'; import 'package:cake_wallet/src/screens/exchange_trade/information_page.dart';
import 'package:cake_wallet/store/settings_store.dart'; import 'package:cake_wallet/store/settings_store.dart';
import 'package:cake_wallet/themes/extensions/sync_indicator_theme.dart';
import 'package:cake_wallet/themes/theme_base.dart'; import 'package:cake_wallet/themes/theme_base.dart';
import 'package:cake_wallet/utils/feature_flag.dart'; import 'package:cake_wallet/utils/feature_flag.dart';
import 'package:cake_wallet/utils/show_pop_up.dart'; import 'package:cake_wallet/utils/show_pop_up.dart';
@ -10,6 +11,8 @@ import 'package:flutter_mobx/flutter_mobx.dart';
import 'package:auto_size_text/auto_size_text.dart'; import 'package:auto_size_text/auto_size_text.dart';
import 'package:cake_wallet/src/widgets/introducing_card.dart'; import 'package:cake_wallet/src/widgets/introducing_card.dart';
import 'package:cake_wallet/generated/i18n.dart'; import 'package:cake_wallet/generated/i18n.dart';
import 'package:cake_wallet/themes/extensions/dashboard_page_theme.dart';
import 'package:cake_wallet/themes/extensions/balance_page_theme.dart';
class BalancePage extends StatelessWidget { class BalancePage extends StatelessWidget {
BalancePage({required this.dashboardViewModel, required this.settingsStore}); BalancePage({required this.dashboardViewModel, required this.settingsStore});
@ -41,7 +44,8 @@ class BalancePage extends StatelessWidget {
fontSize: 24, fontSize: 24,
fontFamily: 'Lato', fontFamily: 'Lato',
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
color: Theme.of(context).accentTextTheme.displayMedium!.backgroundColor!, color:
Theme.of(context).extension<DashboardPageTheme>()!.pageTitleTextColor,
height: 1, height: 1,
), ),
maxLines: 1, maxLines: 1,
@ -55,8 +59,9 @@ class BalancePage extends StatelessWidget {
padding: const EdgeInsets.all(8.0), padding: const EdgeInsets.all(8.0),
child: Image.asset( child: Image.asset(
'assets/images/home_screen_settings_icon.png', 'assets/images/home_screen_settings_icon.png',
color: color: Theme.of(context)
Theme.of(context).accentTextTheme.displayMedium!.backgroundColor!, .extension<DashboardPageTheme>()!
.pageTitleTextColor,
), ),
), ),
), ),
@ -139,7 +144,7 @@ class BalancePage extends StatelessWidget {
: Colors.transparent, : Colors.transparent,
width: 1, width: 1,
), ),
color: Theme.of(context).textTheme.titleLarge!.backgroundColor!, color: Theme.of(context).extension<SyncIndicatorTheme>()!.syncedBackgroundColor,
), ),
child: Container( child: Container(
margin: const EdgeInsets.only(top: 16, left: 24, right: 24, bottom: 24), margin: const EdgeInsets.only(top: 16, left: 24, right: 24, bottom: 24),
@ -164,9 +169,8 @@ class BalancePage extends StatelessWidget {
fontFamily: 'Lato', fontFamily: 'Lato',
fontWeight: FontWeight.w400, fontWeight: FontWeight.w400,
color: Theme.of(context) color: Theme.of(context)
.accentTextTheme! .extension<BalancePageTheme>()!
.displaySmall! .labelTextColor,
.backgroundColor!,
height: 1)), height: 1)),
if (hasAdditionalBalance) if (hasAdditionalBalance)
Padding( Padding(
@ -174,9 +178,8 @@ class BalancePage extends StatelessWidget {
child: Icon(Icons.help_outline, child: Icon(Icons.help_outline,
size: 16, size: 16,
color: Theme.of(context) color: Theme.of(context)
.accentTextTheme! .extension<BalancePageTheme>()!
.displaySmall! .labelTextColor),
.backgroundColor!),
), ),
], ],
), ),
@ -187,9 +190,8 @@ class BalancePage extends StatelessWidget {
fontFamily: 'Lato', fontFamily: 'Lato',
fontWeight: FontWeight.w900, fontWeight: FontWeight.w900,
color: Theme.of(context) color: Theme.of(context)
.accentTextTheme! .extension<BalancePageTheme>()!
.displayMedium! .balanceAmountColor,
.backgroundColor!,
height: 1), height: 1),
maxLines: 1, maxLines: 1,
textAlign: TextAlign.start), textAlign: TextAlign.start),
@ -200,10 +202,7 @@ class BalancePage extends StatelessWidget {
fontSize: 16, fontSize: 16,
fontFamily: 'Lato', fontFamily: 'Lato',
fontWeight: FontWeight.w500, fontWeight: FontWeight.w500,
color: Theme.of(context) color: Theme.of(context).extension<BalancePageTheme>()!.textColor,
.accentTextTheme!
.displayMedium!
.backgroundColor!,
height: 1)), height: 1)),
], ],
), ),
@ -213,7 +212,7 @@ class BalancePage extends StatelessWidget {
fontSize: 28, fontSize: 28,
fontFamily: 'Lato', fontFamily: 'Lato',
fontWeight: FontWeight.w800, fontWeight: FontWeight.w800,
color: Theme.of(context).accentTextTheme!.displayMedium!.backgroundColor!, color: Theme.of(context).extension<BalancePageTheme>()!.assetTitleColor,
height: 1)), height: 1)),
], ],
), ),
@ -229,7 +228,7 @@ class BalancePage extends StatelessWidget {
fontSize: 12, fontSize: 12,
fontFamily: 'Lato', fontFamily: 'Lato',
fontWeight: FontWeight.w400, fontWeight: FontWeight.w400,
color: Theme.of(context).accentTextTheme.displaySmall!.backgroundColor!, color: Theme.of(context).extension<BalancePageTheme>()!.labelTextColor,
height: 1, height: 1,
), ),
), ),
@ -240,7 +239,7 @@ class BalancePage extends StatelessWidget {
fontSize: 20, fontSize: 20,
fontFamily: 'Lato', fontFamily: 'Lato',
fontWeight: FontWeight.w400, fontWeight: FontWeight.w400,
color: Theme.of(context).accentTextTheme.displayMedium!.backgroundColor!, color: Theme.of(context).extension<DashboardPageTheme>()!.textColor,
height: 1, height: 1,
), ),
maxLines: 1, maxLines: 1,
@ -254,7 +253,7 @@ class BalancePage extends StatelessWidget {
fontSize: 12, fontSize: 12,
fontFamily: 'Lato', fontFamily: 'Lato',
fontWeight: FontWeight.w400, fontWeight: FontWeight.w400,
color: Theme.of(context).accentTextTheme.displayMedium!.backgroundColor!, color: Theme.of(context).extension<DashboardPageTheme>()!.textColor,
height: 1, height: 1,
), ),
), ),
@ -272,7 +271,7 @@ class BalancePage extends StatelessWidget {
fontSize: 12, fontSize: 12,
fontFamily: 'Lato', fontFamily: 'Lato',
fontWeight: FontWeight.w400, fontWeight: FontWeight.w400,
color: Theme.of(context).accentTextTheme.displaySmall!.backgroundColor!, color: Theme.of(context).extension<BalancePageTheme>()!.labelTextColor,
height: 1, height: 1,
), ),
), ),
@ -283,7 +282,7 @@ class BalancePage extends StatelessWidget {
fontSize: 20, fontSize: 20,
fontFamily: 'Lato', fontFamily: 'Lato',
fontWeight: FontWeight.w400, fontWeight: FontWeight.w400,
color: Theme.of(context).accentTextTheme.displayMedium!.backgroundColor!, color: Theme.of(context).extension<DashboardPageTheme>()!.textColor,
height: 1, height: 1,
), ),
maxLines: 1, maxLines: 1,
@ -297,7 +296,7 @@ class BalancePage extends StatelessWidget {
fontSize: 12, fontSize: 12,
fontFamily: 'Lato', fontFamily: 'Lato',
fontWeight: FontWeight.w400, fontWeight: FontWeight.w400,
color: Theme.of(context).accentTextTheme.displayMedium!.backgroundColor!, color: Theme.of(context).extension<DashboardPageTheme>()!.textColor,
height: 1, height: 1,
), ),
), ),

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:intl/intl.dart'; import 'package:intl/intl.dart';
import 'package:cake_wallet/generated/i18n.dart'; import 'package:cake_wallet/generated/i18n.dart';
import 'package:cake_wallet/utils/date_formatter.dart'; import 'package:cake_wallet/utils/date_formatter.dart';
@ -36,9 +37,6 @@ class DateSectionRaw extends StatelessWidget {
child: Text(title, child: Text(title,
style: TextStyle( style: TextStyle(
fontSize: 12, fontSize: 12,
color: Theme.of(context) color: Theme.of(context).extension<CakeTextTheme>()!.dateSectionRowColor)));
.textTheme!
.labelSmall!
.backgroundColor!)));
} }
} }

View file

@ -1,12 +1,15 @@
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';
import 'package:cake_wallet/themes/extensions/menu_theme.dart';
import 'package:cake_wallet/view_model/dashboard/dashboard_view_model.dart'; import 'package:cake_wallet/view_model/dashboard/dashboard_view_model.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:cake_wallet/src/widgets/picker_wrapper_widget.dart'; import 'package:cake_wallet/src/widgets/picker_wrapper_widget.dart';
import 'package:cake_wallet/generated/i18n.dart'; import 'package:cake_wallet/generated/i18n.dart';
import 'package:flutter_mobx/flutter_mobx.dart'; import 'package:flutter_mobx/flutter_mobx.dart';
//import 'package:date_range_picker/date_range_picker.dart' as date_rage_picker; //import 'package:date_range_picker/date_range_picker.dart' as date_rage_picker;
import 'package:cake_wallet/themes/extensions/transaction_trade_theme.dart';
class FilterWidget extends StatelessWidget { class FilterWidget extends StatelessWidget {
FilterWidget({required this.dashboardViewModel}); FilterWidget({required this.dashboardViewModel});
@ -15,7 +18,7 @@ class FilterWidget extends StatelessWidget {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
const sectionDivider = const SectionDivider(); const sectionDivider = const HorizontalSectionDivider();
return PickerWrapperWidget( return PickerWrapperWidget(
children: [ children: [
Padding( Padding(
@ -23,7 +26,7 @@ class FilterWidget extends StatelessWidget {
child: ClipRRect( child: ClipRRect(
borderRadius: BorderRadius.all(Radius.circular(24)), borderRadius: BorderRadius.all(Radius.circular(24)),
child: Container( child: Container(
color: Theme.of(context).textTheme!.bodyLarge!.decorationColor!, color: Theme.of(context).extension<CakeMenuTheme>()!.backgroundColor,
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
@ -32,10 +35,7 @@ class FilterWidget extends StatelessWidget {
child: Text( child: Text(
S.of(context).filter_by, S.of(context).filter_by,
style: TextStyle( style: TextStyle(
color: Theme.of(context) color: Theme.of(context).extension<TransactionTradeTheme>()!.detailsTitlesColor,
.primaryTextTheme!
.labelSmall!
.color!,
fontSize: 16, fontSize: 16,
fontFamily: 'Lato', fontFamily: 'Lato',
decoration: TextDecoration.none, decoration: TextDecoration.none,
@ -63,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,8 +1,10 @@
import 'package:cake_wallet/src/screens/dashboard/widgets/filter_widget.dart'; import 'package:cake_wallet/src/screens/dashboard/widgets/filter_widget.dart';
import 'package:cake_wallet/themes/extensions/filter_theme.dart';
import 'package:cake_wallet/utils/show_pop_up.dart'; import 'package:cake_wallet/utils/show_pop_up.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/view_model/dashboard/dashboard_view_model.dart'; import 'package:cake_wallet/view_model/dashboard/dashboard_view_model.dart';
import 'package:cake_wallet/themes/extensions/dashboard_page_theme.dart';
class HeaderRow extends StatelessWidget { class HeaderRow extends StatelessWidget {
HeaderRow({required this.dashboardViewModel}); HeaderRow({required this.dashboardViewModel});
@ -12,7 +14,7 @@ class HeaderRow extends StatelessWidget {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
final filterIcon = Image.asset('assets/images/filter_icon.png', final filterIcon = Image.asset('assets/images/filter_icon.png',
color: Theme.of(context).textTheme!.bodySmall!.decorationColor!); color: Theme.of(context).extension<FilterTheme>()!.iconColor);
return Container( return Container(
height: 52, height: 52,
@ -27,10 +29,7 @@ class HeaderRow extends StatelessWidget {
style: TextStyle( style: TextStyle(
fontSize: 20, fontSize: 20,
fontWeight: FontWeight.w500, fontWeight: FontWeight.w500,
color: Theme.of(context) color: Theme.of(context).extension<DashboardPageTheme>()!.pageTitleTextColor),
.accentTextTheme!
.displayMedium!
.backgroundColor!),
), ),
GestureDetector( GestureDetector(
onTap: () { onTap: () {
@ -45,7 +44,7 @@ class HeaderRow extends StatelessWidget {
width: 36, width: 36,
decoration: BoxDecoration( decoration: BoxDecoration(
shape: BoxShape.circle, shape: BoxShape.circle,
color: Theme.of(context).textTheme!.labelSmall!.color!), color: Theme.of(context).extension<FilterTheme>()!.buttonColor),
child: filterIcon, child: filterIcon,
), ),
) )

View file

@ -8,6 +8,7 @@ import 'package:cw_core/wallet_type.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:url_launcher/url_launcher.dart'; import 'package:url_launcher/url_launcher.dart';
import 'package:cake_wallet/themes/extensions/dashboard_page_theme.dart';
class MarketPlacePage extends StatelessWidget { class MarketPlacePage extends StatelessWidget {
MarketPlacePage({ MarketPlacePage({
@ -40,10 +41,7 @@ class MarketPlacePage extends StatelessWidget {
style: TextStyle( style: TextStyle(
fontSize: 24, fontSize: 24,
fontWeight: FontWeight.w500, fontWeight: FontWeight.w500,
color: Theme.of(context) color: Theme.of(context).extension<DashboardPageTheme>()!.pageTitleTextColor,
.accentTextTheme!
.displayMedium!
.backgroundColor!,
), ),
), ),
Expanded( Expanded(

View file

@ -1,13 +1,12 @@
import 'package:cake_wallet/src/widgets/setting_action_button.dart'; import 'package:cake_wallet/src/widgets/setting_action_button.dart';
import 'package:cake_wallet/src/widgets/setting_actions.dart'; import 'package:cake_wallet/src/widgets/setting_actions.dart';
import 'package:cake_wallet/themes/extensions/menu_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/view_model/dashboard/dashboard_view_model.dart'; import 'package:cake_wallet/view_model/dashboard/dashboard_view_model.dart';
import 'package:cw_core/wallet_type.dart'; import 'package:cw_core/wallet_type.dart';
import 'package:flutter_mobx/flutter_mobx.dart'; import 'package:flutter_mobx/flutter_mobx.dart';
// FIXME: terrible design.
class MenuWidget extends StatefulWidget { class MenuWidget extends StatefulWidget {
MenuWidget(this.dashboardViewModel); MenuWidget(this.dashboardViewModel);
@ -19,18 +18,18 @@ class MenuWidget extends StatefulWidget {
class MenuWidgetState extends State<MenuWidget> { class MenuWidgetState extends State<MenuWidget> {
MenuWidgetState() MenuWidgetState()
: this.menuWidth = 0, : this.menuWidth = 0,
this.screenWidth = 0, this.screenWidth = 0,
this.screenHeight = 0, this.screenHeight = 0,
this.headerHeight = 120, this.headerHeight = 120,
this.tileHeight = 60, this.tileHeight = 60,
this.fromTopEdge = 50, this.fromTopEdge = 50,
this.fromBottomEdge = 25, this.fromBottomEdge = 25,
this.moneroIcon = Image.asset('assets/images/monero_menu.png'), this.moneroIcon = Image.asset('assets/images/monero_menu.png'),
this.bitcoinIcon = Image.asset('assets/images/bitcoin_menu.png'), this.bitcoinIcon = Image.asset('assets/images/bitcoin_menu.png'),
this.litecoinIcon = Image.asset('assets/images/litecoin_menu.png'), this.litecoinIcon = Image.asset('assets/images/litecoin_menu.png'),
this.havenIcon = Image.asset('assets/images/haven_menu.png'), this.havenIcon = Image.asset('assets/images/haven_menu.png'),
this.ethereumIcon = Image.asset('assets/images/eth_icon.png'); this.ethereumIcon = Image.asset('assets/images/eth_icon.png');
final largeScreen = 731; final largeScreen = 731;
@ -86,121 +85,111 @@ class MenuWidgetState extends State<MenuWidget> {
final itemCount = SettingActions.all.length; final itemCount = SettingActions.all.length;
moneroIcon = Image.asset('assets/images/monero_menu.png', moneroIcon = Image.asset('assets/images/monero_menu.png',
color: Theme.of(context) color: Theme.of(context).extension<CakeMenuTheme>()!.iconColor);
.accentTextTheme
.labelSmall!
.decorationColor!);
bitcoinIcon = Image.asset('assets/images/bitcoin_menu.png', bitcoinIcon = Image.asset('assets/images/bitcoin_menu.png',
color: Theme.of(context) color: Theme.of(context).extension<CakeMenuTheme>()!.iconColor);
.accentTextTheme
.labelSmall!
.decorationColor!);
return Row( return Row(
mainAxisSize: MainAxisSize.max, mainAxisSize: MainAxisSize.max,
crossAxisAlignment: CrossAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.center,
children: <Widget>[ children: <Widget>[
Padding( Padding(
padding: EdgeInsets.only(left: 24), padding: EdgeInsets.only(left: 24),
child: Container( child: Container(
height: 60, height: 60,
width: 4, width: 4,
decoration: BoxDecoration( decoration: BoxDecoration(
borderRadius: BorderRadius.all(Radius.circular(2)), color: PaletteDark.gray), borderRadius: BorderRadius.all(Radius.circular(2)), color: PaletteDark.gray),
)), ),
),
SizedBox(width: 12), SizedBox(width: 12),
Expanded( Expanded(
child: ClipRRect( child: ClipRRect(
borderRadius: BorderRadius.only( borderRadius:
topLeft: Radius.circular(24), bottomLeft: Radius.circular(24)), BorderRadius.only(topLeft: Radius.circular(24), bottomLeft: Radius.circular(24)),
child: Container( child: Container(
color: color: Theme.of(context).extension<CakeMenuTheme>()!.backgroundColor,
Theme.of(context).textTheme!.bodyLarge!.decorationColor!, child: ListView.separated(
child: ListView.separated( padding: EdgeInsets.only(top: 0),
padding: EdgeInsets.only(top: 0), itemBuilder: (_, index) {
itemBuilder: (_, index) { if (index == 0) {
if (index == 0) { return Container(
return Container( height: headerHeight,
height: headerHeight, decoration: BoxDecoration(
decoration: BoxDecoration( gradient: LinearGradient(colors: [
gradient: LinearGradient(colors: [ Theme.of(context).extension<CakeMenuTheme>()!.headerFirstGradientColor,
Theme.of(context) Theme.of(context).extension<CakeMenuTheme>()!.headerSecondGradientColor,
.accentTextTheme! ], begin: Alignment.topLeft, end: Alignment.bottomRight),
.headlineMedium! ),
.color!, padding: EdgeInsets.only(
Theme.of(context) left: 24, top: fromTopEdge, right: 24, bottom: fromBottomEdge),
.accentTextTheme! child: Row(
.headlineMedium! mainAxisAlignment: MainAxisAlignment.start,
.decorationColor!, ], begin: Alignment.topLeft, end: Alignment.bottomRight), children: <Widget>[
), _iconFor(type: widget.dashboardViewModel.type),
padding: EdgeInsets.only( SizedBox(width: 12),
left: 24, top: fromTopEdge, right: 24, bottom: fromBottomEdge), SingleChildScrollView(
child: Row( child: Container(
mainAxisAlignment: MainAxisAlignment.start, child: Column(
children: <Widget>[ crossAxisAlignment: CrossAxisAlignment.start,
_iconFor(type: widget.dashboardViewModel.type), mainAxisAlignment: widget.dashboardViewModel.subname.isNotEmpty
SizedBox(width: 12), ? MainAxisAlignment.spaceBetween
SingleChildScrollView( : MainAxisAlignment.center,
child: Container( children: <Widget>[
child: Column( Text(
crossAxisAlignment: CrossAxisAlignment.start, widget.dashboardViewModel.name,
mainAxisAlignment: widget.dashboardViewModel.subname.isNotEmpty style: TextStyle(
? MainAxisAlignment.spaceBetween color: Colors.white,
: MainAxisAlignment.center, fontSize: 16,
children: <Widget>[ fontWeight: FontWeight.bold),
Text(
widget.dashboardViewModel.name,
style: TextStyle(
color: Colors.white,
fontSize: 16,
fontWeight: FontWeight.bold),
),
if (widget.dashboardViewModel.subname.isNotEmpty)
Observer(
builder: (_) => Text(
widget.dashboardViewModel.subname,
style: TextStyle(
color: Theme.of(context)
.accentTextTheme!
.labelSmall!
.decorationColor!,
fontWeight: FontWeight.w500,
fontSize: 12),
))
],
), ),
)) if (widget.dashboardViewModel.subname.isNotEmpty)
], Observer(
builder: (_) => Text(
widget.dashboardViewModel.subname,
style: TextStyle(
color: Theme.of(context)
.extension<CakeMenuTheme>()!
.subnameTextColor,
fontWeight: FontWeight.w500,
fontSize: 12),
),
),
],
),
), ),
);
}
index--;
final item = SettingActions.all[index];
final isLastTile = index == itemCount - 1;
return SettingActionButton(
isLastTile: isLastTile,
tileHeight: tileHeight,
selectionActive: false,
fromBottomEdge: fromBottomEdge,
fromTopEdge: fromTopEdge,
onTap: () => item.onTap.call(context),
image: item.image,
title: item.name.call(context),
);
},
separatorBuilder: (_, index) => Container(
height: 1,
color: Theme.of(context)
.primaryTextTheme!
.bodySmall!
.decorationColor!,
), ),
itemCount: itemCount + 1), ],
))) ),
);
}
index--;
final item = SettingActions.all[index];
final isLastTile = index == itemCount - 1;
return SettingActionButton(
isLastTile: isLastTile,
tileHeight: tileHeight,
selectionActive: false,
fromBottomEdge: fromBottomEdge,
fromTopEdge: fromTopEdge,
onTap: () => item.onTap.call(context),
image: item.image,
title: item.name.call(context),
);
},
separatorBuilder: (_, index) => Container(
height: 1,
color: Theme.of(context).extension<CakeMenuTheme>()!.dividerColor,
),
itemCount: itemCount + 1,
),
),
),
),
], ],
); );
} }

View file

@ -1,6 +1,9 @@
import 'package:cake_wallet/buy/buy_provider_description.dart'; import 'package:cake_wallet/buy/buy_provider_description.dart';
import 'package:cake_wallet/themes/extensions/cake_text_theme.dart';
import 'package:cake_wallet/buy/get_buy_provider_icon.dart'; import 'package:cake_wallet/buy/get_buy_provider_icon.dart';
import 'package:cake_wallet/themes/extensions/order_theme.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:cake_wallet/themes/extensions/dashboard_page_theme.dart';
class OrderRow extends StatelessWidget { class OrderRow extends StatelessWidget {
OrderRow({ OrderRow({
@ -20,7 +23,7 @@ class OrderRow extends StatelessWidget {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
final iconColor = final iconColor =
Theme.of(context).primaryTextTheme!.displayLarge!.backgroundColor!; Theme.of(context).extension<OrderTheme>()!.iconColor;
final providerIcon = getBuyProviderIcon(provider, iconColor: iconColor); final providerIcon = getBuyProviderIcon(provider, iconColor: iconColor);
@ -48,14 +51,14 @@ class OrderRow extends StatelessWidget {
style: TextStyle( style: TextStyle(
fontSize: 16, fontSize: 16,
fontWeight: FontWeight.w500, fontWeight: FontWeight.w500,
color: Theme.of(context).accentTextTheme!.displayMedium!.backgroundColor! color: Theme.of(context).extension<DashboardPageTheme>()!.textColor
)), )),
formattedAmount != null formattedAmount != null
? Text(formattedAmount! + ' ' + to, ? Text(formattedAmount! + ' ' + to,
style: TextStyle( style: TextStyle(
fontSize: 16, fontSize: 16,
fontWeight: FontWeight.w500, fontWeight: FontWeight.w500,
color: Theme.of(context).accentTextTheme!.displayMedium!.backgroundColor! color: Theme.of(context).extension<DashboardPageTheme>()!.textColor
)) ))
: Container() : Container()
]), ]),
@ -66,10 +69,7 @@ class OrderRow extends StatelessWidget {
Text(createdAtFormattedDate, Text(createdAtFormattedDate,
style: TextStyle( style: TextStyle(
fontSize: 14, fontSize: 14,
color: Theme.of(context) color: Theme.of(context).extension<CakeTextTheme>()!.dateSectionRowColor))
.textTheme!
.labelSmall!
.backgroundColor!))
]) ])
], ],
) )

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';
@ -10,22 +11,16 @@ import 'package:cake_wallet/generated/i18n.dart';
class PresentReceiveOptionPicker extends StatelessWidget { class PresentReceiveOptionPicker extends StatelessWidget {
PresentReceiveOptionPicker( PresentReceiveOptionPicker(
{required this.receiveOptionViewModel, this.hasWhiteBackground = false}); {required this.receiveOptionViewModel, required this.color});
final ReceiveOptionViewModel receiveOptionViewModel; final ReceiveOptionViewModel receiveOptionViewModel;
final bool hasWhiteBackground; final Color color;
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
final textIconTheme = hasWhiteBackground
? Theme.of(context)
.accentTextTheme!
.displayMedium!
.backgroundColor!
: Colors.white;
final arrowBottom = Image.asset( final arrowBottom = Image.asset(
'assets/images/arrow_bottom_purple_icon.png', 'assets/images/arrow_bottom_purple_icon.png',
color: textIconTheme, color: color,
height: 6, height: 6,
); );
@ -51,14 +46,14 @@ class PresentReceiveOptionPicker extends StatelessWidget {
fontSize: 18.0, fontSize: 18.0,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
fontFamily: 'Lato', fontFamily: 'Lato',
color: textIconTheme), color: color),
), ),
Observer( Observer(
builder: (_) => Text(receiveOptionViewModel.selectedReceiveOption.toString(), builder: (_) => Text(receiveOptionViewModel.selectedReceiveOption.toString(),
style: TextStyle( style: TextStyle(
fontSize: 10.0, fontSize: 10.0,
fontWeight: FontWeight.w500, fontWeight: FontWeight.w500,
color: textIconTheme))) color: color)))
], ],
), ),
SizedBox(width: 5), SizedBox(width: 5),
@ -113,10 +108,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/sync_indicator_theme.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:cake_wallet/view_model/dashboard/dashboard_view_model.dart'; import 'package:cake_wallet/view_model/dashboard/dashboard_view_model.dart';
import 'package:cake_wallet/core/sync_status_title.dart'; import 'package:cake_wallet/core/sync_status_title.dart';
@ -32,7 +33,7 @@ class SyncIndicator extends StatelessWidget {
child: Container( child: Container(
height: 30, height: 30,
width: syncIndicatorWidth, width: syncIndicatorWidth,
color: Theme.of(context).textTheme!.titleLarge!.decorationColor!, color: Theme.of(context).extension<SyncIndicatorTheme>()!.notSyncedBackgroundColor,
child: Stack( child: Stack(
alignment: Alignment.center, alignment: Alignment.center,
children: <Widget>[ children: <Widget>[
@ -44,7 +45,7 @@ class SyncIndicator extends StatelessWidget {
child: Container( child: Container(
width: indicatorWidth, width: indicatorWidth,
height: 30, height: 30,
color: Theme.of(context).textTheme!.titleLarge!.backgroundColor!, color: Theme.of(context).extension<SyncIndicatorTheme>()!.syncedBackgroundColor,
) )
) )
: Offstage(), : Offstage(),
@ -66,7 +67,7 @@ class SyncIndicator extends StatelessWidget {
style: TextStyle( style: TextStyle(
fontSize: 12, fontSize: 12,
fontWeight: FontWeight.w500, fontWeight: FontWeight.w500,
color: Theme.of(context).textTheme!.titleLarge!.color! color: Theme.of(context).extension<SyncIndicatorTheme>()!.textColor
), ),
), ),
) )

View file

@ -1,3 +1,5 @@
import 'package:cake_wallet/themes/extensions/sync_indicator_theme.dart';
import 'package:cake_wallet/themes/extensions/receive_page_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,7 +28,7 @@ class SyncIndicatorIcon extends StatelessWidget {
if (boolMode) { if (boolMode) {
indicatorColor = isSynced indicatorColor = isSynced
? PaletteDark.brightGreen ? PaletteDark.brightGreen
: Theme.of(context).textTheme!.bodySmall!.color!; : Theme.of(context).extension<SyncIndicatorTheme>()!.notSyncedIconColor;
} else { } else {
switch (value.toLowerCase()) { switch (value.toLowerCase()) {
case waiting: case waiting:
@ -34,7 +36,7 @@ class SyncIndicatorIcon extends StatelessWidget {
break; break;
case actionRequired: case actionRequired:
indicatorColor = indicatorColor =
Theme.of(context).textTheme!.displayMedium!.decorationColor!; Theme.of(context).extension<ReceivePageTheme>()!.currentTileBackgroundColor;
break; break;
case created: case created:
indicatorColor = PaletteDark.brightGreen; indicatorColor = PaletteDark.brightGreen;

View file

@ -1,6 +1,8 @@
import 'package:cake_wallet/themes/extensions/cake_text_theme.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:cw_core/crypto_currency.dart'; import 'package:cw_core/crypto_currency.dart';
import 'package:cake_wallet/exchange/exchange_provider_description.dart'; import 'package:cake_wallet/exchange/exchange_provider_description.dart';
import 'package:cake_wallet/themes/extensions/dashboard_page_theme.dart';
class TradeRow extends StatelessWidget { class TradeRow extends StatelessWidget {
TradeRow({ TradeRow({
@ -43,14 +45,14 @@ class TradeRow extends StatelessWidget {
style: TextStyle( style: TextStyle(
fontSize: 16, fontSize: 16,
fontWeight: FontWeight.w500, fontWeight: FontWeight.w500,
color: Theme.of(context).accentTextTheme!.displayMedium!.backgroundColor!)), color: Theme.of(context).extension<DashboardPageTheme>()!.textColor)),
formattedAmount != null formattedAmount != null
? Text(formattedAmount! + ' ' + amountCrypto, ? Text(formattedAmount! + ' ' + amountCrypto,
style: TextStyle( style: TextStyle(
fontSize: 16, fontSize: 16,
fontWeight: FontWeight.w500, fontWeight: FontWeight.w500,
color: color:
Theme.of(context).accentTextTheme!.displayMedium!.backgroundColor!)) Theme.of(context).extension<DashboardPageTheme>()!.textColor))
: Container() : Container()
]), ]),
SizedBox(height: 5), SizedBox(height: 5),
@ -59,7 +61,7 @@ class TradeRow extends StatelessWidget {
Text(createdAtFormattedDate!, Text(createdAtFormattedDate!,
style: TextStyle( style: TextStyle(
fontSize: 14, fontSize: 14,
color: Theme.of(context).textTheme!.labelSmall!.backgroundColor!)) color: Theme.of(context).extension<CakeTextTheme>()!.dateSectionRowColor))
]) ])
], ],
)) ))

View file

@ -1,5 +1,8 @@
import 'package:cake_wallet/themes/extensions/cake_text_theme.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:cw_core/transaction_direction.dart'; import 'package:cw_core/transaction_direction.dart';
import 'package:cake_wallet/themes/extensions/dashboard_page_theme.dart';
import 'package:cake_wallet/themes/extensions/transaction_trade_theme.dart';
class TransactionRow extends StatelessWidget { class TransactionRow extends StatelessWidget {
TransactionRow( TransactionRow(
@ -35,7 +38,7 @@ class TransactionRow extends StatelessWidget {
width: 36, width: 36,
decoration: BoxDecoration( decoration: BoxDecoration(
shape: BoxShape.circle, shape: BoxShape.circle,
color: Theme.of(context).textTheme!.labelSmall!.decorationColor! color: Theme.of(context).extension<TransactionTradeTheme>()!.rowsColor
), ),
child: Image.asset( child: Image.asset(
direction == TransactionDirection.incoming direction == TransactionDirection.incoming
@ -54,14 +57,12 @@ class TransactionRow extends StatelessWidget {
style: TextStyle( style: TextStyle(
fontSize: 16, fontSize: 16,
fontWeight: FontWeight.w500, fontWeight: FontWeight.w500,
color: Theme.of(context).accentTextTheme! color: Theme.of(context).extension<DashboardPageTheme>()!.textColor)),
.displayMedium!.backgroundColor!)),
Text(formattedAmount, Text(formattedAmount,
style: TextStyle( style: TextStyle(
fontSize: 16, fontSize: 16,
fontWeight: FontWeight.w500, fontWeight: FontWeight.w500,
color: Theme.of(context).accentTextTheme! color: Theme.of(context).extension<DashboardPageTheme>()!.textColor))
.displayMedium!.backgroundColor!))
]), ]),
SizedBox(height: 5), SizedBox(height: 5),
Row( Row(
@ -70,17 +71,11 @@ class TransactionRow extends StatelessWidget {
Text(formattedDate, Text(formattedDate,
style: TextStyle( style: TextStyle(
fontSize: 14, fontSize: 14,
color: Theme.of(context) color: Theme.of(context).extension<CakeTextTheme>()!.dateSectionRowColor)),
.textTheme!
.labelSmall!
.backgroundColor!)),
Text(formattedFiatAmount, Text(formattedFiatAmount,
style: TextStyle( style: TextStyle(
fontSize: 14, fontSize: 14,
color: Theme.of(context) color: Theme.of(context).extension<CakeTextTheme>()!.dateSectionRowColor))
.textTheme!
.labelSmall!
.backgroundColor!))
]) ])
], ],
) )

View file

@ -1,5 +1,6 @@
import 'package:cake_wallet/src/screens/dashboard/widgets/anonpay_transaction_row.dart'; import 'package:cake_wallet/src/screens/dashboard/widgets/anonpay_transaction_row.dart';
import 'package:cake_wallet/src/screens/dashboard/widgets/order_row.dart'; import 'package:cake_wallet/src/screens/dashboard/widgets/order_row.dart';
import 'package:cake_wallet/themes/extensions/placeholder_theme.dart';
import 'package:cake_wallet/src/widgets/dashboard_card_widget.dart'; import 'package:cake_wallet/src/widgets/dashboard_card_widget.dart';
import 'package:cake_wallet/utils/responsive_layout_util.dart'; import 'package:cake_wallet/utils/responsive_layout_util.dart';
import 'package:cake_wallet/view_model/dashboard/anonpay_transaction_list_item.dart'; import 'package:cake_wallet/view_model/dashboard/anonpay_transaction_list_item.dart';
@ -155,10 +156,7 @@ class TransactionsPage extends StatelessWidget {
S.of(context).placeholder_transactions, S.of(context).placeholder_transactions,
style: TextStyle( style: TextStyle(
fontSize: 14, fontSize: 14,
color: Theme.of(context) color: Theme.of(context).extension<PlaceholderTheme>()!.color),
.primaryTextTheme
.labelSmall!
.decorationColor!),
), ),
); );
})) }))

View file

@ -1,6 +1,8 @@
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';
import 'package:cake_wallet/themes/extensions/wallet_list_theme.dart';
import 'package:cake_wallet/utils/show_pop_up.dart'; import 'package:cake_wallet/utils/show_pop_up.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
@ -87,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!),
), ),
) )
], ],
@ -107,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!),
), ),
) )
], ],
@ -126,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!),
)) ))
], ],
), ),
@ -146,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!),
), ),
) )
], ],
@ -167,7 +157,7 @@ class DisclaimerBodyState extends State<DisclaimerPageBody> {
changenowUrl, changenowUrl,
textAlign: TextAlign.left, textAlign: TextAlign.left,
style: TextStyle( style: TextStyle(
color: Palette.blueCraiola, color: Theme.of(context).primaryColor,
fontSize: 14.0, fontSize: 14.0,
fontWeight: FontWeight.normal, fontWeight: FontWeight.normal,
decoration: TextDecoration.underline), decoration: TextDecoration.underline),
@ -193,7 +183,8 @@ class DisclaimerBodyState extends State<DisclaimerPageBody> {
gradient: LinearGradient( gradient: LinearGradient(
colors: [ colors: [
Theme.of(context) Theme.of(context)
.backgroundColor .colorScheme
.background
.withOpacity(0.0), .withOpacity(0.0),
Theme.of(context).colorScheme.background, Theme.of(context).colorScheme.background,
], ],
@ -232,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)),
@ -253,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!),
) )
], ],
), ),
@ -273,14 +258,8 @@ class DisclaimerBodyState extends State<DisclaimerPageBody> {
.popAndPushNamed(Routes.welcome) .popAndPushNamed(Routes.welcome)
: null, : null,
text: 'Accept', text: 'Accept',
color: Theme.of(context) color: Theme.of(context).extension<WalletListTheme>()!.createNewWalletButtonBackgroundColor,
.accentTextTheme! textColor: Theme.of(context).extension<WalletListTheme>()!.restoreWalletButtonTextColor),
.titleSmall!
.decorationColor!,
textColor: Theme.of(context)
.accentTextTheme!
.headlineSmall!
.decorationColor!),
), ),
], ],
], ],

View file

@ -1,8 +1,11 @@
import 'package:cake_wallet/themes/extensions/exchange_page_theme.dart';
import 'package:cake_wallet/themes/extensions/keyboard_theme.dart';
import 'package:cake_wallet/core/auth_service.dart'; import 'package:cake_wallet/core/auth_service.dart';
import 'package:cake_wallet/di.dart'; import 'package:cake_wallet/di.dart';
import 'package:cake_wallet/src/screens/exchange/widgets/desktop_exchange_cards_section.dart'; import 'package:cake_wallet/src/screens/exchange/widgets/desktop_exchange_cards_section.dart';
import 'package:cake_wallet/src/screens/exchange/widgets/mobile_exchange_cards_section.dart'; import 'package:cake_wallet/src/screens/exchange/widgets/mobile_exchange_cards_section.dart';
import 'package:cake_wallet/src/widgets/add_template_button.dart'; import 'package:cake_wallet/src/widgets/add_template_button.dart';
import 'package:cake_wallet/themes/extensions/send_page_theme.dart';
import 'package:cake_wallet/themes/theme_base.dart'; import 'package:cake_wallet/themes/theme_base.dart';
import 'package:cake_wallet/utils/debounce.dart'; import 'package:cake_wallet/utils/debounce.dart';
import 'package:cake_wallet/utils/responsive_layout_util.dart'; import 'package:cake_wallet/utils/responsive_layout_util.dart';
@ -78,7 +81,10 @@ class ExchangePage extends BasePage {
String get title => S.current.exchange; String get title => S.current.exchange;
@override @override
Color get titleColor => Colors.white; bool get gradientBackground => true;
@override
bool get gradientAll => true;
@override @override
bool get resizeToAvoidBottomInset => false; bool get resizeToAvoidBottomInset => false;
@ -115,7 +121,7 @@ class ExchangePage extends BasePage {
Widget? leading(BuildContext context) { Widget? leading(BuildContext context) {
final _backButton = Icon( final _backButton = Icon(
Icons.arrow_back_ios, Icons.arrow_back_ios,
color: titleColor, color: titleColor(context),
size: 16, size: 16,
); );
final _closeButton = final _closeButton =
@ -152,7 +158,7 @@ class ExchangePage extends BasePage {
disableScroll: true, disableScroll: true,
config: KeyboardActionsConfig( config: KeyboardActionsConfig(
keyboardActionsPlatform: KeyboardActionsPlatform.IOS, keyboardActionsPlatform: KeyboardActionsPlatform.IOS,
keyboardBarColor: Theme.of(context).accentTextTheme.bodyLarge!.backgroundColor!, keyboardBarColor: Theme.of(context).extension<KeyboardTheme>()!.keyboardBarColor,
nextFocus: false, nextFocus: false,
actions: [ actions: [
KeyboardActionsItem( KeyboardActionsItem(
@ -205,8 +211,8 @@ class ExchangePage extends BasePage {
textAlign: TextAlign.center, textAlign: TextAlign.center,
style: TextStyle( style: TextStyle(
color: Theme.of(context) color: Theme.of(context)
.primaryTextTheme.displayLarge! .extension<ExchangePageTheme>()!
.decorationColor!, .receiveAmountColor,
fontWeight: FontWeight.w500, fontWeight: FontWeight.w500,
fontSize: 12), fontSize: 12),
), ),
@ -625,7 +631,7 @@ class ExchangePage extends BasePage {
imageArrow: arrowBottomPurple, imageArrow: arrowBottomPurple,
currencyButtonColor: Colors.transparent, currencyButtonColor: Colors.transparent,
addressButtonsColor: Theme.of(context).focusColor, addressButtonsColor: Theme.of(context).focusColor,
borderColor: Theme.of(context).primaryTextTheme.bodyLarge!.color!, borderColor: Theme.of(context).extension<ExchangePageTheme>()!.textFieldBorderTopPanelColor,
currencyValueValidator: (value) { currencyValueValidator: (value) {
return !exchangeViewModel.isFixedRateMode return !exchangeViewModel.isFixedRateMode
? AmountValidator( ? AmountValidator(
@ -673,7 +679,7 @@ class ExchangePage extends BasePage {
imageArrow: arrowBottomCakeGreen, imageArrow: arrowBottomCakeGreen,
currencyButtonColor: Colors.transparent, currencyButtonColor: Colors.transparent,
addressButtonsColor: Theme.of(context).focusColor, addressButtonsColor: Theme.of(context).focusColor,
borderColor: Theme.of(context).primaryTextTheme.bodyLarge!.decorationColor!, borderColor: Theme.of(context).extension<ExchangePageTheme>()!.textFieldBorderBottomPanelColor,
currencyValueValidator: (value) { currencyValueValidator: (value) {
return exchangeViewModel.isFixedRateMode return exchangeViewModel.isFixedRateMode
? AmountValidator( ? AmountValidator(

View file

@ -1,3 +1,5 @@
import 'package:cake_wallet/themes/extensions/exchange_page_theme.dart';
import 'package:cake_wallet/themes/extensions/keyboard_theme.dart';
import 'package:cake_wallet/exchange/exchange_provider.dart'; import 'package:cake_wallet/exchange/exchange_provider.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/keyboard_done_button.dart'; import 'package:cake_wallet/src/widgets/keyboard_done_button.dart';
@ -29,10 +31,10 @@ class ExchangeTemplatePage extends BasePage {
var _isReactionsSet = false; var _isReactionsSet = false;
@override @override
String get title => S.current.exchange_new_template; bool get gradientAll => true;
@override @override
Color get titleColor => Colors.white; String get title => S.current.exchange_new_template;
@override @override
bool get extendBodyBehindAppBar => true; bool get extendBodyBehindAppBar => true;
@ -73,10 +75,7 @@ class ExchangeTemplatePage extends BasePage {
disableScroll: true, disableScroll: true,
config: KeyboardActionsConfig( config: KeyboardActionsConfig(
keyboardActionsPlatform: KeyboardActionsPlatform.IOS, keyboardActionsPlatform: KeyboardActionsPlatform.IOS,
keyboardBarColor: Theme.of(context) keyboardBarColor: Theme.of(context).extension<KeyboardTheme>()!.keyboardBarColor,
.accentTextTheme!
.bodyLarge!
.backgroundColor!,
nextFocus: false, nextFocus: false,
actions: [ actions: [
KeyboardActionsItem( KeyboardActionsItem(
@ -101,8 +100,8 @@ class ExchangeTemplatePage extends BasePage {
), ),
gradient: LinearGradient( gradient: LinearGradient(
colors: [ colors: [
Theme.of(context).primaryTextTheme!.bodyMedium!.color!, Theme.of(context).extension<ExchangePageTheme>()!.firstGradientBottomPanelColor,
Theme.of(context).primaryTextTheme!.bodyMedium!.decorationColor!, Theme.of(context).extension<ExchangePageTheme>()!.secondGradientBottomPanelColor,
], ],
stops: [0.35, 1.0], stops: [0.35, 1.0],
begin: Alignment.topLeft, begin: Alignment.topLeft,
@ -120,12 +119,8 @@ class ExchangeTemplatePage extends BasePage {
), ),
gradient: LinearGradient( gradient: LinearGradient(
colors: [ colors: [
Theme.of(context) Theme.of(context).extension<ExchangePageTheme>()!.firstGradientTopPanelColor,
.primaryTextTheme!.titleSmall! Theme.of(context).extension<ExchangePageTheme>()!.secondGradientTopPanelColor,
.color!,
Theme.of(context)
.primaryTextTheme!.titleSmall!
.decorationColor!,
], ],
begin: Alignment.topLeft, begin: Alignment.topLeft,
end: Alignment.bottomRight), end: Alignment.bottomRight),
@ -157,10 +152,8 @@ class ExchangeTemplatePage extends BasePage {
imageArrow: arrowBottomPurple, imageArrow: arrowBottomPurple,
currencyButtonColor: Colors.transparent, currencyButtonColor: Colors.transparent,
addressButtonsColor: addressButtonsColor:
Theme.of(context).focusColor, Theme.of(context).extension<ExchangePageTheme>()!.textFieldButtonColor,
borderColor: Theme.of(context) borderColor: Theme.of(context).extension<ExchangePageTheme>()!.textFieldBorderBottomPanelColor,
.primaryTextTheme!.bodyLarge!
.color!,
currencyValueValidator: AmountValidator( currencyValueValidator: AmountValidator(
currency: exchangeViewModel.depositCurrency), currency: exchangeViewModel.depositCurrency),
//addressTextFieldValidator: AddressValidator( //addressTextFieldValidator: AddressValidator(
@ -197,10 +190,8 @@ class ExchangeTemplatePage extends BasePage {
imageArrow: arrowBottomCakeGreen, imageArrow: arrowBottomCakeGreen,
currencyButtonColor: Colors.transparent, currencyButtonColor: Colors.transparent,
addressButtonsColor: addressButtonsColor:
Theme.of(context).focusColor, Theme.of(context).extension<ExchangePageTheme>()!.textFieldButtonColor,
borderColor: Theme.of(context) borderColor: Theme.of(context).extension<ExchangePageTheme>()!.textFieldBorderBottomPanelColor,
.primaryTextTheme!.bodyLarge!
.decorationColor!,
currencyValueValidator: AmountValidator( currencyValueValidator: AmountValidator(
currency: exchangeViewModel.receiveCurrency), currency: exchangeViewModel.receiveCurrency),
//addressTextFieldValidator: AddressValidator( //addressTextFieldValidator: AddressValidator(
@ -226,9 +217,7 @@ class ExchangeTemplatePage extends BasePage {
description, description,
textAlign: TextAlign.center, textAlign: TextAlign.center,
style: TextStyle( style: TextStyle(
color: Theme.of(context) color: Theme.of(context).extension<ExchangePageTheme>()!.receiveAmountColor,
.primaryTextTheme!.displayLarge!
.decorationColor!,
fontWeight: FontWeight.w500, fontWeight: FontWeight.w500,
fontSize: 12), fontSize: 12),
), ),
@ -256,7 +245,7 @@ class ExchangeTemplatePage extends BasePage {
} }
}, },
text: S.of(context).save, text: S.of(context).save,
color: Colors.green, color: Theme.of(context).primaryColor,
textColor: Colors.white), textColor: Colors.white),
]), ]),
)) ))
@ -444,4 +433,4 @@ class ExchangeTemplatePage extends BasePage {
key.currentState!.addressController.text = ''; key.currentState!.addressController.text = '';
} }
} }
} }

View file

@ -1,3 +1,5 @@
import 'package:cake_wallet/themes/extensions/cake_text_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';
@ -20,10 +22,7 @@ class PickerItemWidget extends StatelessWidget {
return GestureDetector( return GestureDetector(
onTap: onTap, onTap: onTap,
child: Container( child: Container(
color: Theme.of(context) color: Theme.of(context).dialogTheme.backgroundColor,
.accentTextTheme!
.titleLarge!
.color!,
child: Padding( child: Padding(
padding: const EdgeInsets.symmetric(vertical: 8.0, horizontal: 24), padding: const EdgeInsets.symmetric(vertical: 8.0, horizontal: 24),
child: Row( child: Row(
@ -44,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,
@ -65,19 +61,13 @@ class PickerItemWidget extends StatelessWidget {
style: TextStyle( style: TextStyle(
fontSize: 7.0, fontSize: 7.0,
fontFamily: 'Lato', fontFamily: 'Lato',
color: Theme.of(context) color: Theme.of(context).extension<CakeScrollbarTheme>()!.thumbColor),
.textTheme!
.bodyMedium!
.color!),
), ),
), ),
decoration: BoxDecoration( decoration: BoxDecoration(
borderRadius: BorderRadius.circular(6.0), borderRadius: BorderRadius.circular(6.0),
//border: Border.all(color: ), //border: Border.all(color: ),
color: Theme.of(context) color: Theme.of(context).extension<CakeScrollbarTheme>()!.trackColor,
.textTheme!
.bodyMedium!
.decorationColor!,
), ),
), ),
), ),
@ -86,10 +76,7 @@ class PickerItemWidget extends StatelessWidget {
), ),
if (isSelected) if (isSelected)
Icon(Icons.check_circle, Icon(Icons.check_circle,
color: Theme.of(context) color: Theme.of(context).primaryColor)
.accentTextTheme!
.bodyLarge!
.color!)
], ],
), ),
), ),

View file

@ -1,3 +1,4 @@
import 'package:cake_wallet/themes/extensions/picker_theme.dart';
import 'package:cw_core/currency.dart'; import 'package:cw_core/currency.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'currency_picker_item_widget.dart'; import 'currency_picker_item_widget.dart';
@ -20,10 +21,7 @@ class CurrencyPickerWidget extends StatelessWidget {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Container( return Container(
color: Theme.of(context) color: Theme.of(context).extension<PickerTheme>()!.dividerColor,
.accentTextTheme!
.titleLarge!
.backgroundColor!,
child: Scrollbar( child: Scrollbar(
controller: _scrollController, controller: _scrollController,
child: GridView.builder( child: GridView.builder(

View file

@ -1,6 +1,8 @@
import 'package:cake_wallet/entities/contact_base.dart'; import 'package:cake_wallet/entities/contact_base.dart';
import 'package:cake_wallet/themes/extensions/qr_code_theme.dart';
import 'package:cake_wallet/routes.dart'; import 'package:cake_wallet/routes.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/themes/extensions/exchange_page_theme.dart';
import 'package:cake_wallet/utils/show_bar.dart'; import 'package:cake_wallet/utils/show_bar.dart';
import 'package:cake_wallet/utils/show_pop_up.dart'; import 'package:cake_wallet/utils/show_pop_up.dart';
import 'package:cake_wallet/utils/payment_request.dart'; import 'package:cake_wallet/utils/payment_request.dart';
@ -12,6 +14,7 @@ import 'package:cw_core/crypto_currency.dart';
import 'package:cake_wallet/src/widgets/address_text_field.dart'; import 'package:cake_wallet/src/widgets/address_text_field.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/send_page_theme.dart';
class ExchangeCard extends StatefulWidget { class ExchangeCard extends StatefulWidget {
ExchangeCard( ExchangeCard(
@ -160,7 +163,7 @@ class ExchangeCardState extends State<ExchangeCard> {
final copyImage = Image.asset('assets/images/copy_content.png', final copyImage = Image.asset('assets/images/copy_content.png',
height: 16, height: 16,
width: 16, width: 16,
color: Theme.of(context).primaryTextTheme!.displaySmall!.color!); color: Theme.of(context).extension<SendPageTheme>()!.estimatedFeeColor);
return Container( return Container(
width: double.infinity, width: double.infinity,
@ -175,7 +178,7 @@ class ExchangeCardState extends State<ExchangeCard> {
style: TextStyle( style: TextStyle(
fontSize: 18, fontSize: 18,
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
color: Theme.of(context).textTheme!.headlineSmall!.color!), color: Theme.of(context).extension<QRCodeTheme>()!.qrCodeColor),
) )
], ],
), ),
@ -211,10 +214,7 @@ class ExchangeCardState extends State<ExchangeCard> {
height: 32, height: 32,
decoration: BoxDecoration( decoration: BoxDecoration(
color: widget.addressButtonsColor ?? color: widget.addressButtonsColor ??
Theme.of(context) Theme.of(context).extension<SendPageTheme>()!.textFieldButtonColor,
.primaryTextTheme!
.headlineMedium!
.color!,
borderRadius: borderRadius:
BorderRadius.all(Radius.circular(6))), BorderRadius.all(Radius.circular(6))),
child: Center( child: Center(
@ -224,10 +224,7 @@ class ExchangeCardState extends State<ExchangeCard> {
style: TextStyle( style: TextStyle(
fontSize: 12, fontSize: 12,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
color: Theme.of(context) color: Theme.of(context).extension<SendPageTheme>()!.textFieldButtonIconColor)),
.primaryTextTheme!
.headlineMedium!
.decorationColor!)),
), ),
), ),
), ),
@ -268,10 +265,7 @@ class ExchangeCardState extends State<ExchangeCard> {
placeholderTextStyle: TextStyle( placeholderTextStyle: TextStyle(
fontSize: 16, fontSize: 16,
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
color: Theme.of(context) color: Theme.of(context).extension<ExchangePageTheme>()!.hintTextColor),
.accentTextTheme!
.displayLarge!
.decorationColor!),
validator: _isAmountEditable validator: _isAmountEditable
? widget.currencyValueValidator ? widget.currencyValueValidator
: null), : null),
@ -282,10 +276,7 @@ class ExchangeCardState extends State<ExchangeCard> {
height: 32, height: 32,
width: 32, width: 32,
decoration: BoxDecoration( decoration: BoxDecoration(
color: Theme.of(context) color: Theme.of(context).extension<SendPageTheme>()!.textFieldButtonColor,
.primaryTextTheme!
.headlineMedium!
.color!,
borderRadius: borderRadius:
BorderRadius.all(Radius.circular(6))), BorderRadius.all(Radius.circular(6))),
child: InkWell( child: InkWell(
@ -296,10 +287,7 @@ class ExchangeCardState extends State<ExchangeCard> {
style: TextStyle( style: TextStyle(
fontSize: 12, fontSize: 12,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
color: Theme.of(context) color: Theme.of(context).extension<SendPageTheme>()!.textFieldButtonIconColor)),
.primaryTextTheme!
.headlineMedium!
.decorationColor!)),
), ),
), ),
) )
@ -310,10 +298,7 @@ class ExchangeCardState extends State<ExchangeCard> {
)), )),
Divider( Divider(
height: 1, height: 1,
color: Theme.of(context) color: Theme.of(context).extension<SendPageTheme>()!.textFieldHintColor),
.primaryTextTheme!
.headlineSmall!
.decorationColor!),
Padding( Padding(
padding: EdgeInsets.only(top: 5), padding: EdgeInsets.only(top: 5),
child: Container( child: Container(
@ -329,10 +314,7 @@ class ExchangeCardState extends State<ExchangeCard> {
style: TextStyle( style: TextStyle(
fontSize: 10, fontSize: 10,
height: 1.2, height: 1.2,
color: Theme.of(context) color: Theme.of(context).extension<ExchangePageTheme>()!.hintTextColor),
.accentTextTheme!
.displayLarge!
.decorationColor!),
) )
: Offstage(), : Offstage(),
_min != null ? SizedBox(width: 10) : Offstage(), _min != null ? SizedBox(width: 10) : Offstage(),
@ -344,10 +326,7 @@ class ExchangeCardState extends State<ExchangeCard> {
style: TextStyle( style: TextStyle(
fontSize: 10, fontSize: 10,
height: 1.2, height: 1.2,
color: Theme.of(context) color: Theme.of(context).extension<ExchangePageTheme>()!.hintTextColor))
.accentTextTheme!
.displayLarge!
.decorationColor!))
: Offstage(), : Offstage(),
])), ])),
), ),
@ -359,10 +338,7 @@ class ExchangeCardState extends State<ExchangeCard> {
style: TextStyle( style: TextStyle(
fontSize: 14, fontSize: 14,
fontWeight: FontWeight.w500, fontWeight: FontWeight.w500,
color: Theme.of(context) color: Theme.of(context).extension<ExchangePageTheme>()!.hintTextColor),
.accentTextTheme!
.displayLarge!
.decorationColor!),
)) ))
: Offstage(), : Offstage(),
_isAddressEditable _isAddressEditable
@ -400,10 +376,7 @@ class ExchangeCardState extends State<ExchangeCard> {
hintStyle: TextStyle( hintStyle: TextStyle(
fontSize: 16, fontSize: 16,
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
color: Theme.of(context) color: Theme.of(context).extension<ExchangePageTheme>()!.hintTextColor),
.accentTextTheme!
.displayLarge!
.decorationColor!),
buttonColor: widget.addressButtonsColor, buttonColor: widget.addressButtonsColor,
validator: widget.addressTextFieldValidator, validator: widget.addressTextFieldValidator,
onPushPasteButton: widget.onPushPasteButton, onPushPasteButton: widget.onPushPasteButton,
@ -472,10 +445,7 @@ class ExchangeCardState extends State<ExchangeCard> {
6))), 6))),
child: Image.asset( child: Image.asset(
'assets/images/open_book.png', 'assets/images/open_book.png',
color: Theme.of(context) color: Theme.of(context).extension<SendPageTheme>()!.textFieldButtonIconColor,
.primaryTextTheme!
.headlineMedium!
.decorationColor!,
)), )),
)), )),
), ),

View file

@ -1,3 +1,4 @@
import 'package:cake_wallet/themes/extensions/exchange_page_theme.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
class MobileExchangeCardsSection extends StatelessWidget { class MobileExchangeCardsSection extends StatelessWidget {
@ -21,8 +22,8 @@ class MobileExchangeCardsSection extends StatelessWidget {
), ),
gradient: LinearGradient( gradient: LinearGradient(
colors: [ colors: [
Theme.of(context).primaryTextTheme!.bodyMedium!.color!, Theme.of(context).extension<ExchangePageTheme>()!.firstGradientBottomPanelColor,
Theme.of(context).primaryTextTheme!.bodyMedium!.decorationColor!, Theme.of(context).extension<ExchangePageTheme>()!.secondGradientBottomPanelColor,
], ],
stops: [0.35, 1.0], stops: [0.35, 1.0],
begin: Alignment.topLeft, begin: Alignment.topLeft,
@ -37,11 +38,8 @@ class MobileExchangeCardsSection extends StatelessWidget {
bottomLeft: Radius.circular(24), bottomRight: Radius.circular(24)), bottomLeft: Radius.circular(24), bottomRight: Radius.circular(24)),
gradient: LinearGradient( gradient: LinearGradient(
colors: [ colors: [
Theme.of(context).primaryTextTheme!.titleSmall!.color!, Theme.of(context).extension<ExchangePageTheme>()!.firstGradientTopPanelColor,
Theme.of(context) Theme.of(context).extension<ExchangePageTheme>()!.secondGradientTopPanelColor,
.primaryTextTheme!
.titleSmall!
.decorationColor!,
], ],
begin: Alignment.topLeft, begin: Alignment.topLeft,
end: Alignment.bottomRight, end: Alignment.bottomRight,

View file

@ -1,4 +1,5 @@
import 'package:cake_wallet/src/widgets/alert_with_one_action.dart'; import 'package:cake_wallet/src/widgets/alert_with_one_action.dart';
import 'package:cake_wallet/themes/extensions/qr_code_theme.dart';
import 'package:cake_wallet/src/widgets/check_box_picker.dart'; import 'package:cake_wallet/src/widgets/check_box_picker.dart';
import 'package:cake_wallet/utils/show_pop_up.dart'; import 'package:cake_wallet/utils/show_pop_up.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
@ -49,10 +50,7 @@ class PresentProviderPicker extends StatelessWidget {
style: TextStyle( style: TextStyle(
fontSize: 10.0, fontSize: 10.0,
fontWeight: FontWeight.w500, fontWeight: FontWeight.w500,
color: Theme.of(context) color: Theme.of(context).extension<QRCodeTheme>()!.qrCodeColor)))
.textTheme!
.headlineSmall!
.color!)))
], ],
), ),
SizedBox(width: 5), SizedBox(width: 5),

View file

@ -1,5 +1,7 @@
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/utils/show_bar.dart'; import 'package:cake_wallet/utils/show_bar.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
@ -9,6 +11,7 @@ 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';
import 'package:cake_wallet/src/screens/base_page.dart'; import 'package:cake_wallet/src/screens/base_page.dart';
import 'package:cake_wallet/exchange/trade.dart'; import 'package:cake_wallet/exchange/trade.dart';
import 'package:cake_wallet/themes/extensions/transaction_trade_theme.dart';
class ExchangeConfirmPage extends BasePage { class ExchangeConfirmPage extends BasePage {
ExchangeConfirmPage({required this.tradesStore}) : trade = tradesStore.trade!; ExchangeConfirmPage({required this.tradesStore}) : trade = tradesStore.trade!;
@ -36,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(
@ -48,14 +48,8 @@ class ExchangeConfirmPage extends BasePage {
borderRadius: BorderRadius.all(Radius.circular(30)), borderRadius: BorderRadius.all(Radius.circular(30)),
border: Border.all( border: Border.all(
width: 1, width: 1,
color: Theme.of(context) color: Theme.of(context).cardColor),
.accentTextTheme! color: Theme.of(context).dialogTheme.backgroundColor),
.bodySmall!
.color!),
color: Theme.of(context)
.accentTextTheme!
.titleLarge!
.color!),
child: Column( child: Column(
children: <Widget>[ children: <Widget>[
Expanded( Expanded(
@ -70,10 +64,7 @@ class ExchangeConfirmPage extends BasePage {
style: TextStyle( style: TextStyle(
fontSize: 12.0, fontSize: 12.0,
fontWeight: FontWeight.w500, fontWeight: FontWeight.w500,
color: Theme.of(context) color: Theme.of(context).extension<TransactionTradeTheme>()!.detailsTitlesColor),
.primaryTextTheme!
.labelSmall!
.color!),
), ),
Text( Text(
trade.id, trade.id,
@ -82,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!),
), ),
], ],
), ),
@ -100,14 +88,8 @@ class ExchangeConfirmPage extends BasePage {
context, S.of(context).copied_to_clipboard); context, S.of(context).copied_to_clipboard);
}, },
text: S.of(context).copy_id, text: S.of(context).copy_id,
color: Theme.of(context) color: Theme.of(context).extension<ExchangePageTheme>()!.buttonBackgroundColor,
.accentTextTheme! textColor: Theme.of(context).extension<CakeTextTheme>()!.titleColor),
.bodySmall!
.backgroundColor!,
textColor: Theme.of(context)
.primaryTextTheme!
.titleLarge!
.color!),
), ),
) )
], ],
@ -136,10 +118,7 @@ class ExchangeConfirmPage extends BasePage {
onPressed: () => Navigator.of(context) onPressed: () => Navigator.of(context)
.pushReplacementNamed(Routes.exchangeTrade), .pushReplacementNamed(Routes.exchangeTrade),
text: S.of(context).saved_the_trade_id, text: S.of(context).saved_the_trade_id,
color: Theme.of(context) color: Theme.of(context).primaryColor,
.accentTextTheme!
.bodyLarge!
.color!,
textColor: Colors.white) textColor: Colors.white)
], ],
), ),

View file

@ -1,4 +1,6 @@
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/utils/request_review_handler.dart'; import 'package:cake_wallet/utils/request_review_handler.dart';
import 'package:mobx/mobx.dart'; import 'package:mobx/mobx.dart';
import 'package:flutter_mobx/flutter_mobx.dart'; import 'package:flutter_mobx/flutter_mobx.dart';
@ -20,6 +22,7 @@ import 'package:cake_wallet/src/screens/exchange_trade/widgets/timer_widget.dart
import 'package:cake_wallet/src/widgets/primary_button.dart'; import 'package:cake_wallet/src/widgets/primary_button.dart';
import 'package:cake_wallet/src/widgets/scollable_with_bottom_section.dart'; import 'package:cake_wallet/src/widgets/scollable_with_bottom_section.dart';
import 'package:cake_wallet/src/widgets/alert_with_one_action.dart'; import 'package:cake_wallet/src/widgets/alert_with_one_action.dart';
import 'package:cake_wallet/themes/extensions/transaction_trade_theme.dart';
void showInformation( void showInformation(
ExchangeTradeViewModel exchangeTradeViewModel, BuildContext context) { ExchangeTradeViewModel exchangeTradeViewModel, BuildContext context) {
@ -51,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,
@ -111,7 +114,7 @@ class ExchangeTradeState extends State<ExchangeTradeForm> {
final copyImage = Image.asset('assets/images/copy_content.png', final copyImage = Image.asset('assets/images/copy_content.png',
height: 16, height: 16,
width: 16, width: 16,
color: Theme.of(context).primaryTextTheme!.labelSmall!.color!); color: Theme.of(context).extension<TransactionTradeTheme>()!.detailsTitlesColor);
_setEffects(); _setEffects();
@ -133,17 +136,11 @@ class ExchangeTradeState extends State<ExchangeTradeForm> {
style: TextStyle( style: TextStyle(
fontSize: 14.0, fontSize: 14.0,
fontWeight: FontWeight.w500, fontWeight: FontWeight.w500,
color: Theme.of(context) color: Theme.of(context).extension<TransactionTradeTheme>()!.detailsTitlesColor),
.primaryTextTheme!
.labelSmall!
.color!),
), ),
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(
@ -160,10 +157,7 @@ class ExchangeTradeState extends State<ExchangeTradeForm> {
decoration: BoxDecoration( decoration: BoxDecoration(
border: Border.all( border: Border.all(
width: 3, width: 3,
color: Theme.of(context) color: Theme.of(context).extension<ExchangePageTheme>()!.qrCodeColor
.accentTextTheme!
.titleSmall!
.color!
) )
), ),
child: QrImage(data: trade.inputAddress ?? fetchingLabel), child: QrImage(data: trade.inputAddress ?? fetchingLabel),
@ -179,10 +173,7 @@ class ExchangeTradeState extends State<ExchangeTradeForm> {
itemCount: widget.exchangeTradeViewModel.items.length, itemCount: widget.exchangeTradeViewModel.items.length,
separatorBuilder: (context, index) => Container( separatorBuilder: (context, index) => Container(
height: 1, height: 1,
color: Theme.of(context) color: Theme.of(context).extension<ExchangePageTheme>()!.dividerCodeColor,
.accentTextTheme!
.titleSmall!
.backgroundColor!,
), ),
itemBuilder: (context, index) { itemBuilder: (context, index) {
final item = widget.exchangeTradeViewModel.items[index]; final item = widget.exchangeTradeViewModel.items[index];
@ -228,10 +219,7 @@ class ExchangeTradeState extends State<ExchangeTradeForm> {
onPressed: () => onPressed: () =>
widget.exchangeTradeViewModel.confirmSending(), widget.exchangeTradeViewModel.confirmSending(),
text: S.of(context).confirm, text: S.of(context).confirm,
color: Theme.of(context) color: Theme.of(context).primaryColor,
.accentTextTheme!
.bodyLarge!
.color!,
textColor: Colors.white) textColor: Colors.white)
: Offstage(); : Offstage();
})), })),
@ -321,7 +309,7 @@ class ExchangeTradeState extends State<ExchangeTradeForm> {
return Stack( return Stack(
children: <Widget>[ children: <Widget>[
Container( Container(
color: Theme.of(popupContext).backgroundColor, color: Theme.of(popupContext).colorScheme.background,
child: Center( child: Center(
child: Image.asset( child: Image.asset(
'assets/images/birthday_cake.png'), 'assets/images/birthday_cake.png'),
@ -341,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,
), ),
), ),
@ -360,10 +345,7 @@ class ExchangeTradeState extends State<ExchangeTradeForm> {
RequestReviewHandler.requestReview(); RequestReviewHandler.requestReview();
}, },
text: S.of(popupContext).got_it, text: S.of(popupContext).got_it,
color: Theme.of(popupContext) color: Theme.of(popupContext).primaryColor,
.accentTextTheme!
.bodyLarge!
.color!,
textColor: Colors.white)) textColor: Colors.white))
], ],
); );
@ -372,7 +354,7 @@ class ExchangeTradeState extends State<ExchangeTradeForm> {
return Stack( return Stack(
children: <Widget>[ children: <Widget>[
Container( Container(
color: Theme.of(popupContext).backgroundColor, color: Theme.of(popupContext).colorScheme.background,
child: Center( child: Center(
child: Image.asset( child: Image.asset(
'assets/images/birthday_cake.png'), 'assets/images/birthday_cake.png'),
@ -384,7 +366,8 @@ class ExchangeTradeState extends State<ExchangeTradeForm> {
child: Container( child: Container(
decoration: BoxDecoration( decoration: BoxDecoration(
color: Theme.of(popupContext) color: Theme.of(popupContext)
.backgroundColor .colorScheme
.background
.withOpacity(0.25)), .withOpacity(0.25)),
child: Center( child: Center(
child: Padding( child: Padding(
@ -395,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,9 +1,13 @@
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';
import 'package:cake_wallet/themes/extensions/exchange_page_theme.dart';
import 'package:cake_wallet/themes/extensions/info_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/src/widgets/alert_background.dart'; import 'package:cake_wallet/src/widgets/alert_background.dart';
import 'package:cake_wallet/themes/extensions/menu_theme.dart';
class InformationPage extends StatelessWidget { class InformationPage extends StatelessWidget {
InformationPage({required this.information}); InformationPage({required this.information});
@ -21,7 +25,7 @@ class InformationPage extends StatelessWidget {
), ),
decoration: BoxDecoration( decoration: BoxDecoration(
borderRadius: BorderRadius.all(Radius.circular(30)), borderRadius: BorderRadius.all(Radius.circular(30)),
color: Theme.of(context).textTheme!.bodyLarge!.decorationColor! color: Theme.of(context).extension<CakeMenuTheme>()!.backgroundColor
), ),
child: Column( child: Column(
mainAxisSize: MainAxisSize.min, mainAxisSize: MainAxisSize.min,
@ -36,7 +40,7 @@ class InformationPage extends StatelessWidget {
fontWeight: FontWeight.normal, fontWeight: FontWeight.normal,
fontFamily: 'Lato', fontFamily: 'Lato',
decoration: TextDecoration.none, decoration: TextDecoration.none,
color: Theme.of(context).accentTextTheme!.bodySmall!.decorationColor! color: Theme.of(context).extension<InfoTheme>()!.textColor
), ),
), ),
), ),
@ -45,8 +49,8 @@ class InformationPage extends StatelessWidget {
child: PrimaryButton( child: PrimaryButton(
onPressed: () => Navigator.of(context).pop(), onPressed: () => Navigator.of(context).pop(),
text: S.of(context).got_it, text: S.of(context).got_it,
color: Theme.of(context).accentTextTheme!.bodySmall!.backgroundColor!, 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,10 +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) color: Theme.of(context).extension<CakeTextTheme>()!.titleColor,
.accentTextTheme!
.displayLarge!
.backgroundColor!,
), ),
); );
} }
@ -84,10 +82,7 @@ class IoniaCreateAccountPage extends BasePage {
onPressed: _createAccount, onPressed: _createAccount,
isLoading: isLoading:
_authViewModel.createUserState is IoniaCreateStateLoading, _authViewModel.createUserState is IoniaCreateStateLoading,
color: Theme.of(context) color: Theme.of(context).primaryColor,
.accentTextTheme!
.bodyLarge!
.color!,
textColor: Colors.white, textColor: Colors.white,
), ),
), ),
@ -107,10 +102,7 @@ class IoniaCreateAccountPage extends BasePage {
TextSpan( TextSpan(
text: S.of(context).settings_terms_and_conditions, text: S.of(context).settings_terms_and_conditions,
style: TextStyle( style: TextStyle(
color: Theme.of(context) color: Theme.of(context).primaryColor,
.accentTextTheme!
.bodyLarge!
.color!,
fontWeight: FontWeight.w700, fontWeight: FontWeight.w700,
), ),
recognizer: TapGestureRecognizer() recognizer: TapGestureRecognizer()
@ -122,10 +114,7 @@ class IoniaCreateAccountPage extends BasePage {
TextSpan( TextSpan(
text: S.of(context).privacy_policy, text: S.of(context).privacy_policy,
style: TextStyle( style: TextStyle(
color: Theme.of(context) color: Theme.of(context).primaryColor,
.accentTextTheme!
.bodyLarge!
.color!,
fontWeight: FontWeight.w700, fontWeight: FontWeight.w700,
), ),
recognizer: TapGestureRecognizer() recognizer: TapGestureRecognizer()

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,10 +34,7 @@ class IoniaLoginPage extends BasePage {
return Text( return Text(
S.current.login, S.current.login,
style: textMediumSemiBold( style: textMediumSemiBold(
color: Theme.of(context) color: Theme.of(context).extension<CakeTextTheme>()!.titleColor,
.accentTextTheme!
.displayLarge!
.backgroundColor!,
), ),
); );
} }
@ -74,10 +72,7 @@ class IoniaLoginPage extends BasePage {
text: S.of(context).login, text: S.of(context).login,
onPressed: _login, onPressed: _login,
isLoading: _authViewModel.signInState is IoniaCreateStateLoading, isLoading: _authViewModel.signInState is IoniaCreateStateLoading,
color: Theme.of(context) color: Theme.of(context).primaryColor,
.accentTextTheme!
.bodyLarge!
.color!,
textColor: Colors.white, textColor: Colors.white,
), ),
), ),

View file

@ -1,3 +1,5 @@
import 'package:cake_wallet/themes/extensions/cake_text_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';
import 'package:cake_wallet/routes.dart'; import 'package:cake_wallet/routes.dart';
@ -41,10 +43,7 @@ class IoniaVerifyIoniaOtp extends BasePage {
return Text( return Text(
S.current.verification, S.current.verification,
style: textMediumSemiBold( style: textMediumSemiBold(
color: Theme.of(context) color: Theme.of(context).extension<CakeTextTheme>()!.titleColor,
.accentTextTheme!
.displayLarge!
.backgroundColor!,
), ),
); );
} }
@ -65,10 +64,7 @@ class IoniaVerifyIoniaOtp extends BasePage {
return KeyboardActions( return KeyboardActions(
config: KeyboardActionsConfig( config: KeyboardActionsConfig(
keyboardActionsPlatform: KeyboardActionsPlatform.IOS, keyboardActionsPlatform: KeyboardActionsPlatform.IOS,
keyboardBarColor: Theme.of(context) keyboardBarColor: Theme.of(context).extension<KeyboardTheme>()!.keyboardBarColor,
.accentTextTheme!
.bodyLarge!
.backgroundColor!,
nextFocus: false, nextFocus: false,
actions: [ actions: [
KeyboardActionsItem( KeyboardActionsItem(
@ -126,10 +122,7 @@ class IoniaVerifyIoniaOtp extends BasePage {
onPressed: _verify, onPressed: _verify,
isDisabled: _authViewModel.otpState is IoniaOtpSendDisabled, isDisabled: _authViewModel.otpState is IoniaOtpSendDisabled,
isLoading: _authViewModel.otpState is IoniaOtpValidating, isLoading: _authViewModel.otpState is IoniaOtpValidating,
color: Theme.of(context) color: Theme.of(context).primaryColor,
.accentTextTheme!
.bodyLarge!
.color!,
textColor: Colors.white, textColor: Colors.white,
), ),
), ),

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,10 +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) color: Theme.of(context).extension<CakeTextTheme>()!.titleColor,
.accentTextTheme!
.displayLarge!
.backgroundColor!,
), ),
); );
} }
@ -38,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),
@ -48,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,
), ),
), ),
], ],
@ -59,10 +57,7 @@ class IoniaWelcomePage extends BasePage {
PrimaryButton( PrimaryButton(
text: S.of(context).create_account, text: S.of(context).create_account,
onPressed: () => Navigator.of(context).pushNamed(Routes.ioniaCreateAccountPage), onPressed: () => Navigator.of(context).pushNamed(Routes.ioniaCreateAccountPage),
color: Theme.of(context) color: Theme.of(context).primaryColor,
.accentTextTheme!
.bodyLarge!
.color!,
textColor: Colors.white, textColor: Colors.white,
), ),
SizedBox( SizedBox(
@ -74,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,14 +1,19 @@
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';
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';
import 'package:cake_wallet/themes/extensions/exchange_page_theme.dart';
import 'package:cake_wallet/themes/extensions/order_theme.dart';
import 'package:cake_wallet/typography.dart'; import 'package:cake_wallet/typography.dart';
import 'package:cake_wallet/view_model/ionia/ionia_account_view_model.dart'; import 'package:cake_wallet/view_model/ionia/ionia_account_view_model.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:flutter_mobx/flutter_mobx.dart'; import 'package:flutter_mobx/flutter_mobx.dart';
import 'package:cake_wallet/themes/extensions/dashboard_page_theme.dart';
import 'package:cake_wallet/themes/extensions/transaction_trade_theme.dart';
class IoniaAccountCardsPage extends BasePage { class IoniaAccountCardsPage extends BasePage {
IoniaAccountCardsPage(this.ioniaAccountViewModel); IoniaAccountCardsPage(this.ioniaAccountViewModel);
@ -20,10 +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) color: Theme.of(context).extension<CakeTextTheme>()!.titleColor,
.accentTextTheme!
.displayLarge!
.backgroundColor!,
), ),
); );
} }
@ -72,10 +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) color: Theme.of(context).extension<CakeTextTheme>()!.titleColor
.accentTextTheme!
.displayLarge!
.backgroundColor!
.withOpacity(0.1), .withOpacity(0.1),
borderRadius: BorderRadius.circular( borderRadius: BorderRadius.circular(
25.0, 25.0,
@ -89,17 +88,11 @@ class _IoniaCardTabsState extends State<_IoniaCardTabs> with SingleTickerProvide
borderRadius: BorderRadius.circular( borderRadius: BorderRadius.circular(
25.0, 25.0,
), ),
color: Theme.of(context) color: Theme.of(context).primaryColor,
.accentTextTheme!
.bodyLarge!
.color!,
), ),
labelColor: Theme.of(context) labelColor: Theme.of(context).extension<OrderTheme>()!.iconColor,
.primaryTextTheme!
.displayLarge!
.backgroundColor!,
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,
@ -169,12 +162,9 @@ class _IoniaCardListView extends StatelessWidget {
if(isLoading){ if(isLoading){
return Center( return Center(
child: CircularProgressIndicator( child: CircularProgressIndicator(
backgroundColor: Theme.of(context) backgroundColor: Theme.of(context).extension<DashboardPageTheme>()!.textColor,
.accentTextTheme!
.displayMedium!
.backgroundColor!,
valueColor: AlwaysStoppedAnimation<Color>( valueColor: AlwaysStoppedAnimation<Color>(
Theme.of(context).primaryTextTheme!.bodyMedium!.color!), Theme.of(context).extension<ExchangePageTheme>()!.firstGradientBottomPanelColor),
), ),
); );
} }
@ -184,7 +174,7 @@ class _IoniaCardListView extends StatelessWidget {
emptyText, emptyText,
textAlign: TextAlign.center, textAlign: TextAlign.center,
style: textSmall( style: textSmall(
color: Theme.of(context).primaryTextTheme!.labelSmall!.color!, color: Theme.of(context).extension<TransactionTradeTheme>()!.detailsTitlesColor,
), ),
), ),
) )
@ -197,18 +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) backgroundColor: Theme.of(context).extension<CakeTextTheme>()!.titleColor
.accentTextTheme!
.displayLarge!
.backgroundColor!
.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) titleColor: Theme.of(context).extension<CakeTextTheme>()!.titleColor,
.accentTextTheme!
.displayLarge!
.backgroundColor!,
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';
@ -8,6 +9,7 @@ import 'package:cake_wallet/typography.dart';
import 'package:cake_wallet/view_model/ionia/ionia_account_view_model.dart'; import 'package:cake_wallet/view_model/ionia/ionia_account_view_model.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_mobx/flutter_mobx.dart'; import 'package:flutter_mobx/flutter_mobx.dart';
import 'package:cake_wallet/themes/extensions/send_page_theme.dart';
class IoniaAccountPage extends BasePage { class IoniaAccountPage extends BasePage {
IoniaAccountPage(this.ioniaAccountViewModel); IoniaAccountPage(this.ioniaAccountViewModel);
@ -19,10 +21,7 @@ class IoniaAccountPage extends BasePage {
return Text( return Text(
S.current.account, S.current.account,
style: textMediumSemiBold( style: textMediumSemiBold(
color: Theme.of(context) color: Theme.of(context).extension<CakeTextTheme>()!.titleColor,
.accentTextTheme!
.displayLarge!
.backgroundColor!,
), ),
); );
} }
@ -136,10 +135,7 @@ class IoniaAccountPage extends BasePage {
bottomSection: Column( bottomSection: Column(
children: [ children: [
PrimaryButton( PrimaryButton(
color: Theme.of(context) color: Theme.of(context).primaryColor,
.accentTextTheme!
.bodyLarge!
.color!,
textColor: Colors.white, textColor: Colors.white,
text: S.of(context).logout, text: S.of(context).logout,
onPressed: () { onPressed: () {
@ -170,8 +166,8 @@ class _GradiantContainer extends StatelessWidget {
borderRadius: BorderRadius.circular(15), borderRadius: BorderRadius.circular(15),
gradient: LinearGradient( gradient: LinearGradient(
colors: [ colors: [
Theme.of(context).primaryTextTheme!.titleMedium!.decorationColor!, Theme.of(context).extension<SendPageTheme>()!.secondGradientColor,
Theme.of(context).primaryTextTheme!.titleMedium!.color!, Theme.of(context).extension<SendPageTheme>()!.firstGradientColor,
], ],
begin: Alignment.topRight, begin: Alignment.topRight,
end: Alignment.bottomLeft, end: Alignment.bottomLeft,

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,10 +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) color: Theme.of(context).extension<CakeTextTheme>()!.titleColor,
.accentTextTheme!
.displayLarge!
.backgroundColor!,
), ),
); );
} }
@ -79,10 +77,7 @@ class IoniaActivateDebitCardPage extends BasePage {
}, },
isLoading: _cardsListViewModel.createCardState is IoniaCreateCardLoading, isLoading: _cardsListViewModel.createCardState is IoniaCreateCardLoading,
text: S.of(context).agree_and_continue, text: S.of(context).agree_and_continue,
color: Theme.of(context) color: Theme.of(context).primaryColor,
.accentTextTheme!
.bodyLarge!
.color!,
textColor: Colors.white, textColor: Colors.white,
), ),
); );

View file

@ -1,4 +1,6 @@
import 'package:cake_wallet/core/execution_state.dart'; import 'package:cake_wallet/core/execution_state.dart';
import 'package:cake_wallet/themes/extensions/receive_page_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/ionia/ionia_tip.dart'; import 'package:cake_wallet/ionia/ionia_tip.dart';
import 'package:cake_wallet/palette.dart'; import 'package:cake_wallet/palette.dart';
@ -9,6 +11,7 @@ import 'package:cake_wallet/src/widgets/alert_with_one_action.dart';
import 'package:cake_wallet/src/widgets/discount_badge.dart'; import 'package:cake_wallet/src/widgets/discount_badge.dart';
import 'package:cake_wallet/src/widgets/primary_button.dart'; import 'package:cake_wallet/src/widgets/primary_button.dart';
import 'package:cake_wallet/src/widgets/scollable_with_bottom_section.dart'; import 'package:cake_wallet/src/widgets/scollable_with_bottom_section.dart';
import 'package:cake_wallet/themes/extensions/exchange_page_theme.dart';
import 'package:cake_wallet/typography.dart'; import 'package:cake_wallet/typography.dart';
import 'package:cake_wallet/utils/show_pop_up.dart'; import 'package:cake_wallet/utils/show_pop_up.dart';
import 'package:cake_wallet/view_model/ionia/ionia_purchase_merch_view_model.dart'; import 'package:cake_wallet/view_model/ionia/ionia_purchase_merch_view_model.dart';
@ -18,6 +21,8 @@ import 'package:flutter_mobx/flutter_mobx.dart';
import 'package:mobx/mobx.dart'; import 'package:mobx/mobx.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/send/widgets/confirm_sending_alert.dart'; import 'package:cake_wallet/src/screens/send/widgets/confirm_sending_alert.dart';
import 'package:cake_wallet/themes/extensions/send_page_theme.dart';
import 'package:cake_wallet/themes/extensions/transaction_trade_theme.dart';
class IoniaBuyGiftCardDetailPage extends BasePage { class IoniaBuyGiftCardDetailPage extends BasePage {
IoniaBuyGiftCardDetailPage(this.ioniaPurchaseViewModel); IoniaBuyGiftCardDetailPage(this.ioniaPurchaseViewModel);
@ -28,7 +33,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).accentTextTheme!.displayLarge!.backgroundColor!), style: textMediumSemiBold(color: Theme.of(context).extension<CakeTextTheme>()!.titleColor),
); );
} }
@ -96,8 +101,8 @@ class IoniaBuyGiftCardDetailPage extends BasePage {
borderRadius: BorderRadius.circular(20), borderRadius: BorderRadius.circular(20),
gradient: LinearGradient( gradient: LinearGradient(
colors: [ colors: [
Theme.of(context).primaryTextTheme!.titleMedium!.color!, Theme.of(context).extension<SendPageTheme>()!.firstGradientColor,
Theme.of(context).primaryTextTheme!.titleMedium!.decorationColor!, Theme.of(context).extension<SendPageTheme>()!.secondGradientColor,
], ],
begin: Alignment.topLeft, begin: Alignment.topLeft,
end: Alignment.bottomRight, end: Alignment.bottomRight,
@ -163,7 +168,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,
), ),
@ -202,7 +207,7 @@ class IoniaBuyGiftCardDetailPage extends BasePage {
ioniaPurchaseViewModel.invoiceCommittingState is IsExecutingState, ioniaPurchaseViewModel.invoiceCommittingState is IsExecutingState,
onPressed: () => purchaseCard(context), onPressed: () => purchaseCard(context),
text: S.of(context).purchase_gift_card, text: S.of(context).purchase_gift_card,
color: Theme.of(context).accentTextTheme!.bodyLarge!.color!, color: Theme.of(context).primaryColor,
textColor: Colors.white, textColor: Colors.white,
); );
}), }),
@ -212,7 +217,7 @@ class IoniaBuyGiftCardDetailPage extends BasePage {
onTap: () => _showTermsAndCondition(context), onTap: () => _showTermsAndCondition(context),
child: Text(S.of(context).settings_terms_and_conditions, child: Text(S.of(context).settings_terms_and_conditions,
style: textMediumSemiBold( style: textMediumSemiBold(
color: Theme.of(context).primaryTextTheme.bodyMedium!.color!, color: Theme.of(context).extension<ExchangePageTheme>()!.firstGradientBottomPanelColor,
).copyWith(fontSize: 12)), ).copyWith(fontSize: 12)),
), ),
SizedBox(height: 16) SizedBox(height: 16)
@ -232,7 +237,7 @@ class IoniaBuyGiftCardDetailPage extends BasePage {
child: Text( child: Text(
ioniaPurchaseViewModel.ioniaMerchant.termsAndConditions, ioniaPurchaseViewModel.ioniaMerchant.termsAndConditions,
style: textMedium( style: textMedium(
color: Theme.of(context).textTheme!.displaySmall!.color!, color: Theme.of(context).extension<ReceivePageTheme>()!.tilesTextColor,
), ),
), ),
), ),
@ -270,13 +275,13 @@ class IoniaBuyGiftCardDetailPage extends BasePage {
child: Text( child: Text(
instruction.header, instruction.header,
style: textLargeSemiBold( style: textLargeSemiBold(
color: Theme.of(context).textTheme!.displaySmall!.color!, color: Theme.of(context).extension<ReceivePageTheme>()!.tilesTextColor,
), ),
)), )),
Text( Text(
instruction.body, instruction.body,
style: textMedium( style: textMedium(
color: Theme.of(context).textTheme!.displaySmall!.color!, color: Theme.of(context).extension<ReceivePageTheme>()!.tilesTextColor,
), ),
) )
]; ];
@ -323,7 +328,7 @@ class IoniaBuyGiftCardDetailPage extends BasePage {
alertLeftActionButtonTextColor: Colors.white, alertLeftActionButtonTextColor: Colors.white,
alertRightActionButtonTextColor: Colors.white, alertRightActionButtonTextColor: Colors.white,
alertLeftActionButtonColor: Palette.brightOrange, alertLeftActionButtonColor: Palette.brightOrange,
alertRightActionButtonColor: Theme.of(context).textTheme!.titleSmall!.color, alertRightActionButtonColor: Theme.of(context).primaryColor,
actionRightButton: () async { actionRightButton: () async {
Navigator.of(context).pop(); Navigator.of(context).pop();
await ioniaPurchaseViewModel.commitPaymentInvoice(); await ioniaPurchaseViewModel.commitPaymentInvoice();
@ -399,34 +404,34 @@ 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).accentTextTheme!.titleLarge!.color! ? 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
? Theme.of(context).accentTextTheme!.titleLarge!.color! ? Theme.of(context).dialogTheme.backgroundColor!
: Theme.of(context).primaryTextTheme!.labelSmall!.color!; : Theme.of(context).extension<TransactionTradeTheme>()!.detailsTitlesColor;
} }
Color? backgroundColor(BuildContext context) { Color? backgroundColor(BuildContext context) {
if (isDark(context)) { if (isDark(context)) {
return isSelected return isSelected
? null ? null
: Theme.of(context).accentTextTheme!.displayLarge!.backgroundColor!.withOpacity(0.01); : Theme.of(context).extension<CakeTextTheme>()!.titleColor.withOpacity(0.01);
} }
return isSelected return isSelected
? null ? null
: Theme.of(context).accentTextTheme!.displayLarge!.backgroundColor!.withOpacity(0.1); : Theme.of(context).extension<CakeTextTheme>()!.titleColor.withOpacity(0.1);
} }
@override @override
@ -459,8 +464,8 @@ class TipButton extends StatelessWidget {
gradient: isSelected gradient: isSelected
? LinearGradient( ? LinearGradient(
colors: [ colors: [
Theme.of(context).primaryTextTheme!.titleMedium!.color!, Theme.of(context).extension<SendPageTheme>()!.firstGradientColor,
Theme.of(context).primaryTextTheme!.titleMedium!.decorationColor!, Theme.of(context).extension<SendPageTheme>()!.secondGradientColor,
], ],
begin: Alignment.topLeft, begin: Alignment.topLeft,
end: Alignment.bottomRight, end: Alignment.bottomRight,

View file

@ -1,3 +1,5 @@
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';
@ -13,6 +15,7 @@ import 'package:flutter/services.dart';
import 'package:flutter_mobx/flutter_mobx.dart'; import 'package:flutter_mobx/flutter_mobx.dart';
import 'package:keyboard_actions/keyboard_actions.dart'; import 'package:keyboard_actions/keyboard_actions.dart';
import 'package:cake_wallet/generated/i18n.dart'; import 'package:cake_wallet/generated/i18n.dart';
import 'package:cake_wallet/themes/extensions/send_page_theme.dart';
class IoniaBuyGiftCardPage extends BasePage { class IoniaBuyGiftCardPage extends BasePage {
IoniaBuyGiftCardPage( IoniaBuyGiftCardPage(
@ -29,9 +32,6 @@ class IoniaBuyGiftCardPage extends BasePage {
@override @override
String get title => S.current.enter_amount; String get title => S.current.enter_amount;
@override
Color get titleColor => Colors.white;
@override @override
bool get extendBodyBehindAppBar => true; bool get extendBodyBehindAppBar => true;
@ -50,10 +50,7 @@ class IoniaBuyGiftCardPage extends BasePage {
disableScroll: true, disableScroll: true,
config: KeyboardActionsConfig( config: KeyboardActionsConfig(
keyboardActionsPlatform: KeyboardActionsPlatform.IOS, keyboardActionsPlatform: KeyboardActionsPlatform.IOS,
keyboardBarColor: Theme.of(context) keyboardBarColor: Theme.of(context).extension<KeyboardTheme>()!.keyboardBarColor,
.accentTextTheme!
.bodyLarge!
.backgroundColor!,
nextFocus: false, nextFocus: false,
actions: [ actions: [
KeyboardActionsItem( KeyboardActionsItem(
@ -75,11 +72,8 @@ class IoniaBuyGiftCardPage extends BasePage {
bottomRight: Radius.circular(24), bottomRight: Radius.circular(24),
), ),
gradient: LinearGradient(colors: [ gradient: LinearGradient(colors: [
Theme.of(context).primaryTextTheme!.titleMedium!.color!, Theme.of(context).extension<SendPageTheme>()!.firstGradientColor,
Theme.of(context) Theme.of(context).extension<SendPageTheme>()!.secondGradientColor,
.primaryTextTheme!
.titleMedium!
.decorationColor!,
], begin: Alignment.topLeft, end: Alignment.bottomRight), ], begin: Alignment.topLeft, end: Alignment.bottomRight),
), ),
child: Column( child: Column(
@ -101,10 +95,7 @@ class IoniaBuyGiftCardPage extends BasePage {
], ],
hintText: '1000', hintText: '1000',
placeholderTextStyle: TextStyle( placeholderTextStyle: TextStyle(
color: Theme.of(context) color: Theme.of(context).extension<SendPageTheme>()!.textFieldBorderColor,
.primaryTextTheme!
.headlineSmall!
.color!,
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
fontSize: 36, fontSize: 36,
), ),
@ -124,10 +115,7 @@ class IoniaBuyGiftCardPage extends BasePage {
), ),
), ),
Divider( Divider(
color: Theme.of(context) color: Theme.of(context).extension<SendPageTheme>()!.textFieldBorderColor,
.primaryTextTheme!
.headlineSmall!
.color!,
height: 1, height: 1,
), ),
SizedBox(height: 8), SizedBox(height: 8),
@ -138,19 +126,13 @@ class IoniaBuyGiftCardPage extends BasePage {
Text( Text(
S.of(context).min_amount(merchant.minimumCardPurchase.toStringAsFixed(2)), S.of(context).min_amount(merchant.minimumCardPurchase.toStringAsFixed(2)),
style: TextStyle( style: TextStyle(
color: Theme.of(context) color: Theme.of(context).extension<SendPageTheme>()!.textFieldBorderColor,
.primaryTextTheme!
.headlineSmall!
.color!,
), ),
), ),
Text( Text(
S.of(context).max_amount(merchant.maximumCardPurchase.toStringAsFixed(2)), S.of(context).max_amount(merchant.maximumCardPurchase.toStringAsFixed(2)),
style: TextStyle( style: TextStyle(
color: Theme.of(context) color: Theme.of(context).extension<SendPageTheme>()!.textFieldBorderColor,
.primaryTextTheme!
.headlineSmall!
.color!,
), ),
), ),
], ],
@ -163,16 +145,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) backgroundColor: Theme.of(context).extension<CakeTextTheme>()!.titleColor
.accentTextTheme!
.displayLarge!
.backgroundColor!
.withOpacity(0.1), .withOpacity(0.1),
discount: merchant.discount, discount: merchant.discount,
titleColor: Theme.of(context) titleColor: Theme.of(context).extension<CakeTextTheme>()!.titleColor,
.accentTextTheme!
.displayLarge!
.backgroundColor!,
subtitleColor: Theme.of(context).hintColor, subtitleColor: Theme.of(context).hintColor,
subTitle: merchant.avaibilityStatus, subTitle: merchant.avaibilityStatus,
logoUrl: merchant.logoUrl, logoUrl: merchant.logoUrl,
@ -195,10 +171,7 @@ class IoniaBuyGiftCardPage extends BasePage {
), ),
text: S.of(context).continue_text, text: S.of(context).continue_text,
isDisabled: !ioniaBuyCardViewModel.isEnablePurchase, isDisabled: !ioniaBuyCardViewModel.isEnablePurchase,
color: Theme.of(context) color: Theme.of(context).primaryColor,
.accentTextTheme!
.bodyLarge!
.color!,
textColor: Colors.white, textColor: Colors.white,
), ),
); );

View file

@ -1,3 +1,5 @@
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';
@ -12,6 +14,7 @@ import 'package:flutter/services.dart';
import 'package:flutter_mobx/flutter_mobx.dart'; import 'package:flutter_mobx/flutter_mobx.dart';
import 'package:keyboard_actions/keyboard_actions.dart'; import 'package:keyboard_actions/keyboard_actions.dart';
import 'package:cake_wallet/generated/i18n.dart'; import 'package:cake_wallet/generated/i18n.dart';
import 'package:cake_wallet/themes/extensions/send_page_theme.dart';
class IoniaCustomRedeemPage extends BasePage { class IoniaCustomRedeemPage extends BasePage {
IoniaCustomRedeemPage( IoniaCustomRedeemPage(
@ -28,9 +31,6 @@ class IoniaCustomRedeemPage extends BasePage {
@override @override
String get title => S.current.custom_redeem_amount; String get title => S.current.custom_redeem_amount;
@override
Color get titleColor => Colors.white;
@override @override
bool get extendBodyBehindAppBar => true; bool get extendBodyBehindAppBar => true;
@ -50,10 +50,7 @@ class IoniaCustomRedeemPage extends BasePage {
disableScroll: true, disableScroll: true,
config: KeyboardActionsConfig( config: KeyboardActionsConfig(
keyboardActionsPlatform: KeyboardActionsPlatform.IOS, keyboardActionsPlatform: KeyboardActionsPlatform.IOS,
keyboardBarColor: Theme.of(context) keyboardBarColor: Theme.of(context).extension<KeyboardTheme>()!.keyboardBarColor,
.accentTextTheme!
.bodyLarge!
.backgroundColor!,
nextFocus: false, nextFocus: false,
actions: [ actions: [
KeyboardActionsItem( KeyboardActionsItem(
@ -73,11 +70,8 @@ class IoniaCustomRedeemPage extends BasePage {
borderRadius: BorderRadius.only( borderRadius: BorderRadius.only(
bottomLeft: Radius.circular(24), bottomRight: Radius.circular(24)), bottomLeft: Radius.circular(24), bottomRight: Radius.circular(24)),
gradient: LinearGradient(colors: [ gradient: LinearGradient(colors: [
Theme.of(context).primaryTextTheme!.titleMedium!.color!, Theme.of(context).extension<SendPageTheme>()!.firstGradientColor,
Theme.of(context) Theme.of(context).extension<SendPageTheme>()!.secondGradientColor,
.primaryTextTheme!
.titleMedium!
.decorationColor!,
], begin: Alignment.topLeft, end: Alignment.bottomRight), ], begin: Alignment.topLeft, end: Alignment.bottomRight),
), ),
child: Column( child: Column(
@ -92,17 +86,11 @@ class IoniaCustomRedeemPage extends BasePage {
inputFormatters: [FilteringTextInputFormatter.deny(RegExp('[\-|\ ]'))], inputFormatters: [FilteringTextInputFormatter.deny(RegExp('[\-|\ ]'))],
hintText: '1000', hintText: '1000',
placeholderTextStyle: TextStyle( placeholderTextStyle: TextStyle(
color: Theme.of(context) color: Theme.of(context).extension<SendPageTheme>()!.textFieldBorderColor,
.primaryTextTheme!
.headlineSmall!
.color!,
fontWeight: FontWeight.w500, fontWeight: FontWeight.w500,
fontSize: 36, fontSize: 36,
), ),
borderColor: Theme.of(context) borderColor: Theme.of(context).extension<SendPageTheme>()!.textFieldBorderColor,
.primaryTextTheme!
.headlineSmall!
.color!,
textColor: Colors.white, textColor: Colors.white,
textStyle: TextStyle( textStyle: TextStyle(
color: Colors.white, color: Colors.white,
@ -133,10 +121,7 @@ class IoniaCustomRedeemPage extends BasePage {
child: Text( child: Text(
'\$${giftCard.remainingAmount} - \$${ioniaCustomRedeemViewModel.amount} = \$${ioniaCustomRedeemViewModel.formattedRemaining} ${S.of(context).remaining}', '\$${giftCard.remainingAmount} - \$${ioniaCustomRedeemViewModel.amount} = \$${ioniaCustomRedeemViewModel.formattedRemaining} ${S.of(context).remaining}',
style: TextStyle( style: TextStyle(
color: Theme.of(context) color: Theme.of(context).extension<SendPageTheme>()!.textFieldBorderColor,
.primaryTextTheme!
.headlineSmall!
.color!,
), ),
), ),
) )
@ -150,18 +135,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) backgroundColor: Theme.of(context).extension<CakeTextTheme>()!.titleColor
.accentTextTheme!
.displayLarge!
.backgroundColor!
.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) titleColor: Theme.of(context).extension<CakeTextTheme>()!.titleColor,
.accentTextTheme!
.displayLarge!
.backgroundColor!,
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,
@ -178,10 +157,7 @@ class IoniaCustomRedeemPage extends BasePage {
isLoading: ioniaCustomRedeemViewModel.redeemState is IsExecutingState, isLoading: ioniaCustomRedeemViewModel.redeemState is IsExecutingState,
isDisabled: ioniaCustomRedeemViewModel.disableRedeem, isDisabled: ioniaCustomRedeemViewModel.disableRedeem,
text: S.of(context).add_custom_redemption, text: S.of(context).add_custom_redemption,
color: Theme.of(context) color: Theme.of(context).primaryColor,
.accentTextTheme!
.bodyLarge!
.color!,
textColor: Colors.white, textColor: Colors.white,
onPressed: () => ioniaCustomRedeemViewModel.addCustomRedeem().then((value) { onPressed: () => ioniaCustomRedeemViewModel.addCustomRedeem().then((value) {
Navigator.of(context).pop(ioniaCustomRedeemViewModel.remaining.toString()); Navigator.of(context).pop(ioniaCustomRedeemViewModel.remaining.toString());

View file

@ -1,3 +1,5 @@
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';
@ -12,6 +14,7 @@ import 'package:flutter/services.dart';
import 'package:flutter_mobx/flutter_mobx.dart'; import 'package:flutter_mobx/flutter_mobx.dart';
import 'package:keyboard_actions/keyboard_actions.dart'; import 'package:keyboard_actions/keyboard_actions.dart';
import 'package:cake_wallet/generated/i18n.dart'; import 'package:cake_wallet/generated/i18n.dart';
import 'package:cake_wallet/themes/extensions/send_page_theme.dart';
class IoniaCustomTipPage extends BasePage { class IoniaCustomTipPage extends BasePage {
IoniaCustomTipPage( IoniaCustomTipPage(
@ -29,9 +32,6 @@ class IoniaCustomTipPage extends BasePage {
@override @override
String get title => S.current.enter_amount; String get title => S.current.enter_amount;
@override
Color get titleColor => Colors.white;
@override @override
bool get extendBodyBehindAppBar => true; bool get extendBodyBehindAppBar => true;
@ -51,10 +51,7 @@ class IoniaCustomTipPage extends BasePage {
disableScroll: true, disableScroll: true,
config: KeyboardActionsConfig( config: KeyboardActionsConfig(
keyboardActionsPlatform: KeyboardActionsPlatform.IOS, keyboardActionsPlatform: KeyboardActionsPlatform.IOS,
keyboardBarColor: Theme.of(context) keyboardBarColor: Theme.of(context).extension<KeyboardTheme>()!.keyboardBarColor,
.accentTextTheme!
.bodyLarge!
.backgroundColor!,
nextFocus: false, nextFocus: false,
actions: [ actions: [
KeyboardActionsItem( KeyboardActionsItem(
@ -73,11 +70,8 @@ class IoniaCustomTipPage extends BasePage {
decoration: BoxDecoration( decoration: BoxDecoration(
borderRadius: BorderRadius.only(bottomLeft: Radius.circular(24), bottomRight: Radius.circular(24)), borderRadius: BorderRadius.only(bottomLeft: Radius.circular(24), bottomRight: Radius.circular(24)),
gradient: LinearGradient(colors: [ gradient: LinearGradient(colors: [
Theme.of(context).primaryTextTheme!.titleMedium!.color!, Theme.of(context).extension<SendPageTheme>()!.firstGradientColor,
Theme.of(context) Theme.of(context).extension<SendPageTheme>()!.secondGradientColor,
.primaryTextTheme!
.titleMedium!
.decorationColor!,
], begin: Alignment.topLeft, end: Alignment.bottomRight), ], begin: Alignment.topLeft, end: Alignment.bottomRight),
), ),
child: Column( child: Column(
@ -92,17 +86,11 @@ class IoniaCustomTipPage extends BasePage {
inputFormatters: [FilteringTextInputFormatter.deny(RegExp('[\-|\ ]'))], inputFormatters: [FilteringTextInputFormatter.deny(RegExp('[\-|\ ]'))],
hintText: '1000', hintText: '1000',
placeholderTextStyle: TextStyle( placeholderTextStyle: TextStyle(
color: Theme.of(context) color: Theme.of(context).extension<SendPageTheme>()!.textFieldBorderColor,
.primaryTextTheme!
.headlineSmall!
.color!,
fontWeight: FontWeight.w500, fontWeight: FontWeight.w500,
fontSize: 36, fontSize: 36,
), ),
borderColor: Theme.of(context) borderColor: Theme.of(context).extension<SendPageTheme>()!.textFieldBorderColor,
.primaryTextTheme!
.headlineSmall!
.color!,
textColor: Colors.white, textColor: Colors.white,
textStyle: TextStyle( textStyle: TextStyle(
color: Colors.white, color: Colors.white,
@ -137,10 +125,7 @@ class IoniaCustomTipPage extends BasePage {
text: TextSpan( text: TextSpan(
text: '\$${_amountController.text}', text: '\$${_amountController.text}',
style: TextStyle( style: TextStyle(
color: Theme.of(context) color: Theme.of(context).extension<SendPageTheme>()!.textFieldBorderColor,
.primaryTextTheme!
.headlineSmall!
.color!,
), ),
children: [ children: [
TextSpan(text: ' ${S.of(context).is_percentage} '), TextSpan(text: ' ${S.of(context).is_percentage} '),
@ -158,16 +143,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) backgroundColor: Theme.of(context).extension<CakeTextTheme>()!.titleColor
.accentTextTheme!
.displayLarge!
.backgroundColor!
.withOpacity(0.1), .withOpacity(0.1),
discount: 0.0, discount: 0.0,
titleColor: Theme.of(context) titleColor: Theme.of(context).extension<CakeTextTheme>()!.titleColor,
.accentTextTheme!
.displayLarge!
.backgroundColor!,
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,
@ -184,10 +163,7 @@ class IoniaCustomTipPage extends BasePage {
Navigator.of(context).pop(customTipViewModel.customTip); Navigator.of(context).pop(customTipViewModel.customTip);
}, },
text: S.of(context).add_tip, text: S.of(context).add_tip,
color: Theme.of(context) color: Theme.of(context).primaryColor,
.accentTextTheme!
.bodyLarge!
.color!,
textColor: Colors.white, textColor: Colors.white,
), ),
), ),

View file

@ -1,4 +1,6 @@
import 'package:cake_wallet/ionia/ionia_create_state.dart'; import 'package:cake_wallet/ionia/ionia_create_state.dart';
import 'package:cake_wallet/themes/extensions/receive_page_theme.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';
@ -6,12 +8,14 @@ import 'package:cake_wallet/src/screens/ionia/widgets/text_icon_button.dart';
import 'package:cake_wallet/src/widgets/alert_background.dart'; import 'package:cake_wallet/src/widgets/alert_background.dart';
import 'package:cake_wallet/src/widgets/primary_button.dart'; import 'package:cake_wallet/src/widgets/primary_button.dart';
import 'package:cake_wallet/src/widgets/scollable_with_bottom_section.dart'; import 'package:cake_wallet/src/widgets/scollable_with_bottom_section.dart';
import 'package:cake_wallet/themes/extensions/cake_scrollbar_theme.dart';
import 'package:cake_wallet/typography.dart'; import 'package:cake_wallet/typography.dart';
import 'package:cake_wallet/utils/show_pop_up.dart'; import 'package:cake_wallet/utils/show_pop_up.dart';
import 'package:cake_wallet/view_model/ionia/ionia_gift_cards_list_view_model.dart'; import 'package:cake_wallet/view_model/ionia/ionia_gift_cards_list_view_model.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:flutter_mobx/flutter_mobx.dart'; import 'package:flutter_mobx/flutter_mobx.dart';
import 'package:cake_wallet/themes/extensions/send_page_theme.dart';
class IoniaDebitCardPage extends BasePage { class IoniaDebitCardPage extends BasePage {
final IoniaGiftCardsListViewModel _cardsListViewModel; final IoniaGiftCardsListViewModel _cardsListViewModel;
@ -23,10 +27,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) color: Theme.of(context).extension<CakeTextTheme>()!.titleColor,
.accentTextTheme!
.displayLarge!
.backgroundColor!,
), ),
); );
} }
@ -55,10 +56,7 @@ class IoniaDebitCardPage extends BasePage {
child: Text( child: Text(
S.of(context).billing_address_info, S.of(context).billing_address_info,
style: textSmall( style: textSmall(
color: Theme.of(context) color: Theme.of(context).extension<ReceivePageTheme>()!.iconsColor),
.textTheme!
.headlineMedium!
.color!),
textAlign: TextAlign.center, textAlign: TextAlign.center,
), ),
), ),
@ -67,16 +65,13 @@ class IoniaDebitCardPage extends BasePage {
text: S.of(context).order_physical_card, text: S.of(context).order_physical_card,
onPressed: () {}, onPressed: () {},
color: Color(0xffE9F2FC), color: Color(0xffE9F2FC),
textColor: Theme.of(context).textTheme!.displaySmall!.color!, textColor: Theme.of(context).extension<ReceivePageTheme>()!.tilesTextColor,
), ),
SizedBox(height: 8), SizedBox(height: 8),
PrimaryButton( PrimaryButton(
text: S.of(context).add_value, text: S.of(context).add_value,
onPressed: () {}, onPressed: () {},
color: Theme.of(context) color: Theme.of(context).primaryColor,
.accentTextTheme!
.bodyLarge!
.color!,
textColor: Colors.white, textColor: Colors.white,
), ),
SizedBox(height: 16) SizedBox(height: 16)
@ -124,15 +119,12 @@ class IoniaDebitCardPage extends BasePage {
text: S.of(context).get_a, text: S.of(context).get_a,
style: textMedium( style: textMedium(
color: color:
Theme.of(context).textTheme!.displaySmall!.color!), Theme.of(context).extension<ReceivePageTheme>()!.tilesTextColor),
children: [ children: [
TextSpan( TextSpan(
text: S.of(context).digital_and_physical_card, text: S.of(context).digital_and_physical_card,
style: textMediumBold( style: textMediumBold(
color: Theme.of(context) color: Theme.of(context).extension<ReceivePageTheme>()!.tilesTextColor),
.textTheme!
.displaySmall!
.color!),
), ),
TextSpan( TextSpan(
text: S.of(context).get_card_note, text: S.of(context).get_card_note,
@ -150,10 +142,7 @@ class IoniaDebitCardPage extends BasePage {
bottomSection: PrimaryButton( bottomSection: PrimaryButton(
text: S.of(context).activate, text: S.of(context).activate,
onPressed: () => _showHowToUseCard(context, activate: true), onPressed: () => _showHowToUseCard(context, activate: true),
color: Theme.of(context) color: Theme.of(context).primaryColor,
.accentTextTheme!
.bodyLarge!
.color!,
textColor: Colors.white, textColor: Colors.white,
), ),
); );
@ -185,7 +174,7 @@ class IoniaDebitCardPage extends BasePage {
S.of(context).how_to_use_card, S.of(context).how_to_use_card,
style: textLargeSemiBold( style: textLargeSemiBold(
color: color:
Theme.of(context).textTheme!.bodyMedium!.color!, Theme.of(context).extension<CakeScrollbarTheme>()!.thumbColor,
), ),
), ),
SizedBox(height: 24), SizedBox(height: 24),
@ -194,10 +183,7 @@ class IoniaDebitCardPage extends BasePage {
child: Text( child: Text(
S.of(context).signup_for_card_accept_terms, S.of(context).signup_for_card_accept_terms,
style: textSmallSemiBold( style: textSmallSemiBold(
color: Theme.of(context) color: Theme.of(context).extension<ReceivePageTheme>()!.tilesTextColor,
.textTheme!
.displaySmall!
.color!,
), ),
), ),
), ),
@ -219,7 +205,7 @@ class IoniaDebitCardPage extends BasePage {
text: S.of(context).got_it, text: S.of(context).got_it,
color: Color.fromRGBO(233, 242, 252, 1), color: Color.fromRGBO(233, 242, 252, 1),
textColor: textColor:
Theme.of(context).textTheme!.displaySmall!.color!, Theme.of(context).extension<ReceivePageTheme>()!.tilesTextColor,
), ),
SizedBox(height: 21), SizedBox(height: 21),
], ],
@ -283,8 +269,8 @@ class _IoniaDebitCardState extends State<_IoniaDebitCard> {
borderRadius: BorderRadius.circular(24), borderRadius: BorderRadius.circular(24),
gradient: LinearGradient( gradient: LinearGradient(
colors: [ colors: [
Theme.of(context).primaryTextTheme!.titleMedium!.color!, Theme.of(context).extension<SendPageTheme>()!.firstGradientColor,
Theme.of(context).primaryTextTheme!.titleMedium!.decorationColor!, Theme.of(context).extension<SendPageTheme>()!.secondGradientColor,
], ],
begin: Alignment.topLeft, begin: Alignment.topLeft,
end: Alignment.bottomRight, end: Alignment.bottomRight,
@ -393,13 +379,13 @@ class _TitleSubtitleTile extends StatelessWidget {
Text( Text(
title, title,
style: textSmallSemiBold( style: textSmallSemiBold(
color: Theme.of(context).textTheme!.displaySmall!.color!), color: Theme.of(context).extension<ReceivePageTheme>()!.tilesTextColor),
), ),
SizedBox(height: 4), SizedBox(height: 4),
Text( Text(
subtitle, subtitle,
style: textSmall( style: textSmall(
color: Theme.of(context).textTheme!.displaySmall!.color!), color: Theme.of(context).extension<ReceivePageTheme>()!.tilesTextColor),
), ),
], ],
); );

View file

@ -1,4 +1,6 @@
import 'package:cake_wallet/core/execution_state.dart'; import 'package:cake_wallet/core/execution_state.dart';
import 'package:cake_wallet/themes/extensions/receive_page_theme.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 +35,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,10 +62,7 @@ class IoniaGiftCardDetailPage extends BasePage {
return Text( return Text(
viewModel.giftCard.legalName, viewModel.giftCard.legalName,
style: textMediumSemiBold( style: textMediumSemiBold(
color: Theme.of(context) color: Theme.of(context).extension<CakeTextTheme>()!.titleColor),
.accentTextTheme!
.displayLarge!
.backgroundColor!),
); );
} }
@ -145,8 +144,8 @@ class IoniaGiftCardDetailPage extends BasePage {
viewModel.refeshCard(); viewModel.refeshCard();
}, },
text: S.of(context).more_options, text: S.of(context).more_options,
color: Theme.of(context).accentTextTheme!.bodySmall!.color!, 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(
@ -158,7 +157,7 @@ class IoniaGiftCardDetailPage extends BasePage {
}, },
), ),
text: S.of(context).mark_as_redeemed, text: S.of(context).mark_as_redeemed,
color: Theme.of(context).accentTextTheme!.bodyLarge!.color!, color: Theme.of(context).primaryColor,
textColor: Colors.white, textColor: Colors.white,
), ),
], ],
@ -201,13 +200,13 @@ class IoniaGiftCardDetailPage extends BasePage {
child: Text( child: Text(
instruction.header, instruction.header,
style: textLargeSemiBold( style: textLargeSemiBold(
color: Theme.of(context).textTheme!.displaySmall!.color!, color: Theme.of(context).extension<ReceivePageTheme>()!.tilesTextColor,
), ),
)), )),
Text( Text(
instruction.body, instruction.body,
style: textMedium( style: textMedium(
color: Theme.of(context).textTheme!.displaySmall!.color!, color: Theme.of(context).extension<ReceivePageTheme>()!.tilesTextColor,
), ),
) )
]; ];

View file

@ -2,10 +2,13 @@ import 'package:cake_wallet/ionia/ionia_create_state.dart';
import 'package:cake_wallet/ionia/ionia_merchant.dart'; import 'package:cake_wallet/ionia/ionia_merchant.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/gradient_background.dart';
import 'package:cake_wallet/src/screens/ionia/widgets/card_item.dart'; import 'package:cake_wallet/src/screens/ionia/widgets/card_item.dart';
import 'package:cake_wallet/src/screens/ionia/widgets/card_menu.dart'; import 'package:cake_wallet/src/screens/ionia/widgets/card_menu.dart';
import 'package:cake_wallet/src/screens/ionia/widgets/ionia_filter_modal.dart'; import 'package:cake_wallet/src/screens/ionia/widgets/ionia_filter_modal.dart';
import 'package:cake_wallet/src/widgets/cake_scrollbar.dart'; import 'package:cake_wallet/src/widgets/cake_scrollbar.dart';
import 'package:cake_wallet/themes/extensions/exchange_page_theme.dart';
import 'package:cake_wallet/themes/extensions/sync_indicator_theme.dart';
import 'package:cake_wallet/themes/theme_base.dart'; import 'package:cake_wallet/themes/theme_base.dart';
import 'package:cake_wallet/utils/debounce.dart'; import 'package:cake_wallet/utils/debounce.dart';
import 'package:cake_wallet/typography.dart'; import 'package:cake_wallet/typography.dart';
@ -15,6 +18,9 @@ import 'package:flutter/cupertino.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:flutter_mobx/flutter_mobx.dart'; import 'package:flutter_mobx/flutter_mobx.dart';
import 'package:cake_wallet/themes/extensions/dashboard_page_theme.dart';
import 'package:cake_wallet/themes/extensions/balance_page_theme.dart';
import 'package:cake_wallet/themes/extensions/filter_theme.dart';
class IoniaManageCardsPage extends BasePage { class IoniaManageCardsPage extends BasePage {
IoniaManageCardsPage(this._cardsListViewModel): searchFocusNode = FocusNode() { IoniaManageCardsPage(this._cardsListViewModel): searchFocusNode = FocusNode() {
@ -36,29 +42,12 @@ class IoniaManageCardsPage extends BasePage {
final _searchController = TextEditingController(); final _searchController = TextEditingController();
@override @override
Color get backgroundLightColor => currentTheme.type == ThemeType.bright ? Colors.transparent : Colors.white; bool get gradientBackground => true;
@override @override
Color get backgroundDarkColor => Colors.transparent; Widget Function(BuildContext, Widget) get rootWrapper =>
(BuildContext context, Widget scaffold) =>
@override GradientBackground(scaffold: scaffold);
Color get titleColor => currentTheme.type == ThemeType.bright ? Colors.white : Colors.black;
@override
Widget Function(BuildContext, Widget) get rootWrapper => (BuildContext context, Widget scaffold) => Container(
decoration: BoxDecoration(
gradient: LinearGradient(
colors: [
Theme.of(context).colorScheme.secondary,
Theme.of(context).scaffoldBackgroundColor,
Theme.of(context).primaryColor,
],
begin: Alignment.topRight,
end: Alignment.bottomLeft,
),
),
child: scaffold,
);
@override @override
bool get resizeToAvoidBottomInset => false; bool get resizeToAvoidBottomInset => false;
@ -71,10 +60,7 @@ class IoniaManageCardsPage extends BasePage {
return Text( return Text(
S.of(context).gift_cards, S.of(context).gift_cards,
style: textMediumSemiBold( style: textMediumSemiBold(
color: Theme.of(context) color: Theme.of(context).extension<DashboardPageTheme>()!.textColor,
.accentTextTheme!
.displayMedium!
.backgroundColor!,
), ),
); );
} }
@ -100,7 +86,7 @@ class IoniaManageCardsPage extends BasePage {
width: 32, width: 32,
padding: EdgeInsets.all(8), padding: EdgeInsets.all(8),
decoration: BoxDecoration( decoration: BoxDecoration(
color: Theme.of(context).textTheme!.titleLarge!.backgroundColor!, color: Theme.of(context).extension<SyncIndicatorTheme>()!.syncedBackgroundColor,
border: Border.all( border: Border.all(
color: Colors.white.withOpacity(0.2), color: Colors.white.withOpacity(0.2),
), ),
@ -108,7 +94,7 @@ class IoniaManageCardsPage extends BasePage {
), ),
child: Image.asset( child: Image.asset(
'assets/images/filter.png', 'assets/images/filter.png',
color: Theme.of(context).textTheme!.bodySmall!.decorationColor!, color: Theme.of(context).extension<FilterTheme>()!.iconColor,
), ),
)), )),
); );
@ -208,9 +194,9 @@ class _IoniaManageCardsPageBodyState extends State<IoniaManageCardsPageBody> {
}, },
title: merchant.legalName, title: merchant.legalName,
subTitle: merchant.avaibilityStatus, subTitle: merchant.avaibilityStatus,
backgroundColor: Theme.of(context).textTheme!.titleLarge!.backgroundColor!, backgroundColor: Theme.of(context).extension<SyncIndicatorTheme>()!.syncedBackgroundColor,
titleColor: Theme.of(context).accentTextTheme!.displayMedium!.backgroundColor!, titleColor: Theme.of(context).extension<DashboardPageTheme>()!.textColor,
subtitleColor: Theme.of(context).accentTextTheme!.displaySmall!.backgroundColor!, subtitleColor: Theme.of(context).extension<BalancePageTheme>()!.labelTextColor,
discount: merchant.discount, discount: merchant.discount,
); );
}, },
@ -221,8 +207,8 @@ class _IoniaManageCardsPageBodyState extends State<IoniaManageCardsPageBody> {
thumbHeight: thumbHeight, thumbHeight: thumbHeight,
rightOffset: 1, rightOffset: 1,
width: 3, width: 3,
backgroundColor: Theme.of(context).textTheme!.bodySmall!.decorationColor!.withOpacity(0.05), backgroundColor: Theme.of(context).extension<FilterTheme>()!.iconColor.withOpacity(0.05),
thumbColor: Theme.of(context).textTheme!.bodySmall!.decorationColor!.withOpacity(0.5), thumbColor: Theme.of(context).extension<FilterTheme>()!.iconColor.withOpacity(0.5),
fromTop: widget.cardsListViewModel.scrollOffsetFromTop, fromTop: widget.cardsListViewModel.scrollOffsetFromTop,
) )
: Offstage() : Offstage()
@ -230,8 +216,8 @@ class _IoniaManageCardsPageBodyState extends State<IoniaManageCardsPageBody> {
} }
return Center( return Center(
child: CircularProgressIndicator( child: CircularProgressIndicator(
backgroundColor: Theme.of(context).accentTextTheme!.displayMedium!.backgroundColor!, backgroundColor: Theme.of(context).extension<DashboardPageTheme>()!.textColor,
valueColor: AlwaysStoppedAnimation<Color>(Theme.of(context).primaryTextTheme!.bodyMedium!.color!), valueColor: AlwaysStoppedAnimation<Color>(Theme.of(context).extension<ExchangePageTheme>()!.firstGradientBottomPanelColor),
), ),
); );
} }
@ -254,14 +240,14 @@ class _SearchWidget extends StatelessWidget {
padding: EdgeInsets.all(8), padding: EdgeInsets.all(8),
child: Image.asset( child: Image.asset(
'assets/images/mini_search_icon.png', 'assets/images/mini_search_icon.png',
color: Theme.of(context).textTheme!.bodySmall!.decorationColor!, color: Theme.of(context).extension<FilterTheme>()!.iconColor,
), ),
), ),
); );
return TextField( return TextField(
focusNode: focusNode, focusNode: focusNode,
style: TextStyle(color: Theme.of(context).accentTextTheme!.displayMedium!.backgroundColor!), style: TextStyle(color: Theme.of(context).extension<DashboardPageTheme>()!.textColor),
controller: controller, controller: controller,
decoration: InputDecoration( decoration: InputDecoration(
filled: true, filled: true,
@ -269,10 +255,10 @@ class _SearchWidget extends StatelessWidget {
top: 10, top: 10,
left: 10, left: 10,
), ),
fillColor: Theme.of(context).textTheme!.titleLarge!.backgroundColor!, fillColor: Theme.of(context).extension<SyncIndicatorTheme>()!.syncedBackgroundColor,
hintText: S.of(context).search, hintText: S.of(context).search,
hintStyle: TextStyle( hintStyle: TextStyle(
color: Theme.of(context).accentTextTheme!.displaySmall!.backgroundColor!, color: Theme.of(context).extension<BalancePageTheme>()!.labelTextColor,
), ),
alignLabelWithHint: true, alignLabelWithHint: true,
floatingLabelBehavior: FloatingLabelBehavior.never, floatingLabelBehavior: FloatingLabelBehavior.never,
@ -318,8 +304,7 @@ class _TrailingIcon extends StatelessWidget {
onPressed: onPressed, onPressed: onPressed,
icon: Image.asset( icon: Image.asset(
asset, asset,
color: color: Theme.of(context).extension<DashboardPageTheme>()!.textColor,
Theme.of(context).accentTextTheme!.displayMedium!.backgroundColor!,
), ),
), ),
), ),

View file

@ -1,7 +1,9 @@
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';
import 'package:cake_wallet/themes/extensions/dashboard_page_theme.dart';
import 'package:cake_wallet/typography.dart'; import 'package:cake_wallet/typography.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
@ -15,10 +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) color: Theme.of(context).extension<CakeTextTheme>()!.titleColor,
.accentTextTheme!
.displayLarge!
.backgroundColor!,
), ),
); );
} }
@ -37,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,
), ),
), ),
), ),
@ -80,8 +79,8 @@ class _GradiantContainer extends StatelessWidget {
borderRadius: BorderRadius.circular(15), borderRadius: BorderRadius.circular(15),
gradient: LinearGradient( gradient: LinearGradient(
colors: [ colors: [
Theme.of(context).scaffoldBackgroundColor, Theme.of(context).extension<DashboardPageTheme>()!.secondGradientBackgroundColor,
Theme.of(context).colorScheme.secondary, Theme.of(context).extension<DashboardPageTheme>()!.firstGradientBackgroundColor,
], ],
begin: Alignment.topRight, begin: Alignment.topRight,
end: Alignment.bottomLeft, end: Alignment.bottomLeft,

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';
@ -11,6 +12,7 @@ import 'package:cake_wallet/generated/i18n.dart';
import 'package:flutter/services.dart'; import 'package:flutter/services.dart';
import 'package:flutter_mobx/flutter_mobx.dart'; import 'package:flutter_mobx/flutter_mobx.dart';
import 'package:mobx/mobx.dart'; import 'package:mobx/mobx.dart';
import 'package:cake_wallet/themes/extensions/transaction_trade_theme.dart';
class IoniaPaymentStatusPage extends BasePage { class IoniaPaymentStatusPage extends BasePage {
IoniaPaymentStatusPage(this.viewModel); IoniaPaymentStatusPage(this.viewModel);
@ -23,10 +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) color: Theme.of(context).extension<CakeTextTheme>()!.titleColor));
.accentTextTheme!
.displayLarge!
.backgroundColor!));
} }
@override @override
@ -93,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: [
@ -132,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))
])); ]));
} }
@ -150,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))]);
}), }),
], ],
), ),
@ -163,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,
)), )),
@ -175,15 +174,15 @@ class _IoniaPaymentStatusPageBodyBodyState extends State<_IoniaPaymentStatusPage
Routes.ioniaGiftCardDetailPage, Routes.ioniaGiftCardDetailPage,
arguments: [widget.viewModel.giftCard]), arguments: [widget.viewModel.giftCard]),
text: S.of(context).open_gift_card, text: S.of(context).open_gift_card,
color: Theme.of(context).accentTextTheme!.bodyLarge!.color!, color: Theme.of(context).primaryColor,
textColor: Colors.white); textColor: Colors.white);
} }
return PrimaryButton( return PrimaryButton(
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).accentTextTheme!.bodySmall!.color!, color: Theme.of(context).cardColor,
textColor: Theme.of(context).primaryTextTheme!.titleLarge!.color!); textColor: Theme.of(context).extension<CakeTextTheme>()!.titleColor);
}) })
]) ])
), ),
@ -199,14 +198,14 @@ class _IoniaPaymentStatusPageBodyBodyState extends State<_IoniaPaymentStatusPage
Text( Text(
title, title,
style: textXSmall( style: textXSmall(
color: Theme.of(context).primaryTextTheme!.labelSmall!.color!, color: Theme.of(context).extension<TransactionTradeTheme>()!.detailsTitlesColor,
), ),
), ),
SizedBox(height: 8), SizedBox(height: 8),
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,5 +1,7 @@
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/typography.dart'; import 'package:cake_wallet/typography.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
@ -41,7 +43,7 @@ class IoniaAlertModal extends StatelessWidget {
Text( Text(
title, title,
style: textLargeSemiBold( style: textLargeSemiBold(
color: Theme.of(context).textTheme!.bodyMedium!.color!, color: Theme.of(context).extension<CakeScrollbarTheme>()!.thumbColor,
), ),
), ),
Container( Container(
@ -56,12 +58,9 @@ class IoniaAlertModal extends StatelessWidget {
PrimaryButton( PrimaryButton(
onPressed: () => Navigator.pop(context), onPressed: () => Navigator.pop(context),
text: actionTitle, text: actionTitle,
color: Theme.of(context) color: Theme.of(context).cardColor,
.accentTextTheme!
.bodySmall!
.color!,
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';
@ -6,6 +7,7 @@ import 'package:cake_wallet/view_model/ionia/ionia_gift_cards_list_view_model.da
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_mobx/flutter_mobx.dart'; import 'package:flutter_mobx/flutter_mobx.dart';
import 'package:cake_wallet/palette.dart'; import 'package:cake_wallet/palette.dart';
import 'package:cake_wallet/themes/extensions/menu_theme.dart';
class IoniaFilterModal extends StatelessWidget { class IoniaFilterModal extends StatelessWidget {
IoniaFilterModal({required this.ioniaGiftCardsListViewModel}){ IoniaFilterModal({required this.ioniaGiftCardsListViewModel}){
@ -20,7 +22,7 @@ class IoniaFilterModal extends StatelessWidget {
padding: EdgeInsets.all(10), padding: EdgeInsets.all(10),
child: Image.asset( child: Image.asset(
'assets/images/mini_search_icon.png', 'assets/images/mini_search_icon.png',
color: Theme.of(context).textTheme!.titleSmall!.color!, color: Theme.of(context).primaryColor,
), ),
); );
return Scaffold( return Scaffold(
@ -46,14 +48,14 @@ 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,
prefixIcon: searchIcon, prefixIcon: searchIcon,
hintText: S.of(context).search_category, hintText: S.of(context).search_category,
contentPadding: EdgeInsets.only(bottom: 5), contentPadding: EdgeInsets.only(bottom: 5),
fillColor: Theme.of(context).primaryTextTheme!.bodySmall!.decorationColor!.withOpacity(0.5), fillColor: Theme.of(context).extension<CakeMenuTheme>()!.dividerColor.withOpacity(0.5),
border: OutlineInputBorder( border: OutlineInputBorder(
borderSide: BorderSide.none, borderSide: BorderSide.none,
borderRadius: BorderRadius.circular(8), borderRadius: BorderRadius.circular(8),
@ -84,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,5 +1,7 @@
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';
class IoniaTile extends StatelessWidget { class IoniaTile extends StatelessWidget {
const IoniaTile({ const IoniaTile({
@ -26,14 +28,14 @@ class IoniaTile extends StatelessWidget {
Text( Text(
title, title,
style: textXSmall( style: textXSmall(
color: Theme.of(context).primaryTextTheme!.labelSmall!.color!, color: Theme.of(context).extension<TransactionTradeTheme>()!.detailsTitlesColor,
), ),
), ),
SizedBox(height: 8), SizedBox(height: 8),
Text( Text(
subTitle, subTitle,
style: textMediumBold( style: textMediumBold(
color: Theme.of(context).primaryTextTheme!.titleLarge!.color!, color: Theme.of(context).extension<CakeTextTheme>()!.titleColor,
), ),
), ),
], ],

View file

@ -15,7 +15,7 @@ class RoundedCheckbox extends StatelessWidget {
width: 20.0, width: 20.0,
decoration: BoxDecoration( decoration: BoxDecoration(
borderRadius: BorderRadius.all(Radius.circular(50.0)), borderRadius: BorderRadius.all(Radius.circular(50.0)),
color: Theme.of(context).accentTextTheme!.bodyLarge!.color!, color: Theme.of(context).primaryColor,
), ),
child: Icon( child: Icon(
Icons.check, Icons.check,

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

@ -56,7 +56,7 @@ class MoneroAccountEditOrCreatePage extends BasePage {
text: moneroAccountCreationViewModel.isEdit text: moneroAccountCreationViewModel.isEdit
? S.of(context).rename ? S.of(context).rename
: S.of(context).add, : S.of(context).add,
color: Theme.of(context).accentTextTheme!.bodyLarge!.color!, color: Theme.of(context).primaryColor,
textColor: Colors.white, textColor: Colors.white,
isLoading: moneroAccountCreationViewModel.state isLoading: moneroAccountCreationViewModel.state
is IsExecutingState, is IsExecutingState,

View file

@ -31,7 +31,7 @@ class MoneroAccountListPage extends StatelessWidget {
child: ListView.separated( child: ListView.separated(
padding: EdgeInsets.zero, padding: EdgeInsets.zero,
controller: controller, controller: controller,
separatorBuilder: (context, index) => const SectionDivider(), separatorBuilder: (context, index) => const VerticalSectionDivider(),
itemCount: accounts.length, itemCount: accounts.length,
itemBuilder: (context, index) { itemBuilder: (context, index) {
final account = accounts[index]; final account = accounts[index];
@ -59,7 +59,7 @@ class MoneroAccountListPage extends StatelessWidget {
await Navigator.of(context).pushNamed(Routes.accountCreation), await Navigator.of(context).pushNamed(Routes.accountCreation),
child: Container( child: Container(
height: buttonHeight, height: buttonHeight,
color: Theme.of(context).cardColor, color: Theme.of(context).primaryColor,
padding: EdgeInsets.symmetric(horizontal: 24), padding: EdgeInsets.symmetric(horizontal: 24),
child: Center( child: Center(
child: Row( child: Row(

View file

@ -1,3 +1,5 @@
import 'package:cake_wallet/themes/extensions/account_list_theme.dart';
import 'package:cake_wallet/themes/extensions/receive_page_theme.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_slidable/flutter_slidable.dart'; import 'package:flutter_slidable/flutter_slidable.dart';
import 'package:cake_wallet/generated/i18n.dart'; import 'package:cake_wallet/generated/i18n.dart';
@ -21,11 +23,11 @@ class AccountTile extends StatelessWidget {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
final color = isCurrent final color = isCurrent
? Theme.of(context).textTheme.titleSmall!.decorationColor! ? Theme.of(context).extension<AccountListTheme>()!.currentAccountBackgroundColor
: Theme.of(context).textTheme.displayLarge!.decorationColor!; : Theme.of(context).extension<AccountListTheme>()!.tilesBackgroundColor;
final textColor = isCurrent final textColor = isCurrent
? Theme.of(context).textTheme.titleSmall!.color! ? Theme.of(context).extension<AccountListTheme>()!.currentAccountTextColor
: Theme.of(context).textTheme.displayLarge!.color!; : Theme.of(context).extension<AccountListTheme>()!.tilesTextColor;
final Widget cell = GestureDetector( final Widget cell = GestureDetector(
onTap: onTap, onTap: onTap,
@ -61,7 +63,9 @@ class AccountTile extends StatelessWidget {
fontSize: 15, fontSize: 15,
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
fontFamily: 'Lato', fontFamily: 'Lato',
color: Theme.of(context).textTheme.headlineMedium!.color!, color: isCurrent
? Theme.of(context).extension<AccountListTheme>()!.currentAccountAmountColor
: Theme.of(context).extension<AccountListTheme>()!.tilesAmountColor,
decoration: TextDecoration.none, decoration: TextDecoration.none,
), ),
), ),
@ -72,24 +76,20 @@ class AccountTile extends StatelessWidget {
); );
// return cell; // return cell;
return Slidable( return Slidable(key: Key(accountName), child: cell, endActionPane: _actionPane(context));
key: Key(accountName),
child: cell,
endActionPane: _actionPane(context)
);
} }
ActionPane _actionPane(BuildContext context) => ActionPane( ActionPane _actionPane(BuildContext context) => ActionPane(
motion: const ScrollMotion(), motion: const ScrollMotion(),
extentRatio: 0.3, extentRatio: 0.3,
children: [ children: [
SlidableAction( SlidableAction(
onPressed: (_) => onEdit.call(), onPressed: (_) => onEdit.call(),
backgroundColor: Colors.blue, backgroundColor: Colors.blue,
foregroundColor: Colors.white, foregroundColor: Colors.white,
icon: Icons.edit, icon: Icons.edit,
label: S.of(context).edit, label: S.of(context).edit,
), ),
], ],
); );
} }

View file

@ -3,6 +3,7 @@ import 'package:cake_wallet/entities/fiat_api_mode.dart';
import 'package:cake_wallet/src/screens/nodes/widgets/node_form.dart'; import 'package:cake_wallet/src/screens/nodes/widgets/node_form.dart';
import 'package:cake_wallet/src/screens/settings/widgets/settings_choices_cell.dart'; import 'package:cake_wallet/src/screens/settings/widgets/settings_choices_cell.dart';
import 'package:cake_wallet/src/screens/settings/widgets/settings_switcher_cell.dart'; import 'package:cake_wallet/src/screens/settings/widgets/settings_switcher_cell.dart';
import 'package:cake_wallet/themes/extensions/new_wallet_theme.dart';
import 'package:cake_wallet/view_model/node_list/node_create_or_edit_view_model.dart'; import 'package:cake_wallet/view_model/node_list/node_create_or_edit_view_model.dart';
import 'package:cake_wallet/view_model/advanced_privacy_settings_view_model.dart'; import 'package:cake_wallet/view_model/advanced_privacy_settings_view_model.dart';
import 'package:cake_wallet/view_model/settings/choices_list_item.dart'; import 'package:cake_wallet/view_model/settings/choices_list_item.dart';
@ -111,10 +112,7 @@ class _AdvancedPrivacySettingsBodyState extends State<AdvancedPrivacySettingsBod
Navigator.pop(context); Navigator.pop(context);
}, },
text: S.of(context).continue_text, text: S.of(context).continue_text,
color: Theme.of(context) color: Theme.of(context).primaryColor,
.accentTextTheme!
.bodyLarge!
.color!,
textColor: Colors.white, textColor: Colors.white,
), ),
const SizedBox(height: 25), const SizedBox(height: 25),
@ -125,10 +123,7 @@ class _AdvancedPrivacySettingsBodyState extends State<AdvancedPrivacySettingsBod
S.of(context).settings_can_be_changed_later, S.of(context).settings_can_be_changed_later,
textAlign: TextAlign.center, textAlign: TextAlign.center,
style: TextStyle( style: TextStyle(
color: Theme.of(context) color: Theme.of(context).extension<NewWalletTheme>()!.hintTextColor,
.accentTextTheme!
.displayMedium!
.color,
), ),
), ),
), ),

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';
@ -17,6 +18,8 @@ import 'package:cake_wallet/src/screens/seed_language/widgets/seed_language_pick
import 'package:cake_wallet/src/widgets/alert_with_one_action.dart'; import 'package:cake_wallet/src/widgets/alert_with_one_action.dart';
import 'package:cake_wallet/core/execution_state.dart'; import 'package:cake_wallet/core/execution_state.dart';
import 'package:cake_wallet/view_model/wallet_new_vm.dart'; import 'package:cake_wallet/view_model/wallet_new_vm.dart';
import 'package:cake_wallet/themes/extensions/new_wallet_theme.dart';
import 'package:cake_wallet/themes/extensions/send_page_theme.dart';
class NewWalletPage extends BasePage { class NewWalletPage extends BasePage {
NewWalletPage(this._walletNewVM); NewWalletPage(this._walletNewVM);
@ -117,32 +120,20 @@ 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,
fontWeight: FontWeight.w500, fontWeight: FontWeight.w500,
color: Theme.of(context) color: Theme.of(context).extension<NewWalletTheme>()!.hintTextColor),
.accentTextTheme!
.displayMedium!
.color),
hintText: S.of(context).wallet_name, hintText: S.of(context).wallet_name,
focusedBorder: UnderlineInputBorder( focusedBorder: UnderlineInputBorder(
borderSide: BorderSide( borderSide: BorderSide(
color: Theme.of(context) color: Theme.of(context).extension<NewWalletTheme>()!.underlineColor,
.accentTextTheme!
.displayMedium!
.decorationColor!,
width: 1.0)), width: 1.0)),
enabledBorder: UnderlineInputBorder( enabledBorder: UnderlineInputBorder(
borderSide: BorderSide( borderSide: BorderSide(
color: Theme.of(context) color: Theme.of(context).extension<NewWalletTheme>()!.underlineColor,
.accentTextTheme!
.displayMedium!
.decorationColor!,
width: 1.0), width: 1.0),
), ),
suffixIcon: Semantics( suffixIcon: Semantics(
@ -169,10 +160,7 @@ class _WalletNameFormState extends State<WalletNameForm> {
height: 34, height: 34,
child: Image.asset( child: Image.asset(
'assets/images/refresh_icon.png', 'assets/images/refresh_icon.png',
color: Theme.of(context) color: Theme.of(context).extension<SendPageTheme>()!.textFieldButtonIconColor,
.primaryTextTheme!
.headlineMedium!
.decorationColor!,
), ),
), ),
), ),
@ -193,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

@ -4,6 +4,7 @@ import 'package:cake_wallet/src/screens/new_wallet/widgets/select_button.dart';
import 'package:cake_wallet/src/widgets/primary_button.dart'; import 'package:cake_wallet/src/widgets/primary_button.dart';
import 'package:cake_wallet/src/widgets/scollable_with_bottom_section.dart'; import 'package:cake_wallet/src/widgets/scollable_with_bottom_section.dart';
import 'package:cake_wallet/src/widgets/search_bar_widget.dart'; import 'package:cake_wallet/src/widgets/search_bar_widget.dart';
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:cake_wallet/wallet_types.g.dart'; import 'package:cake_wallet/wallet_types.g.dart';
@ -80,7 +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).primaryTextTheme!.titleLarge!.color!), color: Theme.of(context).extension<CakeTextTheme>()!.titleColor),
), ),
), ),
Padding( Padding(
@ -112,7 +113,7 @@ class WalletTypeFormState extends State<WalletTypeForm> {
bottomSection: PrimaryButton( bottomSection: PrimaryButton(
onPressed: () => onTypeSelected(), onPressed: () => onTypeSelected(),
text: S.of(context).seed_language_next, text: S.of(context).seed_language_next,
color: Theme.of(context).accentTextTheme!.bodyLarge!.color!, color: Theme.of(context).primaryColor,
textColor: Colors.white, textColor: Colors.white,
isDisabled: selected == null, isDisabled: selected == null,
), ),

View file

@ -1,4 +1,7 @@
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/wallet_list_theme.dart';
class SelectButton extends StatelessWidget { class SelectButton extends StatelessWidget {
SelectButton({ SelectButton({
@ -21,25 +24,13 @@ class SelectButton extends StatelessWidget {
Widget build(BuildContext context) { Widget build(BuildContext context) {
final color = isSelected final color = isSelected
? Colors.green ? Colors.green
: Theme.of(context) : Theme.of(context).cardColor;
.accentTextTheme!
.bodySmall!
.color!;
final textColor = isSelected final textColor = isSelected
? Theme.of(context) ? Theme.of(context).extension<WalletListTheme>()!.restoreWalletButtonTextColor
.accentTextTheme! : Theme.of(context).extension<CakeTextTheme>()!.buttonTextColor;
.headlineSmall!
.decorationColor!
: Theme.of(context).primaryTextTheme!.titleLarge!.color!;
final arrowColor = isSelected final arrowColor = isSelected
? Theme.of(context) ? Theme.of(context).extension<WalletListTheme>()!.restoreWalletButtonTextColor
.accentTextTheme! : Theme.of(context).extension<FilterTheme>()!.titlesColor;
.headlineSmall!
.decorationColor!
: Theme.of(context)
.accentTextTheme!
.titleMedium!
.color!;
final selectArrowImage = Image.asset('assets/images/select_arrow.png', final selectArrowImage = Image.asset('assets/images/select_arrow.png',
color: arrowColor); color: arrowColor);
@ -86,4 +77,4 @@ class SelectButton extends StatelessWidget {
), ),
); );
} }
} }

View file

@ -182,10 +182,7 @@ class NodeCreateOrEditPage extends BasePage {
Navigator.of(context).pop(); Navigator.of(context).pop();
}, },
text: S.of(context).save, text: S.of(context).save,
color: Theme.of(context) color: Theme.of(context).primaryColor,
.accentTextTheme!
.bodyLarge!
.color!,
textColor: Colors.white, textColor: Colors.white,
isDisabled: (!nodeCreateOrEditViewModel.isReady)|| isDisabled: (!nodeCreateOrEditViewModel.isReady)||
(nodeCreateOrEditViewModel (nodeCreateOrEditViewModel

View file

@ -1,8 +1,10 @@
import 'package:cake_wallet/routes.dart'; import 'package:cake_wallet/routes.dart';
import 'package:cake_wallet/src/screens/nodes/widgets/node_indicator.dart'; import 'package:cake_wallet/src/screens/nodes/widgets/node_indicator.dart';
import 'package:cake_wallet/src/widgets/standard_list.dart'; import 'package:cake_wallet/src/widgets/standard_list.dart';
import 'package:cake_wallet/themes/extensions/receive_page_theme.dart';
import 'package:cw_core/node.dart'; import 'package:cw_core/node.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:cake_wallet/themes/extensions/filter_theme.dart';
class NodeListRow extends StandardListRow { class NodeListRow extends StandardListRow {
NodeListRow( NodeListRow(
@ -38,12 +40,13 @@ class NodeListRow extends StandardListRow {
decoration: BoxDecoration( decoration: BoxDecoration(
shape: BoxShape.circle, shape: BoxShape.circle,
color: Theme.of(context) color: Theme.of(context)
.textTheme .extension<ReceivePageTheme>()!
.headlineMedium! .iconsBackgroundColor),
.decorationColor!),
child: Icon(Icons.edit, child: Icon(Icons.edit,
size: 14, size: 14,
color: Theme.of(context).textTheme.headlineMedium!.color!))); color: Theme.of(context)
.extension<ReceivePageTheme>()!
.iconsColor)));
} }
} }
@ -56,7 +59,7 @@ class NodeHeaderListRow extends StandardListRow {
return SizedBox( return SizedBox(
width: 20, width: 20,
child: Icon(Icons.add, child: Icon(Icons.add,
color: Theme.of(context).accentTextTheme!.titleMedium!.color,size: 24.0), color: Theme.of(context).extension<FilterTheme>()!.titlesColor,size: 24.0),
); );
} }
} }

View file

@ -48,10 +48,9 @@ class OrderDetailsPageBodyState extends State<OrderDetailsPageBody> {
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Observer(builder: (_) { return Observer(builder: (_) {
return SectionStandardList( return SectionStandardList(
context: context,
sectionCount: 1, sectionCount: 1,
itemCounter: (int _) => orderDetailsViewModel.items.length, itemCounter: (int _) => orderDetailsViewModel.items.length,
itemBuilder: (_, __, index) { itemBuilder: (__, index) {
final item = orderDetailsViewModel.items[index]; final item = orderDetailsViewModel.items[index];
if (item is TrackTradeListItem) { if (item is TrackTradeListItem) {

View file

@ -1,3 +1,5 @@
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';
@ -110,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(
@ -143,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,
@ -159,14 +161,8 @@ 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! : Theme.of(context).extension<PinCodeTheme>()!.indicatorsColor
.titleLarge!
.color!
: Theme.of(context)
.accentTextTheme!
.bodyMedium!
.color!
.withOpacity(0.25), .withOpacity(0.25),
)); ));
}), }),
@ -185,10 +181,7 @@ class PinCodeState<T extends PinCodeWidget> extends State<T> {
style: TextStyle( style: TextStyle(
fontSize: 14.0, fontSize: 14.0,
fontWeight: FontWeight.normal, fontWeight: FontWeight.normal,
color: Theme.of(context) color: Theme.of(context).extension<PinCodeTheme>()!.switchColor),
.accentTextTheme!
.bodyMedium!
.decorationColor!),
), ),
) )
], ],
@ -256,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,3 +1,5 @@
import 'package:cake_wallet/themes/extensions/exchange_page_theme.dart';
import 'package:cake_wallet/themes/extensions/keyboard_theme.dart';
import 'package:cake_wallet/anonpay/anonpay_donation_link_info.dart'; import 'package:cake_wallet/anonpay/anonpay_donation_link_info.dart';
import 'package:cake_wallet/core/execution_state.dart'; import 'package:cake_wallet/core/execution_state.dart';
import 'package:cake_wallet/di.dart'; import 'package:cake_wallet/di.dart';
@ -40,8 +42,9 @@ class AnonPayInvoicePage extends BasePage {
final _formKey = GlobalKey<FormState>(); final _formKey = GlobalKey<FormState>();
bool effectsInstalled = false; bool effectsInstalled = false;
@override @override
Color get titleColor => Colors.white; bool get gradientAll => true;
@override @override
bool get resizeToAvoidBottomInset => false; bool get resizeToAvoidBottomInset => false;
@ -56,8 +59,9 @@ class AnonPayInvoicePage extends BasePage {
void onClose(BuildContext context) => Navigator.popUntil(context, (route) => route.isFirst); void onClose(BuildContext context) => Navigator.popUntil(context, (route) => route.isFirst);
@override @override
Widget middle(BuildContext context) => Widget middle(BuildContext context) => PresentReceiveOptionPicker(
PresentReceiveOptionPicker(receiveOptionViewModel: receiveOptionViewModel); receiveOptionViewModel: receiveOptionViewModel,
color: titleColor(context));
@override @override
Widget trailing(BuildContext context) => TrailButton( Widget trailing(BuildContext context) => TrailButton(
@ -82,10 +86,7 @@ class AnonPayInvoicePage extends BasePage {
disableScroll: true, disableScroll: true,
config: KeyboardActionsConfig( config: KeyboardActionsConfig(
keyboardActionsPlatform: KeyboardActionsPlatform.IOS, keyboardActionsPlatform: KeyboardActionsPlatform.IOS,
keyboardBarColor: Theme.of(context) keyboardBarColor: Theme.of(context).extension<KeyboardTheme>()!.keyboardBarColor,
.accentTextTheme!
.bodyLarge!
.backgroundColor!,
nextFocus: false, nextFocus: false,
actions: [ actions: [
KeyboardActionsItem( KeyboardActionsItem(
@ -103,8 +104,8 @@ class AnonPayInvoicePage extends BasePage {
bottomLeft: Radius.circular(24), bottomRight: Radius.circular(24)), bottomLeft: Radius.circular(24), bottomRight: Radius.circular(24)),
gradient: LinearGradient( gradient: LinearGradient(
colors: [ colors: [
Theme.of(context).primaryTextTheme!.titleSmall!.color!, Theme.of(context).extension<ExchangePageTheme>()!.firstGradientTopPanelColor,
Theme.of(context).primaryTextTheme!.titleSmall!.decorationColor!, Theme.of(context).extension<ExchangePageTheme>()!.secondGradientTopPanelColor,
], ],
begin: Alignment.topLeft, begin: Alignment.topLeft,
end: Alignment.bottomRight, end: Alignment.bottomRight,
@ -142,10 +143,7 @@ class AnonPayInvoicePage extends BasePage {
: S.of(context).anonpay_description("a donation link", "donate"), : S.of(context).anonpay_description("a donation link", "donate"),
textAlign: TextAlign.center, textAlign: TextAlign.center,
style: TextStyle( style: TextStyle(
color: Theme.of(context) color: Theme.of(context).extension<ExchangePageTheme>()!.receiveAmountColor,
.primaryTextTheme!
.displayLarge!
.decorationColor!,
fontWeight: FontWeight.w500, fontWeight: FontWeight.w500,
fontSize: 12), fontSize: 12),
), ),
@ -173,10 +171,7 @@ class AnonPayInvoicePage extends BasePage {
anonInvoicePageViewModel.generateDonationLink(); anonInvoicePageViewModel.generateDonationLink();
} }
}, },
color: Theme.of(context) color: Theme.of(context).primaryColor,
.accentTextTheme!
.bodyLarge!
.color!,
textColor: Colors.white, textColor: Colors.white,
isLoading: anonInvoicePageViewModel.state is IsExecutingState, isLoading: anonInvoicePageViewModel.state is IsExecutingState,
), ),

View file

@ -5,13 +5,15 @@ import 'package:cake_wallet/entities/receive_page_option.dart';
import 'package:cake_wallet/generated/i18n.dart'; import 'package:cake_wallet/generated/i18n.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/gradient_background.dart';
import 'package:cake_wallet/src/screens/receive/widgets/anonpay_status_section.dart'; import 'package:cake_wallet/src/screens/receive/widgets/anonpay_status_section.dart';
import 'package:cake_wallet/src/screens/receive/widgets/qr_image.dart'; import 'package:cake_wallet/src/screens/receive/widgets/qr_image.dart';
import 'package:cake_wallet/src/screens/receive/widgets/copy_link_item.dart'; import 'package:cake_wallet/src/screens/receive/widgets/copy_link_item.dart';
import 'package:cake_wallet/themes/theme_base.dart'; import 'package:cake_wallet/themes/extensions/qr_code_theme.dart';
import 'package:device_display_brightness/device_display_brightness.dart'; import 'package:device_display_brightness/device_display_brightness.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:qr_flutter/qr_flutter.dart' as qr; import 'package:qr_flutter/qr_flutter.dart' as qr;
import 'package:cake_wallet/themes/extensions/dashboard_page_theme.dart';
class AnonPayReceivePage extends BasePage { class AnonPayReceivePage extends BasePage {
final AnonpayInfoBase invoiceInfo; final AnonpayInfoBase invoiceInfo;
@ -22,11 +24,7 @@ class AnonPayReceivePage extends BasePage {
String get title => S.current.receive; String get title => S.current.receive;
@override @override
Color get backgroundLightColor => bool get gradientBackground => true;
currentTheme.type == ThemeType.bright ? Colors.transparent : Colors.white;
@override
Color get backgroundDarkColor => Colors.transparent;
@override @override
bool get resizeToAvoidBottomInset => false; bool get resizeToAvoidBottomInset => false;
@ -44,10 +42,7 @@ class AnonPayReceivePage extends BasePage {
fontSize: 18.0, fontSize: 18.0,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
fontFamily: 'Lato', fontFamily: 'Lato',
color: Theme.of(context) color: titleColor(context)),
.accentTextTheme!
.displayMedium!
.backgroundColor!),
), ),
Text( Text(
invoiceInfo is AnonpayInvoiceInfo invoiceInfo is AnonpayInvoiceInfo
@ -56,7 +51,7 @@ class AnonPayReceivePage extends BasePage {
style: TextStyle( style: TextStyle(
fontSize: 10.0, fontSize: 10.0,
fontWeight: FontWeight.w500, fontWeight: FontWeight.w500,
color: Theme.of(context).textTheme!.headlineSmall!.color!), color: Theme.of(context).extension<QRCodeTheme>()!.qrCodeColor),
) )
], ],
); );
@ -78,10 +73,7 @@ class AnonPayReceivePage extends BasePage {
), ),
icon: Icon( icon: Icon(
Icons.edit, Icons.edit,
color: Theme.of(context) color: pageIconColor(context),
.accentTextTheme!
.bodySmall!
.color!,
size: 22.0, size: 22.0,
), ),
), ),
@ -90,14 +82,8 @@ class AnonPayReceivePage extends BasePage {
@override @override
Widget Function(BuildContext, Widget) get rootWrapper => Widget Function(BuildContext, Widget) get rootWrapper =>
(BuildContext context, Widget scaffold) => Container( (BuildContext context, Widget scaffold) =>
decoration: BoxDecoration( GradientBackground(scaffold: scaffold);
gradient: LinearGradient(colors: [
Theme.of(context).colorScheme.secondary,
Theme.of(context).scaffoldBackgroundColor,
Theme.of(context).primaryColor,
], begin: Alignment.topRight, end: Alignment.bottomLeft)),
child: scaffold);
@override @override
Widget body(BuildContext context) { Widget body(BuildContext context) {
@ -139,10 +125,7 @@ class AnonPayReceivePage extends BasePage {
decoration: BoxDecoration( decoration: BoxDecoration(
border: Border.all( border: Border.all(
width: 3, width: 3,
color: Theme.of(context) color: Theme.of(context).extension<DashboardPageTheme>()!.textColor,
.accentTextTheme!
.displayMedium!
.backgroundColor!,
), ),
), ),
child: QrImage( child: QrImage(

View file

@ -1,8 +1,9 @@
import 'package:cake_wallet/entities/qr_view_data.dart'; import 'package:cake_wallet/entities/qr_view_data.dart';
import 'package:cake_wallet/src/widgets/gradient_background.dart';
import 'package:cake_wallet/src/screens/receive/widgets/qr_image.dart'; import 'package:cake_wallet/src/screens/receive/widgets/qr_image.dart';
import 'package:cake_wallet/themes/theme_base.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/themes/extensions/dashboard_page_theme.dart';
class FullscreenQRPage extends BasePage { class FullscreenQRPage extends BasePage {
FullscreenQRPage({required this.qrViewData}); FullscreenQRPage({required this.qrViewData});
@ -10,10 +11,7 @@ class FullscreenQRPage extends BasePage {
final QrViewData qrViewData; final QrViewData qrViewData;
@override @override
Color get backgroundLightColor => currentTheme.type == ThemeType.bright ? Colors.transparent : Colors.white; bool get gradientBackground => true;
@override
Color get backgroundDarkColor => Colors.transparent;
@override @override
bool get resizeToAvoidBottomInset => false; bool get resizeToAvoidBottomInset => false;
@ -22,10 +20,7 @@ class FullscreenQRPage extends BasePage {
Widget leading(BuildContext context) { Widget leading(BuildContext context) {
final _backButton = Icon( final _backButton = Icon(
Icons.arrow_back_ios, Icons.arrow_back_ios,
color: Theme.of(context) color: Theme.of(context).extension<DashboardPageTheme>()!.textColor,
.accentTextTheme!
.displayMedium!
.backgroundColor!,
size: 16, size: 16,
); );
@ -47,19 +42,9 @@ class FullscreenQRPage extends BasePage {
} }
@override @override
Widget Function(BuildContext, Widget) get rootWrapper => (BuildContext context, Widget scaffold) => Container( Widget Function(BuildContext, Widget) get rootWrapper =>
decoration: BoxDecoration( (BuildContext context, Widget scaffold) =>
gradient: LinearGradient( GradientBackground(scaffold: scaffold);
colors: [
Theme.of(context).colorScheme.secondary,
Theme.of(context).scaffoldBackgroundColor,
Theme.of(context).primaryColor,
],
begin: Alignment.topRight,
end: Alignment.bottomLeft,
),
),
child: scaffold);
@override @override
Widget body(BuildContext context) { Widget body(BuildContext context) {
@ -75,10 +60,7 @@ class FullscreenQRPage extends BasePage {
decoration: BoxDecoration( decoration: BoxDecoration(
border: Border.all( border: Border.all(
width: 3, width: 3,
color: Theme.of(context) color: Theme.of(context).extension<DashboardPageTheme>()!.textColor)),
.accentTextTheme!
.displayMedium!
.backgroundColor!)),
child: Container( child: Container(
decoration: BoxDecoration( decoration: BoxDecoration(
border: Border.all(width: 3, color: Colors.white)), border: Border.all(width: 3, color: Colors.white)),

View file

@ -1,3 +1,6 @@
import 'package:cake_wallet/themes/extensions/keyboard_theme.dart';
import 'package:cake_wallet/themes/extensions/receive_page_theme.dart';
import 'package:cake_wallet/src/widgets/gradient_background.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/section_divider.dart'; import 'package:cake_wallet/src/widgets/section_divider.dart';
import 'package:cake_wallet/themes/theme_base.dart'; import 'package:cake_wallet/themes/theme_base.dart';
@ -19,6 +22,7 @@ import 'package:cake_wallet/view_model/wallet_address_list/wallet_address_list_i
import 'package:cake_wallet/view_model/wallet_address_list/wallet_address_list_view_model.dart'; import 'package:cake_wallet/view_model/wallet_address_list/wallet_address_list_view_model.dart';
import 'package:cake_wallet/src/screens/receive/widgets/qr_widget.dart'; import 'package:cake_wallet/src/screens/receive/widgets/qr_widget.dart';
import 'package:keyboard_actions/keyboard_actions.dart'; import 'package:keyboard_actions/keyboard_actions.dart';
import 'package:cake_wallet/themes/extensions/balance_page_theme.dart';
class ReceivePage extends BasePage { class ReceivePage extends BasePage {
ReceivePage({required this.addressListViewModel}) ReceivePage({required this.addressListViewModel})
@ -41,21 +45,13 @@ class ReceivePage extends BasePage {
String get title => S.current.receive; String get title => S.current.receive;
@override @override
Color get backgroundLightColor => bool get gradientBackground => true;
currentTheme.type == ThemeType.bright ? Colors.transparent : Colors.white;
@override
Color get backgroundDarkColor => Colors.transparent;
@override @override
bool get resizeToAvoidBottomInset => false; bool get resizeToAvoidBottomInset => false;
final FocusNode _cryptoAmountFocus; final FocusNode _cryptoAmountFocus;
@override
Color? get titleColor =>
currentTheme.type == ThemeType.bright ? Colors.white : null;
@override @override
Widget middle(BuildContext context) { Widget middle(BuildContext context) {
return Text( return Text(
@ -64,23 +60,14 @@ class ReceivePage extends BasePage {
fontSize: 18.0, fontSize: 18.0,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
fontFamily: 'Lato', fontFamily: 'Lato',
color: Theme.of(context) color: pageIconColor(context)),
.accentTextTheme!
.displayMedium!
.backgroundColor!),
); );
} }
@override @override
Widget Function(BuildContext, Widget) get rootWrapper => Widget Function(BuildContext, Widget) get rootWrapper =>
(BuildContext context, Widget scaffold) => Container( (BuildContext context, Widget scaffold) =>
decoration: BoxDecoration( GradientBackground(scaffold: scaffold);
gradient: LinearGradient(colors: [
Theme.of(context).colorScheme.secondary,
Theme.of(context).scaffoldBackgroundColor,
Theme.of(context).primaryColor,
], begin: Alignment.topRight, end: Alignment.bottomLeft)),
child: scaffold);
@override @override
Widget trailing(BuildContext context) { Widget trailing(BuildContext context) {
@ -103,10 +90,7 @@ class ReceivePage extends BasePage {
icon: Icon( icon: Icon(
Icons.share, Icons.share,
size: 20, size: 20,
color: Theme.of(context) color: pageIconColor(context),
.accentTextTheme!
.displayMedium!
.backgroundColor!,
), ),
), ),
)); ));
@ -119,10 +103,7 @@ class ReceivePage extends BasePage {
? KeyboardActions( ? KeyboardActions(
config: KeyboardActionsConfig( config: KeyboardActionsConfig(
keyboardActionsPlatform: KeyboardActionsPlatform.IOS, keyboardActionsPlatform: KeyboardActionsPlatform.IOS,
keyboardBarColor: Theme.of(context) keyboardBarColor: Theme.of(context).extension<KeyboardTheme>()!.keyboardBarColor,
.accentTextTheme!
.bodyLarge!
.backgroundColor!,
nextFocus: false, nextFocus: false,
actions: [ actions: [
KeyboardActionsItem( KeyboardActionsItem(
@ -146,7 +127,7 @@ class ReceivePage extends BasePage {
Observer( Observer(
builder: (_) => ListView.separated( builder: (_) => ListView.separated(
padding: EdgeInsets.all(0), padding: EdgeInsets.all(0),
separatorBuilder: (context, _) => const SectionDivider(), separatorBuilder: (context, _) => const HorizontalSectionDivider(),
shrinkWrap: true, shrinkWrap: true,
physics: NeverScrollableScrollPhysics(), physics: NeverScrollableScrollPhysics(),
itemCount: addressListViewModel.items.length, itemCount: addressListViewModel.items.length,
@ -163,10 +144,7 @@ class ReceivePage extends BasePage {
icon: Icon( icon: Icon(
Icons.arrow_forward_ios, Icons.arrow_forward_ios,
size: 14, size: 14,
color: Theme.of(context) color: Theme.of(context).extension<ReceivePageTheme>()!.iconsColor,
.textTheme!
.headlineMedium!
.color!,
)); ));
} }
@ -178,10 +156,7 @@ class ReceivePage extends BasePage {
icon: Icon( icon: Icon(
Icons.add, Icons.add,
size: 20, size: 20,
color: Theme.of(context) color: Theme.of(context).extension<ReceivePageTheme>()!.iconsColor,
.textTheme!
.headlineMedium!
.color!,
)); ));
} }
@ -190,23 +165,11 @@ class ReceivePage extends BasePage {
final isCurrent = final isCurrent =
item.address == addressListViewModel.address.address; item.address == addressListViewModel.address.address;
final backgroundColor = isCurrent final backgroundColor = isCurrent
? Theme.of(context) ? Theme.of(context).extension<ReceivePageTheme>()!.currentTileBackgroundColor
.textTheme! : Theme.of(context).extension<ReceivePageTheme>()!.tilesBackgroundColor;
.displayMedium!
.decorationColor!
: Theme.of(context)
.textTheme!
.displaySmall!
.decorationColor!;
final textColor = isCurrent final textColor = isCurrent
? Theme.of(context) ? Theme.of(context).extension<ReceivePageTheme>()!.currentTileTextColor
.textTheme! : Theme.of(context).extension<ReceivePageTheme>()!.tilesTextColor;
.displayMedium!
.color!
: Theme.of(context)
.textTheme!
.displaySmall!
.color!;
return AddressCell.fromItem(item, return AddressCell.fromItem(item,
isCurrent: isCurrent, isCurrent: isCurrent,
@ -252,10 +215,7 @@ class ReceivePage extends BasePage {
textAlign: TextAlign.center, textAlign: TextAlign.center,
style: TextStyle( style: TextStyle(
fontSize: 15, fontSize: 15,
color: Theme.of(context) color: Theme.of(context).extension<BalancePageTheme>()!.labelTextColor)),
.accentTextTheme!
.displaySmall!
.backgroundColor!)),
], ],
), ),
); );

View file

@ -1,8 +1,10 @@
import 'package:cake_wallet/generated/i18n.dart'; import 'package:cake_wallet/generated/i18n.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/themes/extensions/exchange_page_theme.dart';
import 'package:cw_core/currency.dart'; import 'package:cw_core/currency.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter/services.dart'; import 'package:flutter/services.dart';
import 'package:cake_wallet/themes/extensions/send_page_theme.dart';
class AnonpayCurrencyInputField extends StatelessWidget { class AnonpayCurrencyInputField extends StatelessWidget {
const AnonpayCurrencyInputField( const AnonpayCurrencyInputField(
@ -33,7 +35,7 @@ class AnonpayCurrencyInputField extends StatelessWidget {
border: Border( border: Border(
bottom: BorderSide( bottom: BorderSide(
color: color:
Theme.of(context).primaryTextTheme!.bodyLarge!.color!, Theme.of(context).extension<ExchangePageTheme>()!.textFieldBorderBottomPanelColor,
width: 1)), width: 1)),
), ),
child: Padding( child: Padding(
@ -65,10 +67,7 @@ class AnonpayCurrencyInputField extends StatelessWidget {
child: Container( child: Container(
height: 32, height: 32,
decoration: BoxDecoration( decoration: BoxDecoration(
color: Theme.of(context) color: Theme.of(context).extension<SendPageTheme>()!.textFieldButtonColor,
.primaryTextTheme!
.headlineMedium!
.color!,
borderRadius: BorderRadius.all(Radius.circular(6))), borderRadius: BorderRadius.all(Radius.circular(6))),
child: Center( child: Center(
child: Padding( child: Padding(
@ -78,10 +77,7 @@ class AnonpayCurrencyInputField extends StatelessWidget {
style: TextStyle( style: TextStyle(
fontSize: 12, fontSize: 12,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
color: Theme.of(context) color: Theme.of(context).extension<SendPageTheme>()!.textFieldButtonIconColor,
.primaryTextTheme!
.headlineMedium!
.decorationColor!,
), ),
), ),
), ),
@ -119,10 +115,7 @@ class AnonpayCurrencyInputField extends StatelessWidget {
placeholderTextStyle: TextStyle( placeholderTextStyle: TextStyle(
fontSize: 16, fontSize: 16,
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
color: Theme.of(context) color: Theme.of(context).extension<ExchangePageTheme>()!.hintTextColor,
.accentTextTheme!
.displayLarge!
.decorationColor!,
), ),
validator: null, validator: null,
), ),
@ -143,20 +136,14 @@ class AnonpayCurrencyInputField extends StatelessWidget {
style: TextStyle( style: TextStyle(
fontSize: 10, fontSize: 10,
height: 1.2, height: 1.2,
color: Theme.of(context) color: Theme.of(context).extension<ExchangePageTheme>()!.hintTextColor),
.accentTextTheme!
.displayLarge!
.decorationColor!),
), ),
SizedBox(width: 10), SizedBox(width: 10),
Text(S.of(context).max_value(maxAmount, selectedCurrency.toString()), Text(S.of(context).max_value(maxAmount, selectedCurrency.toString()),
style: TextStyle( style: TextStyle(
fontSize: 10, fontSize: 10,
height: 1.2, height: 1.2,
color: Theme.of(context) color: Theme.of(context).extension<ExchangePageTheme>()!.hintTextColor)),
.accentTextTheme!
.displayLarge!
.decorationColor!)),
], ],
), ),
) )

View file

@ -3,6 +3,7 @@ import 'package:cake_wallet/generated/i18n.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/src/screens/receive/widgets/anonpay_currency_input_field.dart'; import 'package:cake_wallet/src/screens/receive/widgets/anonpay_currency_input_field.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/themes/extensions/exchange_page_theme.dart';
import 'package:cake_wallet/typography.dart'; import 'package:cake_wallet/typography.dart';
import 'package:cake_wallet/utils/show_pop_up.dart'; import 'package:cake_wallet/utils/show_pop_up.dart';
import 'package:cake_wallet/view_model/anon_invoice_page_view_model.dart'; import 'package:cake_wallet/view_model/anon_invoice_page_view_model.dart';
@ -69,17 +70,14 @@ class AnonInvoiceForm extends StatelessWidget {
BaseTextFormField( BaseTextFormField(
controller: nameController, controller: nameController,
focusNode: _nameFocusNode, focusNode: _nameFocusNode,
borderColor: Theme.of(context).primaryTextTheme!.bodyLarge!.color!, borderColor: Theme.of(context).extension<ExchangePageTheme>()!.textFieldBorderTopPanelColor,
suffixIcon: SizedBox(width: 36), suffixIcon: SizedBox(width: 36),
hintText: S.of(context).optional_name, hintText: S.of(context).optional_name,
textInputAction: TextInputAction.next, textInputAction: TextInputAction.next,
placeholderTextStyle: TextStyle( placeholderTextStyle: TextStyle(
fontSize: 16, fontSize: 16,
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
color: Theme.of(context) color: Theme.of(context).extension<ExchangePageTheme>()!.hintTextColor,
.accentTextTheme!
.displayLarge!
.decorationColor!,
), ),
textStyle: TextStyle(fontSize: 16, fontWeight: FontWeight.w600, color: Colors.white), textStyle: TextStyle(fontSize: 16, fontWeight: FontWeight.w600, color: Colors.white),
validator: null, validator: null,
@ -91,16 +89,13 @@ class AnonInvoiceForm extends StatelessWidget {
controller: descriptionController, controller: descriptionController,
focusNode: _descriptionFocusNode, focusNode: _descriptionFocusNode,
textInputAction: TextInputAction.next, textInputAction: TextInputAction.next,
borderColor: Theme.of(context).primaryTextTheme!.bodyLarge!.color!, borderColor: Theme.of(context).extension<ExchangePageTheme>()!.textFieldBorderTopPanelColor,
suffixIcon: SizedBox(width: 36), suffixIcon: SizedBox(width: 36),
hintText: S.of(context).optional_description, hintText: S.of(context).optional_description,
placeholderTextStyle: TextStyle( placeholderTextStyle: TextStyle(
fontSize: 16, fontSize: 16,
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
color: Theme.of(context) color: Theme.of(context).extension<ExchangePageTheme>()!.hintTextColor,
.accentTextTheme!
.displayLarge!
.decorationColor!,
), ),
textStyle: TextStyle(fontSize: 16, fontWeight: FontWeight.w600, color: Colors.white), textStyle: TextStyle(fontSize: 16, fontWeight: FontWeight.w600, color: Colors.white),
validator: null, validator: null,
@ -110,17 +105,14 @@ class AnonInvoiceForm extends StatelessWidget {
controller: emailController, controller: emailController,
textInputAction: TextInputAction.next, textInputAction: TextInputAction.next,
focusNode: _emailFocusNode, focusNode: _emailFocusNode,
borderColor: Theme.of(context).primaryTextTheme!.bodyLarge!.color!, borderColor: Theme.of(context).extension<ExchangePageTheme>()!.textFieldBorderTopPanelColor,
suffixIcon: SizedBox(width: 36), suffixIcon: SizedBox(width: 36),
keyboardType: TextInputType.emailAddress, keyboardType: TextInputType.emailAddress,
hintText: S.of(context).optional_email_hint, hintText: S.of(context).optional_email_hint,
placeholderTextStyle: TextStyle( placeholderTextStyle: TextStyle(
fontSize: 16, fontSize: 16,
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
color: Theme.of(context) color: Theme.of(context).extension<ExchangePageTheme>()!.hintTextColor,
.accentTextTheme!
.displayLarge!
.decorationColor!,
), ),
textStyle: TextStyle(fontSize: 16, fontWeight: FontWeight.w600, color: Colors.white), textStyle: TextStyle(fontSize: 16, fontWeight: FontWeight.w600, color: Colors.white),
validator: EmailValidator(), validator: EmailValidator(),

View file

@ -1,6 +1,9 @@
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/exchange_page_theme.dart';
import 'package:cake_wallet/typography.dart'; import 'package:cake_wallet/typography.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
@ -31,19 +34,13 @@ class AnonInvoiceStatusSection extends StatelessWidget {
style: TextStyle( style: TextStyle(
fontSize: 14, fontSize: 14,
fontWeight: FontWeight.w500, fontWeight: FontWeight.w500,
color: Theme.of(context) color: Theme.of(context).extension<ExchangePageTheme>()!.receiveAmountColor,
.primaryTextTheme!
.displayLarge!
.decorationColor!,
), ),
), ),
Container( Container(
padding: EdgeInsets.symmetric(horizontal: 10, vertical: 5), padding: EdgeInsets.symmetric(horizontal: 10, vertical: 5),
decoration: BoxDecoration( decoration: BoxDecoration(
color: Theme.of(context) color: Theme.of(context).extension<AddressTheme>()!.actionButtonColor,
.accentTextTheme!
.displaySmall!
.color!,
borderRadius: BorderRadius.circular(10), borderRadius: BorderRadius.circular(10),
), ),
child: Row( child: Row(
@ -58,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,
), ),
) )
], ],
@ -78,16 +72,13 @@ class AnonInvoiceStatusSection extends StatelessWidget {
style: TextStyle( style: TextStyle(
fontSize: 14, fontSize: 14,
fontWeight: FontWeight.w500, fontWeight: FontWeight.w500,
color: Theme.of(context) color: Theme.of(context).extension<ExchangePageTheme>()!.receiveAmountColor,
.primaryTextTheme!
.displayLarge!
.decorationColor!,
), ),
), ),
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

@ -5,6 +5,7 @@ import 'package:cake_wallet/utils/show_bar.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter/services.dart'; import 'package:flutter/services.dart';
import 'package:share_plus/share_plus.dart'; import 'package:share_plus/share_plus.dart';
import 'package:cake_wallet/themes/extensions/dashboard_page_theme.dart';
class CopyLinkItem extends StatelessWidget { class CopyLinkItem extends StatelessWidget {
const CopyLinkItem({super.key, required this.url, required this.title}); const CopyLinkItem({super.key, required this.url, required this.title});
@ -14,10 +15,7 @@ class CopyLinkItem extends StatelessWidget {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
final copyImage = Image.asset('assets/images/copy_address.png', final copyImage = Image.asset('assets/images/copy_address.png',
color: Theme.of(context) color: Theme.of(context).extension<DashboardPageTheme>()!.textColor);
.accentTextTheme!
.displayMedium!
.backgroundColor!);
return Row( return Row(
mainAxisAlignment: MainAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center,
@ -25,10 +23,7 @@ class CopyLinkItem extends StatelessWidget {
Text( Text(
title, title,
style: textMedium( style: textMedium(
color: Theme.of(context) color: Theme.of(context).extension<DashboardPageTheme>()!.textColor,
.accentTextTheme!
.displayMedium!
.backgroundColor!,
), ),
), ),
SizedBox(width: 50), SizedBox(width: 50),
@ -51,10 +46,7 @@ class CopyLinkItem extends StatelessWidget {
onPressed: () => Share.share(url), onPressed: () => Share.share(url),
icon: Icon( icon: Icon(
Icons.share, Icons.share,
color: Theme.of(context) color: Theme.of(context).extension<DashboardPageTheme>()!.textColor,
.accentTextTheme!
.displayMedium!
.backgroundColor!,
), ),
) )
], ],

View file

@ -3,6 +3,9 @@ import 'package:cake_wallet/utils/responsive_layout_util.dart';
import 'package:cw_core/currency.dart'; import 'package:cw_core/currency.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter/services.dart'; import 'package:flutter/services.dart';
import 'package:cake_wallet/themes/extensions/dashboard_page_theme.dart';
import 'package:cake_wallet/themes/extensions/picker_theme.dart';
import 'package:cake_wallet/themes/extensions/send_page_theme.dart';
class CurrencyInputField extends StatelessWidget { class CurrencyInputField extends StatelessWidget {
const CurrencyInputField({ const CurrencyInputField({
@ -24,7 +27,7 @@ class CurrencyInputField extends StatelessWidget {
Widget build(BuildContext context) { Widget build(BuildContext context) {
final arrowBottomPurple = Image.asset( final arrowBottomPurple = Image.asset(
'assets/images/arrow_bottom_purple_icon.png', 'assets/images/arrow_bottom_purple_icon.png',
color: Theme.of(context).accentTextTheme!.displayMedium!.backgroundColor!, color: Theme.of(context).extension<DashboardPageTheme>()!.textColor,
height: 8, height: 8,
); );
// This magic number for wider screen sets the text input focus at center of the inputfield // This magic number for wider screen sets the text input focus at center of the inputfield
@ -46,13 +49,13 @@ class CurrencyInputField extends StatelessWidget {
placeholderTextStyle: isLight placeholderTextStyle: isLight
? null ? null
: TextStyle( : TextStyle(
color: Theme.of(context).primaryTextTheme!.headlineSmall!.color!, color: Theme.of(context).extension<SendPageTheme>()!.textFieldBorderColor,
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
), ),
borderColor: Theme.of(context).accentTextTheme!.titleLarge!.backgroundColor!, borderColor: Theme.of(context).extension<PickerTheme>()!.dividerColor,
textColor: Theme.of(context).accentTextTheme!.displayMedium!.backgroundColor!, textColor: Theme.of(context).extension<DashboardPageTheme>()!.textColor,
textStyle: TextStyle( textStyle: TextStyle(
color: Theme.of(context).accentTextTheme!.displayMedium!.backgroundColor!, color: Theme.of(context).extension<DashboardPageTheme>()!.textColor,
), ),
prefixIcon: Padding( prefixIcon: Padding(
padding: EdgeInsets.only( padding: EdgeInsets.only(
@ -75,10 +78,7 @@ class CurrencyInputField extends StatelessWidget {
style: TextStyle( style: TextStyle(
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
fontSize: 16, fontSize: 16,
color: Theme.of(context) color: Theme.of(context).extension<DashboardPageTheme>()!.textColor,
.accentTextTheme!
.displayMedium!
.backgroundColor!,
), ),
), ),
if (selectedCurrency.tag != null) if (selectedCurrency.tag != null)
@ -86,7 +86,7 @@ class CurrencyInputField extends StatelessWidget {
padding: const EdgeInsets.only(right: 3.0), padding: const EdgeInsets.only(right: 3.0),
child: Container( child: Container(
decoration: BoxDecoration( decoration: BoxDecoration(
color: Theme.of(context).primaryTextTheme!.headlineMedium!.color!, color: Theme.of(context).extension<SendPageTheme>()!.textFieldButtonColor,
borderRadius: BorderRadius.all( borderRadius: BorderRadius.all(
Radius.circular(6), Radius.circular(6),
), ),
@ -97,10 +97,7 @@ class CurrencyInputField extends StatelessWidget {
style: TextStyle( style: TextStyle(
fontSize: 12, fontSize: 12,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
color: Theme.of(context) color: Theme.of(context).extension<SendPageTheme>()!.textFieldButtonIconColor,
.primaryTextTheme!
.headlineMedium!
.decorationColor!,
), ),
), ),
), ),
@ -113,10 +110,7 @@ class CurrencyInputField extends StatelessWidget {
style: TextStyle( style: TextStyle(
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
fontSize: 20, fontSize: 20,
color: Theme.of(context) color: Theme.of(context).extension<DashboardPageTheme>()!.textColor,
.accentTextTheme!
.displayMedium!
.backgroundColor!,
), ),
), ),
), ),

View file

@ -1,4 +1,5 @@
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:cake_wallet/themes/extensions/receive_page_theme.dart';
class HeaderTile extends StatelessWidget { class HeaderTile extends StatelessWidget {
HeaderTile({ HeaderTile({
@ -22,7 +23,7 @@ class HeaderTile extends StatelessWidget {
top: 24, top: 24,
bottom: 24 bottom: 24
), ),
color: Theme.of(context).textTheme!.displaySmall!.decorationColor!, color: Theme.of(context).extension<ReceivePageTheme>()!.tilesBackgroundColor,
child: Row( child: Row(
mainAxisSize: MainAxisSize.max, mainAxisSize: MainAxisSize.max,
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
@ -32,17 +33,14 @@ class HeaderTile extends StatelessWidget {
style: TextStyle( style: TextStyle(
fontSize: 18, fontSize: 18,
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
color: Theme.of(context)!.textTheme.displaySmall!.color!), color: Theme.of(context).extension<ReceivePageTheme>()!.tilesTextColor),
), ),
Container( Container(
height: 32, height: 32,
width: 32, width: 32,
decoration: BoxDecoration( decoration: BoxDecoration(
shape: BoxShape.circle, shape: BoxShape.circle,
color: Theme.of(context) color: Theme.of(context).extension<ReceivePageTheme>()!.iconsBackgroundColor),
.textTheme!
.headlineMedium!
.decorationColor!),
child: icon, child: icon,
) )
], ],
@ -50,4 +48,4 @@ class HeaderTile extends StatelessWidget {
), ),
); );
} }
} }

View file

@ -1,4 +1,5 @@
import 'package:cake_wallet/entities/qr_view_data.dart'; import 'package:cake_wallet/entities/qr_view_data.dart';
import 'package:cake_wallet/themes/extensions/qr_code_theme.dart';
import 'package:cake_wallet/routes.dart'; import 'package:cake_wallet/routes.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/src/screens/receive/widgets/currency_input_field.dart'; import 'package:cake_wallet/src/screens/receive/widgets/currency_input_field.dart';
@ -12,6 +13,7 @@ import 'package:flutter_mobx/flutter_mobx.dart';
import 'package:cake_wallet/generated/i18n.dart'; import 'package:cake_wallet/generated/i18n.dart';
import 'package:cake_wallet/src/screens/receive/widgets/qr_image.dart'; import 'package:cake_wallet/src/screens/receive/widgets/qr_image.dart';
import 'package:cake_wallet/view_model/wallet_address_list/wallet_address_list_view_model.dart'; import 'package:cake_wallet/view_model/wallet_address_list/wallet_address_list_view_model.dart';
import 'package:cake_wallet/themes/extensions/dashboard_page_theme.dart';
class QRWidget extends StatelessWidget { class QRWidget extends StatelessWidget {
QRWidget({ QRWidget({
@ -35,7 +37,7 @@ class QRWidget extends StatelessWidget {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
final copyImage = Image.asset('assets/images/copy_address.png', final copyImage = Image.asset('assets/images/copy_address.png',
color: Theme.of(context).textTheme!.titleMedium!.decorationColor!); color: Theme.of(context).extension<QRCodeTheme>()!.qrWidgetCopyButtonColor);
return Column( return Column(
mainAxisSize: MainAxisSize.min, mainAxisSize: MainAxisSize.min,
@ -51,10 +53,7 @@ class QRWidget extends StatelessWidget {
style: TextStyle( style: TextStyle(
fontSize: 14, fontSize: 14,
fontWeight: FontWeight.w500, fontWeight: FontWeight.w500,
color: Theme.of(context) color: Theme.of(context).extension<DashboardPageTheme>()!.textColor),
.accentTextTheme!
.displayMedium!
.backgroundColor!),
), ),
), ),
Row( Row(
@ -85,10 +84,7 @@ class QRWidget extends StatelessWidget {
decoration: BoxDecoration( decoration: BoxDecoration(
border: Border.all( border: Border.all(
width: 3, width: 3,
color: Theme.of(context) color: Theme.of(context).extension<DashboardPageTheme>()!.textColor,
.accentTextTheme!
.displayMedium!
.backgroundColor!,
), ),
), ),
child: Container( child: Container(
@ -152,10 +148,7 @@ class QRWidget extends StatelessWidget {
style: TextStyle( style: TextStyle(
fontSize: 15, fontSize: 15,
fontWeight: FontWeight.w500, fontWeight: FontWeight.w500,
color: Theme.of(context) color: Theme.of(context).extension<DashboardPageTheme>()!.textColor),
.accentTextTheme!
.displayMedium!
.backgroundColor!),
), ),
), ),
Padding( Padding(

View file

@ -1,6 +1,7 @@
import 'dart:convert'; import 'dart:convert';
import 'package:cake_wallet/src/widgets/alert_background.dart'; import 'package:cake_wallet/src/widgets/alert_background.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/themes/extensions/dashboard_page_theme.dart';
import 'package:cake_wallet/wallet_type_utils.dart'; import 'package:cake_wallet/wallet_type_utils.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter/services.dart'; import 'package:flutter/services.dart';
@ -33,8 +34,8 @@ class ReleaseNotesScreen extends StatelessWidget {
decoration: BoxDecoration( decoration: BoxDecoration(
borderRadius: BorderRadius.circular(30.0), borderRadius: BorderRadius.circular(30.0),
gradient: LinearGradient(colors: [ gradient: LinearGradient(colors: [
Theme.of(context).colorScheme.secondary, Theme.of(context).extension<DashboardPageTheme>()!.firstGradientBackgroundColor,
Theme.of(context).scaffoldBackgroundColor, Theme.of(context).extension<DashboardPageTheme>()!.secondGradientBackgroundColor,
], begin: Alignment.centerLeft, end: Alignment.centerRight)), ], begin: Alignment.centerLeft, end: Alignment.centerRight)),
child: Padding( child: Padding(
padding: const EdgeInsets.symmetric(horizontal: 24.0), padding: const EdgeInsets.symmetric(horizontal: 24.0),
@ -51,10 +52,7 @@ class ReleaseNotesScreen extends StatelessWidget {
fontSize: 24.0, fontSize: 24.0,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
fontFamily: 'Lato', fontFamily: 'Lato',
color: Theme.of(context) color: Theme.of(context).extension<DashboardPageTheme>()!.textColor,
.accentTextTheme!
.displayMedium!
.backgroundColor!,
), ),
child: Text(title), child: Text(title),
), ),
@ -121,10 +119,7 @@ class ReleaseNotesScreen extends StatelessWidget {
decoration: TextDecoration.none, decoration: TextDecoration.none,
fontSize: 16.0, fontSize: 16.0,
fontFamily: 'Lato', fontFamily: 'Lato',
color: Theme.of(context) color: Theme.of(context).extension<DashboardPageTheme>()!.textColor,
.accentTextTheme!
.displayMedium!
.backgroundColor!,
), ),
child: Row( child: Row(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,

View file

@ -35,10 +35,7 @@ class RescanPage extends BasePage {
_blockchainHeightWidgetKey.currentState!.height); _blockchainHeightWidgetKey.currentState!.height);
Navigator.of(context).pop(); Navigator.of(context).pop();
}, },
color: Theme.of(context) color: Theme.of(context).primaryColor,
.accentTextTheme!
.bodyLarge!
.color!,
textColor: Colors.white, textColor: Colors.white,
isDisabled: !_rescanViewModel.isButtonEnabled, isDisabled: !_rescanViewModel.isButtonEnabled,
)) ))

View file

@ -75,10 +75,7 @@ class RestoreFromBackupPage extends BasePage {
restoreFromBackupViewModel.state is IsExecutingState, restoreFromBackupViewModel.state is IsExecutingState,
onPressed: () => onImportHandler(context), onPressed: () => onImportHandler(context),
text: S.of(context).import, text: S.of(context).import,
color: Theme.of(context) color: Theme.of(context).primaryColor,
.accentTextTheme!
.bodyLarge!
.color!,
textColor: Colors.white); textColor: Colors.white);
})) }))
])), ])),

View file

@ -134,10 +134,7 @@ class _RestoreFromSeedDetailsFormState
isLoading: isLoading:
widget.walletRestorationFromSeedVM.state is IsExecutingState, widget.walletRestorationFromSeedVM.state is IsExecutingState,
text: S.of(context).restore_recover, text: S.of(context).restore_recover,
color: Theme.of(context) color: Theme.of(context).primaryColor,
.accentTextTheme!
.bodyLarge!
.color!,
textColor: Colors.white, textColor: Colors.white,
isDisabled: _nameController.text.isNotEmpty, isDisabled: _nameController.text.isNotEmpty,
); );

View file

@ -1,8 +1,10 @@
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';
import 'package:flutter/scheduler.dart'; import 'package:flutter/scheduler.dart';
import 'package:cake_wallet/themes/extensions/new_wallet_theme.dart';
class SweepingWalletPage extends BasePage { class SweepingWalletPage extends BasePage {
SweepingWalletPage(); SweepingWalletPage();
@ -82,10 +84,7 @@ class _SweepingWalletWidgetState extends State<SweepingWalletWidget> {
style: TextStyle( style: TextStyle(
fontSize: 18, fontSize: 18,
fontWeight: FontWeight.w500, fontWeight: FontWeight.w500,
color: Theme.of(context) color: Theme.of(context).extension<NewWalletTheme>()!.hintTextColor,
.accentTextTheme!
.displayMedium!
.color,
), ),
textAlign: TextAlign.center, textAlign: TextAlign.center,
), ),
@ -97,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,
), ),
@ -112,10 +108,7 @@ class _SweepingWalletWidgetState extends State<SweepingWalletWidget> {
style: TextStyle( style: TextStyle(
fontSize: 16, fontSize: 16,
fontWeight: FontWeight.w500, fontWeight: FontWeight.w500,
color: Theme.of(context) color: Theme.of(context).extension<NewWalletTheme>()!.hintTextColor,
.accentTextTheme!
.displayMedium!
.color,
), ),
textAlign: TextAlign.center, textAlign: TextAlign.center,
), ),

View file

@ -10,6 +10,7 @@ import 'package:cake_wallet/src/widgets/base_text_form_field.dart';
import 'package:cake_wallet/generated/i18n.dart'; import 'package:cake_wallet/generated/i18n.dart';
import 'package:cake_wallet/core/wallet_name_validator.dart'; import 'package:cake_wallet/core/wallet_name_validator.dart';
import 'package:cake_wallet/entities/generate_name.dart'; import 'package:cake_wallet/entities/generate_name.dart';
import 'package:cake_wallet/themes/extensions/send_page_theme.dart';
class WalletRestoreFromKeysFrom extends StatefulWidget { class WalletRestoreFromKeysFrom extends StatefulWidget {
WalletRestoreFromKeysFrom({ WalletRestoreFromKeysFrom({
@ -89,10 +90,7 @@ class WalletRestoreFromKeysFromState extends State<WalletRestoreFromKeysFrom> {
height: 34, height: 34,
child: Image.asset( child: Image.asset(
'assets/images/refresh_icon.png', 'assets/images/refresh_icon.png',
color: Theme.of(context) color: Theme.of(context).extension<SendPageTheme>()!.textFieldButtonIconColor,
.primaryTextTheme!
.headlineMedium!
.decorationColor!,
), ),
), ),
), ),

View file

@ -11,6 +11,7 @@ import 'package:cake_wallet/src/widgets/blockchain_height_widget.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/generated/i18n.dart'; import 'package:cake_wallet/generated/i18n.dart';
import 'package:cake_wallet/core/wallet_name_validator.dart'; import 'package:cake_wallet/core/wallet_name_validator.dart';
import 'package:cake_wallet/themes/extensions/send_page_theme.dart';
class WalletRestoreFromSeedForm extends StatefulWidget { class WalletRestoreFromSeedForm extends StatefulWidget {
WalletRestoreFromSeedForm( WalletRestoreFromSeedForm(
@ -93,10 +94,7 @@ class WalletRestoreFromSeedFormState extends State<WalletRestoreFromSeedForm> {
height: 34, height: 34,
child: Image.asset( child: Image.asset(
'assets/images/refresh_icon.png', 'assets/images/refresh_icon.png',
color: Theme.of(context) color: Theme.of(context).extension<SendPageTheme>()!.textFieldButtonIconColor,
.primaryTextTheme!
.headlineMedium!
.decorationColor!,
), ),
), ),
), ),

View file

@ -1,3 +1,5 @@
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';
@ -22,6 +24,7 @@ import 'package:cake_wallet/generated/i18n.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/core/seed_validator.dart'; import 'package:cake_wallet/core/seed_validator.dart';
import 'package:cake_wallet/view_model/restore/restore_mode.dart'; import 'package:cake_wallet/view_model/restore/restore_mode.dart';
import 'package:cake_wallet/themes/extensions/wallet_list_theme.dart';
class WalletRestorePage extends BasePage { class WalletRestorePage extends BasePage {
WalletRestorePage(this.walletRestoreViewModel) WalletRestorePage(this.walletRestoreViewModel)
@ -91,8 +94,7 @@ class WalletRestorePage extends BasePage {
fontSize: 18.0, fontSize: 18.0,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
fontFamily: 'Lato', fontFamily: 'Lato',
color: titleColor ?? color: titleColor(context)),
Theme.of(context).primaryTextTheme!.titleLarge!.color!),
)); ));
final WalletRestoreViewModel walletRestoreViewModel; final WalletRestoreViewModel walletRestoreViewModel;
@ -139,10 +141,7 @@ class WalletRestorePage extends BasePage {
return KeyboardActions( return KeyboardActions(
config: KeyboardActionsConfig( config: KeyboardActionsConfig(
keyboardActionsPlatform: KeyboardActionsPlatform.IOS, keyboardActionsPlatform: KeyboardActionsPlatform.IOS,
keyboardBarColor: Theme.of(context) keyboardBarColor: Theme.of(context).extension<KeyboardTheme>()!.keyboardBarColor,
.accentTextTheme!
.bodyLarge!
.backgroundColor!,
nextFocus: false, nextFocus: false,
actions: [ actions: [
KeyboardActionsItem( KeyboardActionsItem(
@ -194,14 +193,8 @@ class WalletRestorePage extends BasePage {
return LoadingPrimaryButton( return LoadingPrimaryButton(
onPressed: _confirmForm, onPressed: _confirmForm,
text: S.of(context).restore_recover, text: S.of(context).restore_recover,
color: Theme.of(context) color: Theme.of(context).extension<WalletListTheme>()!.createNewWalletButtonBackgroundColor,
.accentTextTheme! textColor: Theme.of(context).extension<WalletListTheme>()!.restoreWalletButtonTextColor,
.titleSmall!
.decorationColor!,
textColor: Theme.of(context)
.accentTextTheme!
.headlineSmall!
.decorationColor!,
isLoading: walletRestoreViewModel.state is IsExecutingState, isLoading: walletRestoreViewModel.state is IsExecutingState,
isDisabled: !walletRestoreViewModel.isButtonEnabled, isDisabled: !walletRestoreViewModel.isButtonEnabled,
); );

Some files were not shown because too many files have changed in this diff Show more