mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2024-12-23 12:09:43 +00:00
refactor: create DashboardPageTheme and use textColor
This commit is contained in:
parent
09e2567953
commit
bc8ce7bf60
31 changed files with 155 additions and 249 deletions
|
@ -30,6 +30,7 @@ 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';
|
||||||
|
|
||||||
class DashboardPage extends StatelessWidget {
|
class DashboardPage extends StatelessWidget {
|
||||||
DashboardPage({
|
DashboardPage({
|
||||||
|
@ -89,10 +90,7 @@ class _DashboardPageView extends BasePage {
|
||||||
@override
|
@override
|
||||||
Widget trailing(BuildContext context) {
|
Widget trailing(BuildContext context) {
|
||||||
final menuButton = Image.asset('assets/images/menu.png',
|
final menuButton = Image.asset('assets/images/menu.png',
|
||||||
color: Theme.of(context)
|
color: Theme.of(context).extension<DashboardPageTheme>()!.textColor);
|
||||||
.accentTextTheme!
|
|
||||||
.displayMedium!
|
|
||||||
.backgroundColor);
|
|
||||||
|
|
||||||
return Container(
|
return Container(
|
||||||
alignment: Alignment.centerRight,
|
alignment: Alignment.centerRight,
|
||||||
|
@ -199,10 +197,7 @@ class _DashboardPageView extends BasePage {
|
||||||
color: action.isEnabled?.call(
|
color: action.isEnabled?.call(
|
||||||
dashboardViewModel) ??
|
dashboardViewModel) ??
|
||||||
true
|
true
|
||||||
? Theme.of(context)
|
? Theme.of(context).extension<DashboardPageTheme>()!.textColor
|
||||||
.accentTextTheme!
|
|
||||||
.displayMedium!
|
|
||||||
.backgroundColor!
|
|
||||||
: Theme.of(context)
|
: Theme.of(context)
|
||||||
.accentTextTheme!
|
.accentTextTheme!
|
||||||
.displaySmall!
|
.displaySmall!
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
import 'package:auto_size_text/auto_size_text.dart';
|
import 'package:auto_size_text/auto_size_text.dart';
|
||||||
|
import 'package:cake_wallet/themes/extensions/dashboard_page_theme.dart';
|
||||||
import 'package:cake_wallet/themes/extensions/sync_indicator_theme.dart';
|
import 'package:cake_wallet/themes/extensions/sync_indicator_theme.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
|
@ -42,10 +43,7 @@ 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!
|
|
||||||
.displayMedium!
|
|
||||||
.backgroundColor!
|
|
||||||
: Theme.of(context)
|
: Theme.of(context)
|
||||||
.accentTextTheme!
|
.accentTextTheme!
|
||||||
.displaySmall!
|
.displaySmall!
|
||||||
|
@ -59,10 +57,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,
|
||||||
),
|
),
|
||||||
|
|
|
@ -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,10 +47,7 @@ class ActionButton extends StatelessWidget {
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontSize: 10,
|
fontSize: 10,
|
||||||
color: textColor ??
|
color: textColor ??
|
||||||
Theme.of(context)
|
Theme.of(context).extension<DashboardPageTheme>()!.textColor),
|
||||||
.accentTextTheme!
|
|
||||||
.displayMedium!
|
|
||||||
.backgroundColor!),
|
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
|
|
@ -24,6 +24,7 @@ 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';
|
||||||
|
|
||||||
class AddressPage extends BasePage {
|
class AddressPage extends BasePage {
|
||||||
AddressPage({
|
AddressPage({
|
||||||
|
@ -55,7 +56,7 @@ class AddressPage extends BasePage {
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Color? get titleColor =>
|
Color? get titleColor =>
|
||||||
currentTheme.themeData.accentTextTheme.displayMedium!.backgroundColor;
|
currentTheme.themeData.extension<DashboardPageTheme>()!.textColor;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
bool get resizeToAvoidBottomInset => false;
|
bool get resizeToAvoidBottomInset => false;
|
||||||
|
@ -204,18 +205,12 @@ 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: Theme.of(context)
|
color: Theme.of(context).extension<DashboardPageTheme>()!.textColor,
|
||||||
.accentTextTheme!
|
|
||||||
.displayMedium!
|
|
||||||
.backgroundColor!,
|
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
|
|
@ -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 AnonpayTransactionRow extends StatelessWidget {
|
class AnonpayTransactionRow extends StatelessWidget {
|
||||||
AnonpayTransactionRow({
|
AnonpayTransactionRow({
|
||||||
|
@ -37,12 +38,12 @@ 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>[
|
||||||
|
|
|
@ -8,6 +8,7 @@ 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';
|
||||||
|
|
||||||
class BalancePage extends StatelessWidget {
|
class BalancePage extends StatelessWidget {
|
||||||
BalancePage({required this.dashboardViewModel, required this.settingsStore});
|
BalancePage({required this.dashboardViewModel, required this.settingsStore});
|
||||||
|
@ -36,10 +37,7 @@ class BalancePage extends StatelessWidget {
|
||||||
fontSize: 24,
|
fontSize: 24,
|
||||||
fontFamily: 'Lato',
|
fontFamily: 'Lato',
|
||||||
fontWeight: FontWeight.w600,
|
fontWeight: FontWeight.w600,
|
||||||
color: Theme.of(context)
|
color: Theme.of(context).extension<DashboardPageTheme>()!.textColor,
|
||||||
.accentTextTheme!
|
|
||||||
.displayMedium!
|
|
||||||
.backgroundColor!,
|
|
||||||
height: 1),
|
height: 1),
|
||||||
maxLines: 1,
|
maxLines: 1,
|
||||||
textAlign: TextAlign.center);
|
textAlign: TextAlign.center);
|
||||||
|
@ -129,10 +127,7 @@ class BalancePage extends StatelessWidget {
|
||||||
fontSize: 24,
|
fontSize: 24,
|
||||||
fontFamily: 'Lato',
|
fontFamily: 'Lato',
|
||||||
fontWeight: FontWeight.w900,
|
fontWeight: FontWeight.w900,
|
||||||
color: Theme.of(context)
|
color: Theme.of(context).extension<DashboardPageTheme>()!.textColor,
|
||||||
.accentTextTheme!
|
|
||||||
.displayMedium!
|
|
||||||
.backgroundColor!,
|
|
||||||
height: 1),
|
height: 1),
|
||||||
maxLines: 1,
|
maxLines: 1,
|
||||||
textAlign: TextAlign.start),
|
textAlign: TextAlign.start),
|
||||||
|
@ -142,10 +137,7 @@ class BalancePage extends StatelessWidget {
|
||||||
fontSize: 28,
|
fontSize: 28,
|
||||||
fontFamily: 'Lato',
|
fontFamily: 'Lato',
|
||||||
fontWeight: FontWeight.w800,
|
fontWeight: FontWeight.w800,
|
||||||
color: Theme.of(context)
|
color: Theme.of(context).extension<DashboardPageTheme>()!.textColor,
|
||||||
.accentTextTheme!
|
|
||||||
.displayMedium!
|
|
||||||
.backgroundColor!,
|
|
||||||
height: 1)),
|
height: 1)),
|
||||||
]),
|
]),
|
||||||
SizedBox(
|
SizedBox(
|
||||||
|
@ -157,10 +149,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<DashboardPageTheme>()!.textColor,
|
||||||
.accentTextTheme!
|
|
||||||
.displayMedium!
|
|
||||||
.backgroundColor!,
|
|
||||||
height: 1)),
|
height: 1)),
|
||||||
SizedBox(height: 26),
|
SizedBox(height: 26),
|
||||||
if (frozenBalance.isNotEmpty)
|
if (frozenBalance.isNotEmpty)
|
||||||
|
@ -182,10 +171,7 @@ class BalancePage extends StatelessWidget {
|
||||||
fontSize: 20,
|
fontSize: 20,
|
||||||
fontFamily: 'Lato',
|
fontFamily: 'Lato',
|
||||||
fontWeight: FontWeight.w400,
|
fontWeight: FontWeight.w400,
|
||||||
color: Theme.of(context)
|
color: Theme.of(context).extension<DashboardPageTheme>()!.textColor,
|
||||||
.accentTextTheme!
|
|
||||||
.displayMedium!
|
|
||||||
.backgroundColor!,
|
|
||||||
height: 1),
|
height: 1),
|
||||||
maxLines: 1,
|
maxLines: 1,
|
||||||
textAlign: TextAlign.center),
|
textAlign: TextAlign.center),
|
||||||
|
@ -197,10 +183,7 @@ class BalancePage extends StatelessWidget {
|
||||||
fontSize: 12,
|
fontSize: 12,
|
||||||
fontFamily: 'Lato',
|
fontFamily: 'Lato',
|
||||||
fontWeight: FontWeight.w400,
|
fontWeight: FontWeight.w400,
|
||||||
color: Theme.of(context)
|
color: Theme.of(context).extension<DashboardPageTheme>()!.textColor,
|
||||||
.accentTextTheme!
|
|
||||||
.displayMedium!
|
|
||||||
.backgroundColor!,
|
|
||||||
height: 1),
|
height: 1),
|
||||||
),
|
),
|
||||||
SizedBox(height: 24)
|
SizedBox(height: 24)
|
||||||
|
@ -222,10 +205,7 @@ class BalancePage extends StatelessWidget {
|
||||||
fontSize: 20,
|
fontSize: 20,
|
||||||
fontFamily: 'Lato',
|
fontFamily: 'Lato',
|
||||||
fontWeight: FontWeight.w400,
|
fontWeight: FontWeight.w400,
|
||||||
color: Theme.of(context)
|
color: Theme.of(context).extension<DashboardPageTheme>()!.textColor,
|
||||||
.accentTextTheme!
|
|
||||||
.displayMedium!
|
|
||||||
.backgroundColor!,
|
|
||||||
height: 1),
|
height: 1),
|
||||||
maxLines: 1,
|
maxLines: 1,
|
||||||
textAlign: TextAlign.center),
|
textAlign: TextAlign.center),
|
||||||
|
@ -239,10 +219,7 @@ class BalancePage extends StatelessWidget {
|
||||||
fontSize: 12,
|
fontSize: 12,
|
||||||
fontFamily: 'Lato',
|
fontFamily: 'Lato',
|
||||||
fontWeight: FontWeight.w400,
|
fontWeight: FontWeight.w400,
|
||||||
color: Theme.of(context)
|
color: Theme.of(context).extension<DashboardPageTheme>()!.textColor,
|
||||||
.accentTextTheme!
|
|
||||||
.displayMedium!
|
|
||||||
.backgroundColor!,
|
|
||||||
height: 1),
|
height: 1),
|
||||||
)
|
)
|
||||||
])),
|
])),
|
||||||
|
|
|
@ -3,6 +3,7 @@ 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});
|
||||||
|
@ -27,10 +28,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>()!.textColor),
|
||||||
.accentTextTheme!
|
|
||||||
.displayMedium!
|
|
||||||
.backgroundColor!),
|
|
||||||
),
|
),
|
||||||
GestureDetector(
|
GestureDetector(
|
||||||
onTap: () {
|
onTap: () {
|
||||||
|
|
|
@ -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>()!.textColor,
|
||||||
.accentTextTheme!
|
|
||||||
.displayMedium!
|
|
||||||
.backgroundColor!,
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Expanded(
|
Expanded(
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
import 'package:cake_wallet/buy/buy_provider_description.dart';
|
import 'package:cake_wallet/buy/buy_provider_description.dart';
|
||||||
import 'package:cake_wallet/buy/get_buy_provider_icon.dart';
|
import 'package:cake_wallet/buy/get_buy_provider_icon.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({
|
||||||
|
@ -48,14 +49,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()
|
||||||
]),
|
]),
|
||||||
|
|
|
@ -7,6 +7,7 @@ import 'package:cake_wallet/view_model/dashboard/receive_option_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/generated/i18n.dart';
|
import 'package:cake_wallet/generated/i18n.dart';
|
||||||
|
import 'package:cake_wallet/themes/extensions/dashboard_page_theme.dart';
|
||||||
|
|
||||||
class PresentReceiveOptionPicker extends StatelessWidget {
|
class PresentReceiveOptionPicker extends StatelessWidget {
|
||||||
PresentReceiveOptionPicker(
|
PresentReceiveOptionPicker(
|
||||||
|
@ -18,10 +19,7 @@ class PresentReceiveOptionPicker extends StatelessWidget {
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
final textIconTheme = gradientBackground
|
final textIconTheme = gradientBackground
|
||||||
? Theme.of(context)
|
? Theme.of(context).extension<DashboardPageTheme>()!.textColor
|
||||||
.accentTextTheme!
|
|
||||||
.displayMedium!
|
|
||||||
.backgroundColor!
|
|
||||||
: Colors.white;
|
: Colors.white;
|
||||||
final arrowBottom = Image.asset(
|
final arrowBottom = Image.asset(
|
||||||
'assets/images/arrow_bottom_purple_icon.png',
|
'assets/images/arrow_bottom_purple_icon.png',
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
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 +44,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),
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
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';
|
||||||
|
|
||||||
class TransactionRow extends StatelessWidget {
|
class TransactionRow extends StatelessWidget {
|
||||||
TransactionRow(
|
TransactionRow(
|
||||||
|
@ -54,14 +55,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(
|
||||||
|
|
|
@ -10,6 +10,7 @@ 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';
|
||||||
|
|
||||||
class IoniaAccountCardsPage extends BasePage {
|
class IoniaAccountCardsPage extends BasePage {
|
||||||
IoniaAccountCardsPage(this.ioniaAccountViewModel);
|
IoniaAccountCardsPage(this.ioniaAccountViewModel);
|
||||||
|
@ -161,10 +162,7 @@ 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).extension<ExchangePageTheme>()!.firstGradientBottomPanelColor),
|
Theme.of(context).extension<ExchangePageTheme>()!.firstGradientBottomPanelColor),
|
||||||
),
|
),
|
||||||
|
|
|
@ -18,6 +18,7 @@ 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';
|
||||||
|
|
||||||
class IoniaManageCardsPage extends BasePage {
|
class IoniaManageCardsPage extends BasePage {
|
||||||
IoniaManageCardsPage(this._cardsListViewModel): searchFocusNode = FocusNode() {
|
IoniaManageCardsPage(this._cardsListViewModel): searchFocusNode = FocusNode() {
|
||||||
|
@ -59,10 +60,7 @@ class IoniaManageCardsPage 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,
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -94,10 +92,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!,
|
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -230,7 +225,7 @@ class _IoniaManageCardsPageBodyState extends State<IoniaManageCardsPageBody> {
|
||||||
title: merchant.legalName,
|
title: merchant.legalName,
|
||||||
subTitle: merchant.avaibilityStatus,
|
subTitle: merchant.avaibilityStatus,
|
||||||
backgroundColor: Theme.of(context).extension<SyncIndicatorTheme>()!.syncedBackgroundColor,
|
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).accentTextTheme!.displaySmall!.backgroundColor!,
|
||||||
discount: merchant.discount,
|
discount: merchant.discount,
|
||||||
);
|
);
|
||||||
|
@ -251,7 +246,7 @@ 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).extension<ExchangePageTheme>()!.firstGradientBottomPanelColor),
|
valueColor: AlwaysStoppedAnimation<Color>(Theme.of(context).extension<ExchangePageTheme>()!.firstGradientBottomPanelColor),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
@ -280,7 +275,7 @@ class _SearchWidget extends StatelessWidget {
|
||||||
|
|
||||||
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,
|
||||||
|
@ -335,7 +330,7 @@ class _TrailingIcon extends StatelessWidget {
|
||||||
onPressed: onPressed,
|
onPressed: onPressed,
|
||||||
icon: Image.asset(
|
icon: Image.asset(
|
||||||
asset,
|
asset,
|
||||||
color: Theme.of(context).accentTextTheme!.displayMedium!.backgroundColor!,
|
color: Theme.of(context).extension<DashboardPageTheme>()!.textColor,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|
|
@ -2,7 +2,7 @@ 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/generated/i18n.dart';
|
import 'package:cake_wallet/generated/i18n.dart';
|
||||||
import 'package:cake_wallet/themes/extensions/dashboard_gradient_theme.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';
|
||||||
|
|
||||||
|
@ -78,8 +78,8 @@ class _GradiantContainer extends StatelessWidget {
|
||||||
borderRadius: BorderRadius.circular(15),
|
borderRadius: BorderRadius.circular(15),
|
||||||
gradient: LinearGradient(
|
gradient: LinearGradient(
|
||||||
colors: [
|
colors: [
|
||||||
Theme.of(context).extension<DashboardGradientTheme>()!.secondGradientColor,
|
Theme.of(context).extension<DashboardPageTheme>()!.secondGradientBackgroundColor,
|
||||||
Theme.of(context).extension<DashboardGradientTheme>()!.firstGradientColor,
|
Theme.of(context).extension<DashboardPageTheme>()!.firstGradientBackgroundColor,
|
||||||
],
|
],
|
||||||
begin: Alignment.topRight,
|
begin: Alignment.topRight,
|
||||||
end: Alignment.bottomLeft,
|
end: Alignment.bottomLeft,
|
||||||
|
|
|
@ -12,6 +12,7 @@ import 'package:cake_wallet/src/screens/receive/widgets/copy_link_item.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;
|
||||||
|
@ -31,10 +32,7 @@ class AnonPayReceivePage 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,
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -61,10 +59,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: Theme.of(context).extension<DashboardPageTheme>()!.textColor),
|
||||||
.accentTextTheme!
|
|
||||||
.displayMedium!
|
|
||||||
.backgroundColor!),
|
|
||||||
),
|
),
|
||||||
Text(
|
Text(
|
||||||
invoiceInfo is AnonpayInvoiceInfo
|
invoiceInfo is AnonpayInvoiceInfo
|
||||||
|
@ -147,10 +142,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(
|
||||||
|
|
|
@ -3,6 +3,7 @@ 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: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});
|
||||||
|
@ -19,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,
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -62,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)),
|
||||||
|
|
|
@ -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!,
|
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
|
|
|
@ -3,6 +3,7 @@ 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';
|
||||||
|
|
||||||
class CurrencyInputField extends StatelessWidget {
|
class CurrencyInputField extends StatelessWidget {
|
||||||
const CurrencyInputField({
|
const CurrencyInputField({
|
||||||
|
@ -24,7 +25,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
|
||||||
|
@ -50,9 +51,9 @@ class CurrencyInputField extends StatelessWidget {
|
||||||
fontWeight: FontWeight.w600,
|
fontWeight: FontWeight.w600,
|
||||||
),
|
),
|
||||||
borderColor: Theme.of(context).accentTextTheme!.titleLarge!.backgroundColor!,
|
borderColor: Theme.of(context).accentTextTheme!.titleLarge!.backgroundColor!,
|
||||||
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 +76,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)
|
||||||
|
@ -113,10 +111,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!,
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
|
@ -12,6 +12,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({
|
||||||
|
@ -51,10 +52,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 +83,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 +147,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(
|
||||||
|
|
|
@ -1,7 +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_gradient_theme.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';
|
||||||
|
@ -34,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).extension<DashboardGradientTheme>()!.firstGradientColor,
|
Theme.of(context).extension<DashboardPageTheme>()!.firstGradientBackgroundColor,
|
||||||
Theme.of(context).extension<DashboardGradientTheme>()!.secondGradientColor,
|
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),
|
||||||
|
@ -52,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),
|
||||||
),
|
),
|
||||||
|
@ -122,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,
|
||||||
|
|
|
@ -13,6 +13,7 @@ import 'package:animate_do/animate_do.dart';
|
||||||
import 'package:flutter_mobx/flutter_mobx.dart';
|
import 'package:flutter_mobx/flutter_mobx.dart';
|
||||||
import 'package:url_launcher/url_launcher.dart';
|
import 'package:url_launcher/url_launcher.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';
|
||||||
|
|
||||||
class YatEmojiId extends StatelessWidget {
|
class YatEmojiId extends StatelessWidget {
|
||||||
YatEmojiId(this.emojiId);
|
YatEmojiId(this.emojiId);
|
||||||
|
@ -90,7 +91,7 @@ class YatEmojiId extends StatelessWidget {
|
||||||
fontSize: 32,
|
fontSize: 32,
|
||||||
fontWeight: FontWeight.bold,
|
fontWeight: FontWeight.bold,
|
||||||
fontFamily: 'Lato',
|
fontFamily: 'Lato',
|
||||||
color: Theme.of(context).accentTextTheme!.displayMedium!.backgroundColor!,
|
color: Theme.of(context).extension<DashboardPageTheme>()!.textColor,
|
||||||
decoration: TextDecoration.none,
|
decoration: TextDecoration.none,
|
||||||
)
|
)
|
||||||
),
|
),
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import 'package:cake_wallet/themes/extensions/dashboard_gradient_theme.dart';
|
import 'package:cake_wallet/themes/extensions/dashboard_page_theme.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
class GradientBackground extends StatelessWidget {
|
class GradientBackground extends StatelessWidget {
|
||||||
|
@ -13,14 +13,14 @@ class GradientBackground extends StatelessWidget {
|
||||||
gradient: LinearGradient(
|
gradient: LinearGradient(
|
||||||
colors: [
|
colors: [
|
||||||
Theme.of(context)
|
Theme.of(context)
|
||||||
.extension<DashboardGradientTheme>()!
|
.extension<DashboardPageTheme>()!
|
||||||
.firstGradientColor,
|
.firstGradientBackgroundColor,
|
||||||
Theme.of(context)
|
Theme.of(context)
|
||||||
.extension<DashboardGradientTheme>()!
|
.extension<DashboardPageTheme>()!
|
||||||
.secondGradientColor,
|
.secondGradientBackgroundColor,
|
||||||
Theme.of(context)
|
Theme.of(context)
|
||||||
.extension<DashboardGradientTheme>()!
|
.extension<DashboardPageTheme>()!
|
||||||
.thirdGradientColor,
|
.thirdGradientBackgroundColor,
|
||||||
],
|
],
|
||||||
begin: Alignment.topRight,
|
begin: Alignment.topRight,
|
||||||
end: Alignment.bottomLeft,
|
end: Alignment.bottomLeft,
|
||||||
|
|
|
@ -2,6 +2,7 @@ import 'package:auto_size_text/auto_size_text.dart';
|
||||||
import 'package:cake_wallet/themes/extensions/sync_indicator_theme.dart';
|
import 'package:cake_wallet/themes/extensions/sync_indicator_theme.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:cake_wallet/palette.dart';
|
import 'package:cake_wallet/palette.dart';
|
||||||
|
import 'package:cake_wallet/themes/extensions/dashboard_page_theme.dart';
|
||||||
|
|
||||||
class IntroducingCard extends StatelessWidget {
|
class IntroducingCard extends StatelessWidget {
|
||||||
IntroducingCard(
|
IntroducingCard(
|
||||||
|
@ -45,10 +46,7 @@ class IntroducingCard extends StatelessWidget {
|
||||||
fontSize: 24,
|
fontSize: 24,
|
||||||
fontFamily: 'Lato',
|
fontFamily: 'Lato',
|
||||||
fontWeight: FontWeight.bold,
|
fontWeight: FontWeight.bold,
|
||||||
color: Theme.of(context)
|
color: Theme.of(context).extension<DashboardPageTheme>()!.textColor,
|
||||||
.accentTextTheme!
|
|
||||||
.displayMedium!
|
|
||||||
.backgroundColor!,
|
|
||||||
height: 1),
|
height: 1),
|
||||||
maxLines: 1,
|
maxLines: 1,
|
||||||
textAlign: TextAlign.center),
|
textAlign: TextAlign.center),
|
||||||
|
@ -58,10 +56,7 @@ class IntroducingCard extends StatelessWidget {
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontSize: 12,
|
fontSize: 12,
|
||||||
fontFamily: 'Lato',
|
fontFamily: 'Lato',
|
||||||
color: Theme.of(context)
|
color: Theme.of(context).extension<DashboardPageTheme>()!.textColor,
|
||||||
.accentTextTheme!
|
|
||||||
.displayMedium!
|
|
||||||
.backgroundColor!,
|
|
||||||
height: 1)),
|
height: 1)),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
import 'package:cake_wallet/themes/extensions/sync_indicator_theme.dart';
|
import 'package:cake_wallet/themes/extensions/sync_indicator_theme.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:cake_wallet/themes/extensions/dashboard_page_theme.dart';
|
||||||
|
|
||||||
class MarketPlaceItem extends StatelessWidget {
|
class MarketPlaceItem extends StatelessWidget {
|
||||||
|
|
||||||
|
@ -40,10 +41,7 @@ class MarketPlaceItem extends StatelessWidget {
|
||||||
Text(
|
Text(
|
||||||
title,
|
title,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: Theme.of(context)
|
color: Theme.of(context).extension<DashboardPageTheme>()!.textColor,
|
||||||
.accentTextTheme!
|
|
||||||
.displayMedium!
|
|
||||||
.backgroundColor!,
|
|
||||||
fontSize: 24,
|
fontSize: 24,
|
||||||
fontWeight: FontWeight.w900,
|
fontWeight: FontWeight.w900,
|
||||||
),
|
),
|
||||||
|
@ -52,10 +50,7 @@ class MarketPlaceItem extends StatelessWidget {
|
||||||
Text(
|
Text(
|
||||||
subTitle,
|
subTitle,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: Theme.of(context)
|
color: Theme.of(context).extension<DashboardPageTheme>()!.textColor,
|
||||||
.accentTextTheme!
|
|
||||||
.displayMedium!
|
|
||||||
.backgroundColor!,
|
|
||||||
fontWeight: FontWeight.w500,
|
fontWeight: FontWeight.w500,
|
||||||
fontFamily: 'Lato'),
|
fontFamily: 'Lato'),
|
||||||
)
|
)
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import 'package:cake_wallet/themes/extensions/dashboard_gradient_theme.dart';
|
import 'package:cake_wallet/themes/extensions/dashboard_page_theme.dart';
|
||||||
import 'package:cake_wallet/themes/extensions/exchange_page_theme.dart';
|
import 'package:cake_wallet/themes/extensions/exchange_page_theme.dart';
|
||||||
import 'package:cake_wallet/themes/extensions/sync_indicator_theme.dart';
|
import 'package:cake_wallet/themes/extensions/sync_indicator_theme.dart';
|
||||||
import 'package:cake_wallet/themes/light_theme.dart';
|
import 'package:cake_wallet/themes/light_theme.dart';
|
||||||
|
@ -20,10 +20,11 @@ class BrightTheme extends LightTheme {
|
||||||
Color get containerColor => Palette.moderateLavender;
|
Color get containerColor => Palette.moderateLavender;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
DashboardGradientTheme get pageGradientTheme => DashboardGradientTheme(
|
DashboardPageTheme get pageGradientTheme => super.pageGradientTheme.copyWith(
|
||||||
firstGradientColor: Palette.blueCraiola,
|
firstGradientBackgroundColor: Palette.blueCraiola,
|
||||||
secondGradientColor: Palette.pinkFlamingo,
|
secondGradientBackgroundColor: Palette.pinkFlamingo,
|
||||||
thirdGradientColor: Palette.redHat);
|
thirdGradientBackgroundColor: Palette.redHat,
|
||||||
|
textColor: Colors.white);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
SyncIndicatorTheme get syncIndicatorStyle =>
|
SyncIndicatorTheme get syncIndicatorStyle =>
|
||||||
|
@ -210,8 +211,6 @@ class BrightTheme extends LightTheme {
|
||||||
color: Palette.darkGray, // hint text (new wallet page)
|
color: Palette.darkGray, // hint text (new wallet page)
|
||||||
decorationColor:
|
decorationColor:
|
||||||
Palette.periwinkleCraiola, // underline (new wallet page)
|
Palette.periwinkleCraiola, // underline (new wallet page)
|
||||||
backgroundColor:
|
|
||||||
Colors.white // menu, icons, balance (dashboard page)
|
|
||||||
),
|
),
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
|
@ -245,8 +245,6 @@ class DarkTheme extends ThemeBase {
|
||||||
color: PaletteDark.cyanBlue, // hint text (new wallet page)
|
color: PaletteDark.cyanBlue, // hint text (new wallet page)
|
||||||
decorationColor:
|
decorationColor:
|
||||||
PaletteDark.darkGrey, // underline (new wallet page)
|
PaletteDark.darkGrey, // underline (new wallet page)
|
||||||
backgroundColor:
|
|
||||||
Colors.white // menu, icons, balance (dashboard page)
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|
|
@ -1,41 +0,0 @@
|
||||||
import 'package:flutter/material.dart';
|
|
||||||
|
|
||||||
class DashboardGradientTheme extends ThemeExtension<DashboardGradientTheme> {
|
|
||||||
final Color firstGradientColor;
|
|
||||||
final Color secondGradientColor;
|
|
||||||
final Color thirdGradientColor;
|
|
||||||
|
|
||||||
DashboardGradientTheme(
|
|
||||||
{required this.firstGradientColor,
|
|
||||||
required this.secondGradientColor,
|
|
||||||
required this.thirdGradientColor});
|
|
||||||
|
|
||||||
@override
|
|
||||||
Object get type => DashboardGradientTheme;
|
|
||||||
|
|
||||||
@override
|
|
||||||
DashboardGradientTheme copyWith(
|
|
||||||
{Color? firstGradientColor,
|
|
||||||
Color? secondGradientColor,
|
|
||||||
Color? thirdGradientColor}) =>
|
|
||||||
DashboardGradientTheme(
|
|
||||||
firstGradientColor: firstGradientColor ?? this.firstGradientColor,
|
|
||||||
secondGradientColor: secondGradientColor ?? this.secondGradientColor,
|
|
||||||
thirdGradientColor: thirdGradientColor ?? this.thirdGradientColor);
|
|
||||||
|
|
||||||
@override
|
|
||||||
DashboardGradientTheme lerp(ThemeExtension<DashboardGradientTheme>? other, double t) {
|
|
||||||
if (other is! DashboardGradientTheme) {
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
return DashboardGradientTheme(
|
|
||||||
firstGradientColor:
|
|
||||||
Color.lerp(firstGradientColor, other.firstGradientColor, t)!,
|
|
||||||
secondGradientColor:
|
|
||||||
Color.lerp(secondGradientColor, other.secondGradientColor, t)!,
|
|
||||||
thirdGradientColor:
|
|
||||||
Color.lerp(thirdGradientColor, other.thirdGradientColor, t)!);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
51
lib/themes/extensions/dashboard_page_theme.dart
Normal file
51
lib/themes/extensions/dashboard_page_theme.dart
Normal file
|
@ -0,0 +1,51 @@
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
|
class DashboardPageTheme extends ThemeExtension<DashboardPageTheme> {
|
||||||
|
final Color firstGradientBackgroundColor;
|
||||||
|
final Color secondGradientBackgroundColor;
|
||||||
|
final Color thirdGradientBackgroundColor;
|
||||||
|
final Color textColor;
|
||||||
|
|
||||||
|
DashboardPageTheme(
|
||||||
|
{required this.firstGradientBackgroundColor,
|
||||||
|
required this.secondGradientBackgroundColor,
|
||||||
|
required this.thirdGradientBackgroundColor,
|
||||||
|
required this.textColor});
|
||||||
|
|
||||||
|
@override
|
||||||
|
Object get type => DashboardPageTheme;
|
||||||
|
|
||||||
|
@override
|
||||||
|
DashboardPageTheme copyWith(
|
||||||
|
{Color? firstGradientBackgroundColor,
|
||||||
|
Color? secondGradientBackgroundColor,
|
||||||
|
Color? thirdGradientBackgroundColor,
|
||||||
|
Color? textColor}) =>
|
||||||
|
DashboardPageTheme(
|
||||||
|
firstGradientBackgroundColor:
|
||||||
|
firstGradientBackgroundColor ?? this.firstGradientBackgroundColor,
|
||||||
|
secondGradientBackgroundColor: secondGradientBackgroundColor ??
|
||||||
|
this.secondGradientBackgroundColor,
|
||||||
|
thirdGradientBackgroundColor:
|
||||||
|
thirdGradientBackgroundColor ?? this.thirdGradientBackgroundColor,
|
||||||
|
textColor: textColor ?? this.textColor);
|
||||||
|
|
||||||
|
@override
|
||||||
|
DashboardPageTheme lerp(ThemeExtension<DashboardPageTheme>? other, double t) {
|
||||||
|
if (other is! DashboardPageTheme) {
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
return DashboardPageTheme(
|
||||||
|
firstGradientBackgroundColor: Color.lerp(firstGradientBackgroundColor,
|
||||||
|
other.firstGradientBackgroundColor, t) ??
|
||||||
|
firstGradientBackgroundColor,
|
||||||
|
secondGradientBackgroundColor: Color.lerp(secondGradientBackgroundColor,
|
||||||
|
other.secondGradientBackgroundColor, t) ??
|
||||||
|
secondGradientBackgroundColor,
|
||||||
|
thirdGradientBackgroundColor: Color.lerp(thirdGradientBackgroundColor,
|
||||||
|
other.thirdGradientBackgroundColor, t) ??
|
||||||
|
thirdGradientBackgroundColor,
|
||||||
|
textColor: Color.lerp(textColor, other.textColor, t) ?? textColor);
|
||||||
|
}
|
||||||
|
}
|
|
@ -242,8 +242,6 @@ class LightTheme extends ThemeBase {
|
||||||
color: Palette.darkGray, // hint text (new wallet page)
|
color: Palette.darkGray, // hint text (new wallet page)
|
||||||
decorationColor:
|
decorationColor:
|
||||||
Palette.periwinkleCraiola, // underline (new wallet page)
|
Palette.periwinkleCraiola, // underline (new wallet page)
|
||||||
backgroundColor:
|
|
||||||
Palette.darkBlueCraiola // menu, icons, balance (dashboard page)
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import 'package:cake_wallet/themes/extensions/cake_scrollbar_theme.dart';
|
import 'package:cake_wallet/themes/extensions/cake_scrollbar_theme.dart';
|
||||||
import 'package:cake_wallet/themes/extensions/dashboard_gradient_theme.dart';
|
import 'package:cake_wallet/themes/extensions/dashboard_page_theme.dart';
|
||||||
import 'package:cake_wallet/themes/extensions/exchange_page_theme.dart';
|
import 'package:cake_wallet/themes/extensions/exchange_page_theme.dart';
|
||||||
import 'package:cake_wallet/themes/extensions/keyboard_theme.dart';
|
import 'package:cake_wallet/themes/extensions/keyboard_theme.dart';
|
||||||
import 'package:cake_wallet/themes/extensions/pin_code_theme.dart';
|
import 'package:cake_wallet/themes/extensions/pin_code_theme.dart';
|
||||||
|
@ -37,10 +37,11 @@ abstract class ThemeBase {
|
||||||
colorScheme: colorScheme,
|
colorScheme: colorScheme,
|
||||||
textTheme: TextTheme().apply(fontFamily: 'Lato'));
|
textTheme: TextTheme().apply(fontFamily: 'Lato'));
|
||||||
|
|
||||||
DashboardGradientTheme get pageGradientTheme => DashboardGradientTheme(
|
DashboardPageTheme get pageGradientTheme => DashboardPageTheme(
|
||||||
firstGradientColor: backgroundColor,
|
firstGradientBackgroundColor: backgroundColor,
|
||||||
secondGradientColor: backgroundColor,
|
secondGradientBackgroundColor: backgroundColor,
|
||||||
thirdGradientColor: backgroundColor);
|
thirdGradientBackgroundColor: backgroundColor,
|
||||||
|
textColor: primaryTextColor);
|
||||||
|
|
||||||
CakeScrollbarTheme get scrollbarTheme;
|
CakeScrollbarTheme get scrollbarTheme;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue