mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2025-02-03 19:56:39 +00:00
fix: fixes for high contrast theme
This commit is contained in:
parent
d17061adfb
commit
9e165319c1
28 changed files with 273 additions and 69 deletions
|
@ -36,7 +36,9 @@ class ContactListPage extends BasePage {
|
|||
alignment: Alignment.center,
|
||||
children: <Widget>[
|
||||
Icon(Icons.add,
|
||||
color: Theme.of(context).extension<CakeTextTheme>()!.titleColor,
|
||||
color: Theme.of(context)
|
||||
.extension<CakeTextTheme>()!
|
||||
.buttonTextColor,
|
||||
size: 22.0),
|
||||
ButtonTheme(
|
||||
minWidth: 32.0,
|
||||
|
|
|
@ -47,11 +47,11 @@ class ActionButton extends StatelessWidget {
|
|||
style: TextStyle(
|
||||
fontSize: 10,
|
||||
color: textColor ??
|
||||
Theme.of(context).extension<DashboardPageTheme>()!.textColor),
|
||||
Theme.of(context).extension<DashboardPageTheme>()!.cardTextColor),
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -202,12 +202,12 @@ class AddressPage extends BasePage {
|
|||
style: TextStyle(
|
||||
fontSize: 14,
|
||||
fontWeight: FontWeight.w500,
|
||||
color: Theme.of(context).extension<DashboardPageTheme>()!.textColor),
|
||||
color: Theme.of(context).extension<DashboardPageTheme>()!.cardTextColor),
|
||||
)),
|
||||
Icon(
|
||||
Icons.arrow_forward_ios,
|
||||
size: 14,
|
||||
color: Theme.of(context).extension<DashboardPageTheme>()!.textColor,
|
||||
color: Theme.of(context).extension<DashboardPageTheme>()!.cardTextColor,
|
||||
)
|
||||
],
|
||||
),
|
||||
|
|
|
@ -191,7 +191,7 @@ class BalancePage extends StatelessWidget {
|
|||
fontSize: 12,
|
||||
fontFamily: 'Lato',
|
||||
fontWeight: FontWeight.w400,
|
||||
color: Theme.of(context).extension<DashboardPageTheme>()!.textColor,
|
||||
color: Theme.of(context).extension<DashboardPageTheme>()!.cardTextColor,
|
||||
height: 1),
|
||||
),
|
||||
SizedBox(height: 24)
|
||||
|
@ -224,7 +224,7 @@ class BalancePage extends StatelessWidget {
|
|||
fontSize: 12,
|
||||
fontFamily: 'Lato',
|
||||
fontWeight: FontWeight.w400,
|
||||
color: Theme.of(context).extension<DashboardPageTheme>()!.textColor,
|
||||
color: Theme.of(context).extension<DashboardPageTheme>()!.cardTextColor,
|
||||
height: 1),
|
||||
)
|
||||
])),
|
||||
|
|
|
@ -30,6 +30,9 @@ class ExchangeTemplatePage extends BasePage {
|
|||
final _receiveAmountFocus = FocusNode();
|
||||
var _isReactionsSet = false;
|
||||
|
||||
@override
|
||||
bool get gradientAll => true;
|
||||
|
||||
@override
|
||||
String get title => S.current.exchange_new_template;
|
||||
|
||||
|
|
|
@ -21,10 +21,14 @@ class AccountTile extends StatelessWidget {
|
|||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final color = isCurrent
|
||||
? Theme.of(context).dialogBackgroundColor
|
||||
? Theme.of(context)
|
||||
.extension<AccountListTheme>()!
|
||||
.currentAccountBackgroundColor
|
||||
: Theme.of(context).extension<AccountListTheme>()!.tilesBackgroundColor;
|
||||
final textColor = isCurrent
|
||||
? Theme.of(context).primaryColor
|
||||
? Theme.of(context)
|
||||
.extension<AccountListTheme>()!
|
||||
.currentAccountTextColor
|
||||
: Theme.of(context).extension<AccountListTheme>()!.tilesTextColor;
|
||||
|
||||
final Widget cell = GestureDetector(
|
||||
|
@ -60,7 +64,13 @@ class AccountTile extends StatelessWidget {
|
|||
fontSize: 15,
|
||||
fontWeight: FontWeight.w600,
|
||||
fontFamily: 'Lato',
|
||||
color: Theme.of(context).extension<ReceivePageTheme>()!.iconsColor,
|
||||
color: isCurrent
|
||||
? Theme.of(context)
|
||||
.extension<AccountListTheme>()!
|
||||
.currentAccountAmountColor
|
||||
: Theme.of(context)
|
||||
.extension<AccountListTheme>()!
|
||||
.tilesAmountColor,
|
||||
decoration: TextDecoration.none,
|
||||
),
|
||||
),
|
||||
|
|
|
@ -27,7 +27,7 @@ class SelectButton extends StatelessWidget {
|
|||
: Theme.of(context).cardColor;
|
||||
final textColor = isSelected
|
||||
? Theme.of(context).extension<WalletListTheme>()!.restoreWalletButtonTextColor
|
||||
: Theme.of(context).extension<CakeTextTheme>()!.titleColor;
|
||||
: Theme.of(context).extension<CakeTextTheme>()!.buttonTextColor;
|
||||
final arrowColor = isSelected
|
||||
? Theme.of(context).extension<WalletListTheme>()!.restoreWalletButtonTextColor
|
||||
: Theme.of(context).extension<FilterTheme>()!.titlesColor;
|
||||
|
@ -77,4 +77,4 @@ class SelectButton extends StatelessWidget {
|
|||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -45,7 +45,7 @@ class AnonPayInvoicePage extends BasePage {
|
|||
bool effectsInstalled = false;
|
||||
|
||||
@override
|
||||
bool get gradientBackground => true;
|
||||
bool get gradientAll => true;
|
||||
|
||||
@override
|
||||
bool get resizeToAvoidBottomInset => false;
|
||||
|
|
|
@ -33,7 +33,7 @@ class HeaderTile extends StatelessWidget {
|
|||
style: TextStyle(
|
||||
fontSize: 18,
|
||||
fontWeight: FontWeight.w600,
|
||||
color: Theme.of(context)!.extension<ReceivePageTheme>()!.tilesTextColor),
|
||||
color: Theme.of(context).extension<ReceivePageTheme>()!.tilesTextColor),
|
||||
),
|
||||
Container(
|
||||
height: 32,
|
||||
|
@ -48,4 +48,4 @@ class HeaderTile extends StatelessWidget {
|
|||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -76,7 +76,9 @@ class WalletSeedPage extends BasePage {
|
|||
style: TextStyle(
|
||||
fontSize: 14,
|
||||
fontWeight: FontWeight.w600,
|
||||
color: Palette.blueCraiola),
|
||||
color: Theme.of(context)
|
||||
.extension<CakeTextTheme>()!
|
||||
.buttonTextColor),
|
||||
),
|
||||
),
|
||||
)
|
||||
|
|
|
@ -29,10 +29,10 @@ class UnspentCoinsListItem extends StatelessWidget {
|
|||
|
||||
final amountColor = isSending
|
||||
? Colors.white
|
||||
: Theme.of(context).extension<CakeTextTheme>()!.titleColor;
|
||||
: Theme.of(context).extension<CakeTextTheme>()!.buttonTextColor;
|
||||
final addressColor = isSending
|
||||
? Colors.white.withOpacity(0.5)
|
||||
: Theme.of(context).extension<CakeTextTheme>()!.secondaryTextColor;
|
||||
: Theme.of(context).extension<CakeTextTheme>()!.buttonSecondaryTextColor;
|
||||
|
||||
return Container(
|
||||
height: 70,
|
||||
|
|
|
@ -59,7 +59,7 @@ class WalletListBodyState extends State<WalletListBody> {
|
|||
final newWalletImage =
|
||||
Image.asset('assets/images/new_wallet.png', height: 12, width: 12, color: Colors.white);
|
||||
final restoreWalletImage = Image.asset('assets/images/restore_wallet.png',
|
||||
height: 12, width: 12, color: Theme.of(context).extension<CakeTextTheme>()!.titleColor);
|
||||
height: 12, width: 12, color: Theme.of(context).extension<CakeTextTheme>()!.buttonTextColor);
|
||||
|
||||
return Container(
|
||||
padding: EdgeInsets.only(top: 16),
|
||||
|
@ -181,7 +181,7 @@ class WalletListBodyState extends State<WalletListBody> {
|
|||
image: restoreWalletImage,
|
||||
text: S.of(context).wallet_list_restore_wallet,
|
||||
color: Theme.of(context).cardColor,
|
||||
textColor: Theme.of(context).extension<CakeTextTheme>()!.titleColor)
|
||||
textColor: Theme.of(context).extension<CakeTextTheme>()!.buttonTextColor)
|
||||
])),
|
||||
);
|
||||
}
|
||||
|
|
|
@ -42,7 +42,7 @@ class DashBoardRoundedCardWidget extends StatelessWidget {
|
|||
Text(
|
||||
title,
|
||||
style: TextStyle(
|
||||
color: Theme.of(context).extension<DashboardPageTheme>()!.textColor,
|
||||
color: Theme.of(context).extension<DashboardPageTheme>()!.cardTextColor,
|
||||
fontSize: 24,
|
||||
fontWeight: FontWeight.w900,
|
||||
),
|
||||
|
@ -51,7 +51,7 @@ class DashBoardRoundedCardWidget extends StatelessWidget {
|
|||
Text(
|
||||
subTitle,
|
||||
style: TextStyle(
|
||||
color: Theme.of(context).extension<DashboardPageTheme>()!.textColor,
|
||||
color: Theme.of(context).extension<DashboardPageTheme>()!.cardTextColor,
|
||||
fontWeight: FontWeight.w500,
|
||||
fontFamily: 'Lato'),
|
||||
)
|
||||
|
|
|
@ -47,7 +47,7 @@ class IntroducingCard extends StatelessWidget {
|
|||
fontSize: 24,
|
||||
fontFamily: 'Lato',
|
||||
fontWeight: FontWeight.bold,
|
||||
color: Theme.of(context).extension<DashboardPageTheme>()!.textColor,
|
||||
color: Theme.of(context).extension<DashboardPageTheme>()!.cardTextColor,
|
||||
height: 1),
|
||||
maxLines: 1,
|
||||
textAlign: TextAlign.center),
|
||||
|
@ -57,7 +57,7 @@ class IntroducingCard extends StatelessWidget {
|
|||
style: TextStyle(
|
||||
fontSize: 12,
|
||||
fontFamily: 'Lato',
|
||||
color: Theme.of(context).extension<DashboardPageTheme>()!.textColor,
|
||||
color: Theme.of(context).extension<DashboardPageTheme>()!.cardTextColor,
|
||||
height: 1)),
|
||||
],
|
||||
),
|
||||
|
|
|
@ -45,7 +45,7 @@ class PickerInnerWrapperWidget extends StatelessWidget {
|
|||
child: ClipRRect(
|
||||
borderRadius: BorderRadius.all(Radius.circular(14)),
|
||||
child: Container(
|
||||
color: Theme.of(context).extension<AccountListTheme>()!.tilesTextColor,
|
||||
color: Theme.of(context).dialogTheme.backgroundColor,
|
||||
child: ConstrainedBox(
|
||||
constraints: BoxConstraints(
|
||||
maxHeight:
|
||||
|
@ -73,7 +73,7 @@ class PickerInnerWrapperWidget extends StatelessWidget {
|
|||
child: ClipRRect(
|
||||
borderRadius: BorderRadius.all(Radius.circular(14)),
|
||||
child: Container(
|
||||
color: Theme.of(context).extension<AccountListTheme>()!.tilesTextColor,
|
||||
color: Theme.of(context).dialogTheme.backgroundColor,
|
||||
child: ConstrainedBox(
|
||||
constraints: BoxConstraints(
|
||||
maxHeight: containerHeight,
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
import 'package:cake_wallet/themes/extensions/address_theme.dart';
|
||||
import 'package:cake_wallet/themes/extensions/cake_text_theme.dart';
|
||||
import 'package:cake_wallet/themes/extensions/picker_theme.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:cake_wallet/generated/i18n.dart';
|
||||
|
||||
|
@ -18,12 +17,18 @@ class SearchBarWidget extends StatelessWidget {
|
|||
Widget build(BuildContext context) {
|
||||
return TextFormField(
|
||||
controller: searchController,
|
||||
style: TextStyle(color: Theme.of(context).extension<CakeTextTheme>()!.textfieldUnderlineColor),
|
||||
style: TextStyle(
|
||||
color: Theme.of(context).extension<PickerTheme>()!.searchTextColor),
|
||||
decoration: InputDecoration(
|
||||
hintText: hintText ?? S.of(context).search_currency,
|
||||
prefixIcon: Image.asset("assets/images/search_icon.png"),
|
||||
hintStyle: TextStyle(
|
||||
color: Theme.of(context).extension<PickerTheme>()!.searchHintColor),
|
||||
prefixIcon: Image.asset("assets/images/search_icon.png",
|
||||
color: Theme.of(context).extension<PickerTheme>()!.searchIconColor),
|
||||
filled: true,
|
||||
fillColor: Theme.of(context).extension<AddressTheme>()!.actionButtonColor,
|
||||
fillColor: Theme.of(context)
|
||||
.extension<PickerTheme>()!
|
||||
.searchBackgroundFillColor,
|
||||
alignLabelWithHint: false,
|
||||
contentPadding: const EdgeInsets.symmetric(vertical: 4, horizontal: 16),
|
||||
enabledBorder: OutlineInputBorder(
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
import 'package:cake_wallet/palette.dart';
|
||||
import 'package:cake_wallet/themes/extensions/menu_theme.dart';
|
||||
import 'package:cake_wallet/themes/extensions/receive_page_theme.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class SettingActionButton extends StatelessWidget {
|
||||
|
@ -31,15 +30,15 @@ class SettingActionButton extends StatelessWidget {
|
|||
@override
|
||||
Widget build(BuildContext context) {
|
||||
Color? color = isSelected
|
||||
? Theme.of(context).extension<ReceivePageTheme>()!.tilesTextColor
|
||||
? Theme.of(context).extension<CakeMenuTheme>()!.settingTitleColor
|
||||
: selectionActive
|
||||
? Palette.darkBlue
|
||||
: Theme.of(context).extension<ReceivePageTheme>()!.tilesTextColor;
|
||||
: Theme.of(context).extension<CakeMenuTheme>()!.settingTitleColor;
|
||||
return InkWell(
|
||||
onTap: onTap,
|
||||
hoverColor: Colors.transparent,
|
||||
child: Container(
|
||||
height: tileHeight,
|
||||
height: tileHeight,
|
||||
padding: isLastTile
|
||||
? EdgeInsets.only(
|
||||
left: 24,
|
||||
|
@ -56,7 +55,9 @@ class SettingActionButton extends StatelessWidget {
|
|||
image,
|
||||
height: 16,
|
||||
width: 16,
|
||||
color: Theme.of(context).extension<CakeMenuTheme>()!.settingActionsIconColor,
|
||||
color: Theme.of(context)
|
||||
.extension<CakeMenuTheme>()!
|
||||
.settingActionsIconColor,
|
||||
),
|
||||
SizedBox(width: 16),
|
||||
Expanded(
|
||||
|
|
|
@ -49,7 +49,9 @@ class TemplateTileState extends State<TemplateTile> {
|
|||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final color = isRemovable ? Colors.white : Theme.of(context).extension<CakeTextTheme>()!.titleColor;
|
||||
final color = isRemovable
|
||||
? Colors.white
|
||||
: Theme.of(context).extension<SendPageTheme>()!.templateTitleColor;
|
||||
final toIcon = Image.asset('assets/images/to_icon.png', color: color);
|
||||
|
||||
final content = Row(
|
||||
|
|
|
@ -41,6 +41,7 @@ class BrightTheme extends LightTheme {
|
|||
pageTitleTextColor: Colors.white,
|
||||
mainActionsIconColor: Colors.white,
|
||||
textColor: Colors.white,
|
||||
cardTextColor: Colors.white,
|
||||
indicatorDotTheme: IndicatorDotTheme(
|
||||
indicatorColor: Colors.white.withOpacity(0.5),
|
||||
activeIndicatorColor: Colors.white));
|
||||
|
@ -77,7 +78,8 @@ class BrightTheme extends LightTheme {
|
|||
FilterTheme get filterTheme => super.filterTheme.copyWith(
|
||||
checkboxSecondGradientColor: Palette.pinkFlamingo,
|
||||
checkboxBackgroundColor: Colors.white,
|
||||
buttonColor: Colors.white.withOpacity(0.2));
|
||||
buttonColor: Colors.white.withOpacity(0.2),
|
||||
iconColor: Colors.white);
|
||||
|
||||
@override
|
||||
WalletListTheme get walletListTheme => super.walletListTheme.copyWith(
|
||||
|
@ -117,6 +119,8 @@ class BrightTheme extends LightTheme {
|
|||
|
||||
@override
|
||||
CakeTextTheme get cakeTextTheme => super.cakeTextTheme.copyWith(
|
||||
buttonSecondaryTextColor: super.cakeTextTheme.secondaryTextColor,
|
||||
buttonTextColor: super.cakeTextTheme.titleColor,
|
||||
addressButtonBorderColor: Colors.white.withOpacity(0.4),
|
||||
dateSectionRowColor: Colors.white.withOpacity(0.5));
|
||||
}
|
||||
|
|
|
@ -100,6 +100,7 @@ class DarkTheme extends ThemeBase {
|
|||
@override
|
||||
DashboardPageTheme get dashboardPageTheme =>
|
||||
super.dashboardPageTheme.copyWith(
|
||||
cardTextColor: super.dashboardPageTheme.textColor,
|
||||
indicatorDotTheme: IndicatorDotTheme(
|
||||
indicatorColor: PaletteDark.cyanBlue,
|
||||
activeIndicatorColor: Colors.white));
|
||||
|
@ -116,6 +117,7 @@ class DarkTheme extends ThemeBase {
|
|||
backgroundColor: PaletteDark.deepPurpleBlue,
|
||||
subnameTextColor: PaletteDark.darkCyanBlue,
|
||||
dividerColor: PaletteDark.darkOceanBlue,
|
||||
settingTitleColor: receivePageTheme.tilesTextColor,
|
||||
settingActionsIconColor: PaletteDark.pigeonBlue,
|
||||
iconColor: PaletteDark.darkCyanBlue);
|
||||
|
||||
|
@ -138,8 +140,10 @@ class DarkTheme extends ThemeBase {
|
|||
InfoTheme get infoTheme => InfoTheme(textColor: Palette.darkLavender);
|
||||
|
||||
@override
|
||||
PickerTheme get pickerTheme =>
|
||||
PickerTheme(dividerColor: PaletteDark.dividerColor);
|
||||
PickerTheme get pickerTheme => PickerTheme(
|
||||
dividerColor: PaletteDark.dividerColor,
|
||||
searchTextColor: cakeTextTheme.textfieldUnderlineColor,
|
||||
searchBackgroundFillColor: addressTheme.actionButtonColor);
|
||||
|
||||
@override
|
||||
AlertTheme get alertTheme => AlertTheme(
|
||||
|
@ -188,6 +192,10 @@ class DarkTheme extends ThemeBase {
|
|||
|
||||
@override
|
||||
AccountListTheme get accountListTheme => AccountListTheme(
|
||||
currentAccountBackgroundColor: dialogBackgroundColor,
|
||||
currentAccountTextColor: primaryColor,
|
||||
currentAccountAmountColor: receivePageTheme.iconsColor,
|
||||
tilesAmountColor: receivePageTheme.iconsColor,
|
||||
tilesBackgroundColor: PaletteDark.darkOceanBlue,
|
||||
tilesTextColor: Colors.white);
|
||||
|
||||
|
|
|
@ -2,18 +2,39 @@ import 'package:flutter/material.dart';
|
|||
|
||||
class AccountListTheme extends ThemeExtension<AccountListTheme> {
|
||||
final Color tilesTextColor;
|
||||
final Color tilesAmountColor;
|
||||
final Color tilesBackgroundColor;
|
||||
final Color currentAccountBackgroundColor;
|
||||
final Color currentAccountTextColor;
|
||||
final Color currentAccountAmountColor;
|
||||
|
||||
AccountListTheme(
|
||||
{required this.tilesTextColor, required this.tilesBackgroundColor});
|
||||
{required this.tilesTextColor,
|
||||
required this.tilesAmountColor,
|
||||
required this.tilesBackgroundColor,
|
||||
required this.currentAccountBackgroundColor,
|
||||
required this.currentAccountTextColor,
|
||||
required this.currentAccountAmountColor});
|
||||
|
||||
@override
|
||||
AccountListTheme copyWith(
|
||||
{Color? tilesTextColor, Color? tilesBackgroundColor}) =>
|
||||
{Color? tilesTextColor,
|
||||
Color? tilesAmountColor,
|
||||
Color? tilesBackgroundColor,
|
||||
Color? currentAccountBackgroundColor,
|
||||
Color? currentAccountTextColor,
|
||||
Color? currentAccountAmountColor}) =>
|
||||
AccountListTheme(
|
||||
tilesTextColor: tilesTextColor ?? this.tilesTextColor,
|
||||
tilesAmountColor: tilesAmountColor ?? this.tilesAmountColor,
|
||||
tilesBackgroundColor:
|
||||
tilesBackgroundColor ?? this.tilesBackgroundColor);
|
||||
tilesBackgroundColor ?? this.tilesBackgroundColor,
|
||||
currentAccountBackgroundColor: currentAccountBackgroundColor ??
|
||||
this.currentAccountBackgroundColor,
|
||||
currentAccountTextColor:
|
||||
currentAccountTextColor ?? this.currentAccountTextColor,
|
||||
currentAccountAmountColor:
|
||||
currentAccountAmountColor ?? this.currentAccountAmountColor);
|
||||
|
||||
@override
|
||||
AccountListTheme lerp(ThemeExtension<AccountListTheme>? other, double t) {
|
||||
|
@ -23,7 +44,15 @@ class AccountListTheme extends ThemeExtension<AccountListTheme> {
|
|||
|
||||
return AccountListTheme(
|
||||
tilesTextColor: Color.lerp(tilesTextColor, other.tilesTextColor, t)!,
|
||||
tilesAmountColor:
|
||||
Color.lerp(tilesAmountColor, other.tilesAmountColor, t)!,
|
||||
tilesBackgroundColor:
|
||||
Color.lerp(tilesBackgroundColor, other.tilesBackgroundColor, t)!);
|
||||
Color.lerp(tilesBackgroundColor, other.tilesBackgroundColor, t)!,
|
||||
currentAccountBackgroundColor: Color.lerp(currentAccountBackgroundColor,
|
||||
other.currentAccountBackgroundColor, t)!,
|
||||
currentAccountTextColor: Color.lerp(
|
||||
currentAccountTextColor, other.currentAccountTextColor, t)!,
|
||||
currentAccountAmountColor: Color.lerp(
|
||||
currentAccountAmountColor, other.currentAccountAmountColor, t)!);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -6,13 +6,20 @@ class CakeTextTheme extends ThemeExtension<CakeTextTheme> {
|
|||
final Color titleColor;
|
||||
final Color addressButtonBorderColor;
|
||||
final Color dateSectionRowColor;
|
||||
final Color buttonTextColor;
|
||||
final Color buttonSecondaryTextColor;
|
||||
|
||||
CakeTextTheme(
|
||||
{required this.secondaryTextColor,
|
||||
required this.textfieldUnderlineColor,
|
||||
required this.titleColor,
|
||||
required this.addressButtonBorderColor,
|
||||
required this.dateSectionRowColor});
|
||||
required this.dateSectionRowColor,
|
||||
Color? buttonTextColor,
|
||||
Color? buttonSecondaryTextColor})
|
||||
: buttonTextColor = buttonTextColor ?? titleColor,
|
||||
buttonSecondaryTextColor =
|
||||
buttonSecondaryTextColor ?? secondaryTextColor;
|
||||
|
||||
@override
|
||||
CakeTextTheme copyWith(
|
||||
|
@ -20,7 +27,9 @@ class CakeTextTheme extends ThemeExtension<CakeTextTheme> {
|
|||
Color? textfieldUnderlineColor,
|
||||
Color? titleColor,
|
||||
Color? addressButtonBorderColor,
|
||||
Color? dateSectionRowColor}) =>
|
||||
Color? dateSectionRowColor,
|
||||
Color? buttonTextColor,
|
||||
Color? buttonSecondaryTextColor}) =>
|
||||
CakeTextTheme(
|
||||
secondaryTextColor: secondaryTextColor ?? this.secondaryTextColor,
|
||||
textfieldUnderlineColor:
|
||||
|
@ -28,7 +37,10 @@ class CakeTextTheme extends ThemeExtension<CakeTextTheme> {
|
|||
titleColor: titleColor ?? this.titleColor,
|
||||
addressButtonBorderColor:
|
||||
addressButtonBorderColor ?? this.addressButtonBorderColor,
|
||||
dateSectionRowColor: dateSectionRowColor ?? this.dateSectionRowColor);
|
||||
dateSectionRowColor: dateSectionRowColor ?? this.dateSectionRowColor,
|
||||
buttonTextColor: buttonTextColor ?? this.buttonTextColor,
|
||||
buttonSecondaryTextColor:
|
||||
buttonSecondaryTextColor ?? this.buttonSecondaryTextColor);
|
||||
|
||||
@override
|
||||
CakeTextTheme lerp(ThemeExtension<CakeTextTheme>? other, double t) {
|
||||
|
@ -45,6 +57,9 @@ class CakeTextTheme extends ThemeExtension<CakeTextTheme> {
|
|||
addressButtonBorderColor: Color.lerp(
|
||||
addressButtonBorderColor, other.addressButtonBorderColor, t)!,
|
||||
dateSectionRowColor:
|
||||
Color.lerp(dateSectionRowColor, other.dateSectionRowColor, t)!);
|
||||
Color.lerp(dateSectionRowColor, other.dateSectionRowColor, t)!,
|
||||
buttonTextColor: Color.lerp(buttonTextColor, other.buttonTextColor, t)!,
|
||||
buttonSecondaryTextColor: Color.lerp(
|
||||
buttonSecondaryTextColor, other.buttonSecondaryTextColor, t)!);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -6,6 +6,7 @@ class DashboardPageTheme extends ThemeExtension<DashboardPageTheme> {
|
|||
final Color secondGradientBackgroundColor;
|
||||
final Color thirdGradientBackgroundColor;
|
||||
final Color textColor;
|
||||
final Color cardTextColor;
|
||||
final Color pageTitleTextColor;
|
||||
final Color mainActionsIconColor;
|
||||
|
||||
|
@ -18,9 +19,11 @@ class DashboardPageTheme extends ThemeExtension<DashboardPageTheme> {
|
|||
required this.textColor,
|
||||
required this.indicatorDotTheme,
|
||||
Color? mainActionsIconColor,
|
||||
Color? pageTitleTextColor})
|
||||
Color? pageTitleTextColor,
|
||||
Color? cardTextColor})
|
||||
: pageTitleTextColor = pageTitleTextColor ?? textColor,
|
||||
mainActionsIconColor = mainActionsIconColor ?? textColor;
|
||||
mainActionsIconColor = mainActionsIconColor ?? textColor,
|
||||
cardTextColor = cardTextColor ?? textColor;
|
||||
|
||||
@override
|
||||
DashboardPageTheme copyWith(
|
||||
|
@ -30,7 +33,8 @@ class DashboardPageTheme extends ThemeExtension<DashboardPageTheme> {
|
|||
Color? textColor,
|
||||
IndicatorDotTheme? indicatorDotTheme,
|
||||
Color? pageTitleTextColor,
|
||||
Color? mainActionsIconColor}) =>
|
||||
Color? mainActionsIconColor,
|
||||
Color? cardTextColor}) =>
|
||||
DashboardPageTheme(
|
||||
firstGradientBackgroundColor:
|
||||
firstGradientBackgroundColor ?? this.firstGradientBackgroundColor,
|
||||
|
@ -42,7 +46,8 @@ class DashboardPageTheme extends ThemeExtension<DashboardPageTheme> {
|
|||
indicatorDotTheme: indicatorDotTheme ?? this.indicatorDotTheme,
|
||||
pageTitleTextColor: pageTitleTextColor ?? this.pageTitleTextColor,
|
||||
mainActionsIconColor:
|
||||
mainActionsIconColor ?? this.mainActionsIconColor);
|
||||
mainActionsIconColor ?? this.mainActionsIconColor,
|
||||
cardTextColor: cardTextColor ?? this.cardTextColor);
|
||||
|
||||
@override
|
||||
DashboardPageTheme lerp(ThemeExtension<DashboardPageTheme>? other, double t) {
|
||||
|
@ -67,6 +72,8 @@ class DashboardPageTheme extends ThemeExtension<DashboardPageTheme> {
|
|||
pageTitleTextColor,
|
||||
mainActionsIconColor:
|
||||
Color.lerp(mainActionsIconColor, other.mainActionsIconColor, t) ??
|
||||
mainActionsIconColor);
|
||||
mainActionsIconColor,
|
||||
cardTextColor:
|
||||
Color.lerp(cardTextColor, other.cardTextColor, t) ?? cardTextColor);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -8,6 +8,7 @@ class CakeMenuTheme extends ThemeExtension<CakeMenuTheme> {
|
|||
final Color backgroundColor;
|
||||
final Color iconColor;
|
||||
final Color settingActionsIconColor;
|
||||
final Color settingTitleColor;
|
||||
|
||||
CakeMenuTheme(
|
||||
{required this.headerFirstGradientColor,
|
||||
|
@ -16,7 +17,8 @@ class CakeMenuTheme extends ThemeExtension<CakeMenuTheme> {
|
|||
required this.subnameTextColor,
|
||||
required this.dividerColor,
|
||||
required this.iconColor,
|
||||
required this.settingActionsIconColor});
|
||||
required this.settingActionsIconColor,
|
||||
required this.settingTitleColor});
|
||||
|
||||
@override
|
||||
CakeMenuTheme copyWith(
|
||||
|
@ -26,7 +28,8 @@ class CakeMenuTheme extends ThemeExtension<CakeMenuTheme> {
|
|||
Color? subnameTextColor,
|
||||
Color? dividerColor,
|
||||
Color? iconColor,
|
||||
Color? settingActionsIconColor}) =>
|
||||
Color? settingActionsIconColor,
|
||||
Color? settingTitleColor}) =>
|
||||
CakeMenuTheme(
|
||||
headerFirstGradientColor:
|
||||
headerFirstGradientColor ?? this.headerFirstGradientColor,
|
||||
|
@ -37,7 +40,8 @@ class CakeMenuTheme extends ThemeExtension<CakeMenuTheme> {
|
|||
dividerColor: dividerColor ?? this.dividerColor,
|
||||
iconColor: iconColor ?? this.iconColor,
|
||||
settingActionsIconColor:
|
||||
settingActionsIconColor ?? this.settingActionsIconColor);
|
||||
settingActionsIconColor ?? this.settingActionsIconColor,
|
||||
settingTitleColor: settingTitleColor ?? this.settingTitleColor);
|
||||
|
||||
@override
|
||||
CakeMenuTheme lerp(ThemeExtension<CakeMenuTheme>? other, double t) {
|
||||
|
@ -63,6 +67,9 @@ class CakeMenuTheme extends ThemeExtension<CakeMenuTheme> {
|
|||
iconColor: Color.lerp(iconColor, other.iconColor, t) ?? iconColor,
|
||||
settingActionsIconColor: Color.lerp(
|
||||
settingActionsIconColor, other.settingActionsIconColor, t) ??
|
||||
settingActionsIconColor);
|
||||
settingActionsIconColor,
|
||||
settingTitleColor: Color.lerp(
|
||||
settingTitleColor, other.settingTitleColor, t) ??
|
||||
settingTitleColor);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,12 +2,32 @@ import 'package:flutter/material.dart';
|
|||
|
||||
class PickerTheme extends ThemeExtension<PickerTheme> {
|
||||
final Color dividerColor;
|
||||
final Color? searchIconColor;
|
||||
final Color searchBackgroundFillColor;
|
||||
final Color searchTextColor;
|
||||
final Color? searchHintColor;
|
||||
|
||||
PickerTheme({required this.dividerColor});
|
||||
PickerTheme(
|
||||
{required this.dividerColor,
|
||||
this.searchIconColor,
|
||||
required this.searchBackgroundFillColor,
|
||||
required this.searchTextColor,
|
||||
this.searchHintColor});
|
||||
|
||||
@override
|
||||
PickerTheme copyWith({Color? dividerColor}) =>
|
||||
PickerTheme(dividerColor: dividerColor ?? this.dividerColor);
|
||||
PickerTheme copyWith(
|
||||
{Color? dividerColor,
|
||||
Color? searchIconColor,
|
||||
Color? searchBackgroundFillColor,
|
||||
Color? searchTextColor,
|
||||
Color? searchHintColor}) =>
|
||||
PickerTheme(
|
||||
dividerColor: dividerColor ?? this.dividerColor,
|
||||
searchIconColor: searchIconColor ?? this.searchIconColor,
|
||||
searchBackgroundFillColor:
|
||||
searchBackgroundFillColor ?? this.searchBackgroundFillColor,
|
||||
searchTextColor: searchTextColor ?? this.searchTextColor,
|
||||
searchHintColor: searchHintColor ?? this.searchHintColor);
|
||||
|
||||
@override
|
||||
PickerTheme lerp(ThemeExtension<PickerTheme>? other, double t) {
|
||||
|
@ -17,6 +37,18 @@ class PickerTheme extends ThemeExtension<PickerTheme> {
|
|||
|
||||
return PickerTheme(
|
||||
dividerColor:
|
||||
Color.lerp(dividerColor, other.dividerColor, t) ?? dividerColor);
|
||||
Color.lerp(dividerColor, other.dividerColor, t) ?? dividerColor,
|
||||
searchIconColor:
|
||||
Color.lerp(searchIconColor, other.searchIconColor, t) ??
|
||||
searchIconColor,
|
||||
searchBackgroundFillColor: Color.lerp(searchBackgroundFillColor,
|
||||
other.searchBackgroundFillColor, t) ??
|
||||
searchBackgroundFillColor,
|
||||
searchTextColor:
|
||||
Color.lerp(searchTextColor, other.searchTextColor, t) ??
|
||||
searchTextColor,
|
||||
searchHintColor:
|
||||
Color.lerp(searchHintColor, other.searchHintColor, t) ??
|
||||
searchHintColor);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,8 +1,17 @@
|
|||
import 'package:cake_wallet/generated/i18n.dart';
|
||||
import 'package:cake_wallet/palette.dart';
|
||||
import 'package:cake_wallet/themes/extensions/account_list_theme.dart';
|
||||
import 'package:cake_wallet/themes/extensions/address_theme.dart';
|
||||
import 'package:cake_wallet/themes/extensions/balance_page_theme.dart';
|
||||
import 'package:cake_wallet/themes/extensions/cake_text_theme.dart';
|
||||
import 'package:cake_wallet/themes/extensions/dashboard_page_theme.dart';
|
||||
import 'package:cake_wallet/themes/extensions/exchange_page_theme.dart';
|
||||
import 'package:cake_wallet/themes/extensions/filter_theme.dart';
|
||||
import 'package:cake_wallet/themes/extensions/indicator_dot_theme.dart';
|
||||
import 'package:cake_wallet/themes/extensions/menu_theme.dart';
|
||||
import 'package:cake_wallet/themes/extensions/picker_theme.dart';
|
||||
import 'package:cake_wallet/themes/extensions/receive_page_theme.dart';
|
||||
import 'package:cake_wallet/themes/extensions/send_page_theme.dart';
|
||||
import 'package:cake_wallet/themes/extensions/sync_indicator_theme.dart';
|
||||
import 'package:cake_wallet/themes/monero_light_theme.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
@ -23,9 +32,15 @@ class HighContrastTheme extends MoneroLightTheme {
|
|||
Color get primaryColor => Colors.black;
|
||||
@override
|
||||
Color get containerColor => Palette.highContrastGray;
|
||||
|
||||
@override
|
||||
Color get primaryTextColor => colorScheme.onBackground;
|
||||
@override
|
||||
Color get dialogBackgroundColor => Colors.white;
|
||||
|
||||
@override
|
||||
CakeTextTheme get cakeTextTheme => super.cakeTextTheme.copyWith(
|
||||
buttonTextColor: Colors.white,
|
||||
buttonSecondaryTextColor: Colors.white.withOpacity(0.5));
|
||||
|
||||
@override
|
||||
SyncIndicatorTheme get syncIndicatorStyle =>
|
||||
|
@ -43,10 +58,61 @@ class HighContrastTheme extends MoneroLightTheme {
|
|||
@override
|
||||
DashboardPageTheme get dashboardPageTheme =>
|
||||
super.dashboardPageTheme.copyWith(
|
||||
// textColor: Colors.white,
|
||||
textColor: Colors.black,
|
||||
cardTextColor: Colors.white,
|
||||
mainActionsIconColor: Colors.white,
|
||||
indicatorDotTheme: IndicatorDotTheme(
|
||||
indicatorColor:
|
||||
super.dashboardPageTheme.indicatorDotTheme.indicatorColor,
|
||||
activeIndicatorColor: primaryColor));
|
||||
indicatorColor: Colors.grey, activeIndicatorColor: Colors.black));
|
||||
|
||||
@override
|
||||
ExchangePageTheme get exchangePageTheme => super
|
||||
.exchangePageTheme
|
||||
.copyWith(firstGradientTopPanelColor: containerColor);
|
||||
|
||||
@override
|
||||
SendPageTheme get sendPageTheme => super.sendPageTheme.copyWith(
|
||||
templateTitleColor: Colors.white,
|
||||
templateBackgroundColor: Colors.black,
|
||||
firstGradientColor: containerColor);
|
||||
|
||||
@override
|
||||
AddressTheme get addressTheme =>
|
||||
super.addressTheme.copyWith(actionButtonColor: Colors.grey);
|
||||
|
||||
@override
|
||||
FilterTheme get filterTheme =>
|
||||
super.filterTheme.copyWith(iconColor: Colors.white);
|
||||
|
||||
@override
|
||||
CakeMenuTheme get menuTheme => super.menuTheme.copyWith(
|
||||
settingTitleColor: Colors.black,
|
||||
headerFirstGradientColor: containerColor,
|
||||
iconColor: Colors.white);
|
||||
|
||||
@override
|
||||
PickerTheme get pickerTheme => super.pickerTheme.copyWith(
|
||||
searchIconColor: Colors.white,
|
||||
searchHintColor: Colors.white,
|
||||
searchTextColor: Colors.white,
|
||||
searchBackgroundFillColor: Colors.grey);
|
||||
|
||||
@override
|
||||
AccountListTheme get accountListTheme => super.accountListTheme.copyWith(
|
||||
tilesTextColor: Colors.black,
|
||||
tilesBackgroundColor: Colors.white,
|
||||
currentAccountBackgroundColor: containerColor,
|
||||
currentAccountTextColor: Colors.white,
|
||||
currentAccountAmountColor: Colors.white);
|
||||
|
||||
@override
|
||||
ReceivePageTheme get receivePageTheme => super.receivePageTheme.copyWith(
|
||||
tilesTextColor: Colors.white,
|
||||
iconsBackgroundColor: Colors.grey,
|
||||
iconsColor: Colors.black);
|
||||
|
||||
@override
|
||||
ThemeData get themeData => super.themeData.copyWith(
|
||||
disabledColor: Colors.grey,
|
||||
dialogTheme:
|
||||
super.themeData.dialogTheme.copyWith(backgroundColor: Colors.white));
|
||||
}
|
||||
|
|
|
@ -100,6 +100,7 @@ class LightTheme extends ThemeBase {
|
|||
@override
|
||||
DashboardPageTheme get dashboardPageTheme =>
|
||||
super.dashboardPageTheme.copyWith(
|
||||
cardTextColor: super.dashboardPageTheme.textColor,
|
||||
indicatorDotTheme: IndicatorDotTheme(
|
||||
indicatorColor: PaletteDark.darkCyanBlue.withOpacity(0.67),
|
||||
activeIndicatorColor: PaletteDark.darkNightBlue));
|
||||
|
@ -117,6 +118,7 @@ class LightTheme extends ThemeBase {
|
|||
subnameTextColor: Colors.white,
|
||||
dividerColor: Palette.wildLavender,
|
||||
iconColor: Colors.white,
|
||||
settingTitleColor: receivePageTheme.tilesTextColor,
|
||||
settingActionsIconColor: Palette.gray);
|
||||
|
||||
@override
|
||||
|
@ -138,8 +140,10 @@ class LightTheme extends ThemeBase {
|
|||
InfoTheme get infoTheme => InfoTheme(textColor: Palette.darkBlueCraiola);
|
||||
|
||||
@override
|
||||
PickerTheme get pickerTheme =>
|
||||
PickerTheme(dividerColor: Palette.periwinkleCraiola);
|
||||
PickerTheme get pickerTheme => PickerTheme(
|
||||
dividerColor: Palette.periwinkleCraiola,
|
||||
searchTextColor: cakeTextTheme.textfieldUnderlineColor,
|
||||
searchBackgroundFillColor: addressTheme.actionButtonColor);
|
||||
|
||||
@override
|
||||
AlertTheme get alertTheme => AlertTheme(
|
||||
|
@ -188,7 +192,12 @@ class LightTheme extends ThemeBase {
|
|||
|
||||
@override
|
||||
AccountListTheme get accountListTheme => AccountListTheme(
|
||||
tilesBackgroundColor: Colors.white, tilesTextColor: Palette.violetBlue);
|
||||
currentAccountBackgroundColor: dialogBackgroundColor,
|
||||
currentAccountTextColor: primaryColor,
|
||||
currentAccountAmountColor: receivePageTheme.iconsColor,
|
||||
tilesBackgroundColor: Colors.white,
|
||||
tilesAmountColor: receivePageTheme.iconsColor,
|
||||
tilesTextColor: Palette.violetBlue);
|
||||
|
||||
@override
|
||||
ReceivePageTheme get receivePageTheme => ReceivePageTheme(
|
||||
|
|
|
@ -128,6 +128,8 @@ class MoneroDarkTheme extends DarkTheme {
|
|||
SendPageTheme get sendPageTheme => super.sendPageTheme.copyWith(
|
||||
templateNewTextColor:
|
||||
dashboardPageTheme.indicatorDotTheme.activeIndicatorColor,
|
||||
templateTitleColor: primaryTextColor,
|
||||
templateBackgroundColor: containerColor,
|
||||
templateDottedBorderColor: colorScheme.primaryContainer,
|
||||
templateSelectedCurrencyTitleColor: Colors.black,
|
||||
textFieldButtonIconColor: colorScheme.inverseSurface,
|
||||
|
|
Loading…
Reference in a new issue