mirror of
https://github.com/Such-Software/hash-wallet.git
synced 2026-12-05 12:44:09 +01:00
Cw 396 additional themes (#962)
* fix: SectionStandardList using BuildContext as param * refactor: deprecated backgroundColor -> colorScheme.background * refactor: themeBase and current themes * refactor: accentTextTheme.titleLarge.color -> dialogTheme.backgroundColor * refactor: gradient background * refactor: text themes using the same color as primaryColor * refactor: accentTextTheme.bodySmall.color -> cardColor * refactor: text themes using same dialogBackgroundColor * refactor: scrollbarTheme * refactor: create SyncIndicatorTheme * refactor: SectionDivider * refactor: base_page improvements and simplify * refactor: collapsible_standart_list improvements * refactor: accentTextTheme.bodyLarge.backgroundColor -> KeyboardTheme.keyboardBarColor * refactor: create PinCodeTheme for accentTextTheme.bodyMedium * refactor: create SupportPageTheme for accentTextTheme.displayLarge.backgroundColor and fix cases that use it * refactor: accentTextTheme.displayLarge.color -> disabledColor * refactor: create ExchangePageTheme * refactor: create DashboardPageTheme and use textColor * refactor: create NewWalletTheme for accentTextTheme.displayMedium * refactor: create BalancePageTheme for accentTextTheme.displaySmall.backgroundColor * refactor: create AddressTheme for accentTextTheme.displaySmall.color * refactor: create IndicatorDotTheme * refactor: create CakeMenuTheme * refactor: create FilterTheme * refactor: create WalletListTheme * refactor: accentTextTheme.bodySmall.decorationColor -> InfoTheme.textColor * refactor: accentTextTheme.titleLarge.backgroundColor -> PickerTheme.dividerColor * refactor: primaryTextTheme.bodyLarge.backgroundColor -> AlertTheme.leftButtonTextColor * refactor: primaryTextTheme.displayLarge.backgroundColor -> OrderTheme.iconColor * refactor: create SendPageTheme * fix: missing migrated styles * refactor: primaryTextTheme.labelSmall.decorationColor -> PlaceholderTheme.color * refactor: create TransactionTradeTheme * refactor: create CakeTextTheme * refactor: create AccountListTheme * refactor: create ReceivePageTheme * refactor: create QRCodeTheme * refactor: move remaining items to CakeTextTheme and some missing fixes * feat(display_settings): add new theme selector * feat: additional themes * fix: conflict error * fix(lag): move colorScheme initialization to constructor * feat: add backdropColor to alert and picker backdrop filters * fix: merge fixes * fix: send template page missing new colors * fix: anonpay pages title and icon colors * fix: merge fixes * fix: unspent coins page * fix: also fix exchange template * fix: missing checkbox * fix: fixes for high contrast theme * Merge branch 'main' into CW-396-additional-themes * fix: merge fixes * fix: .gitignore and rm added files * Fix review comments --------- Co-authored-by: OmarHatem <omarh.ismail1@gmail.com>
This commit is contained in:
@@ -0,0 +1,58 @@
|
||||
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.tilesAmountColor,
|
||||
required this.tilesBackgroundColor,
|
||||
required this.currentAccountBackgroundColor,
|
||||
required this.currentAccountTextColor,
|
||||
required this.currentAccountAmountColor});
|
||||
|
||||
@override
|
||||
AccountListTheme copyWith(
|
||||
{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,
|
||||
currentAccountBackgroundColor: currentAccountBackgroundColor ??
|
||||
this.currentAccountBackgroundColor,
|
||||
currentAccountTextColor:
|
||||
currentAccountTextColor ?? this.currentAccountTextColor,
|
||||
currentAccountAmountColor:
|
||||
currentAccountAmountColor ?? this.currentAccountAmountColor);
|
||||
|
||||
@override
|
||||
AccountListTheme lerp(ThemeExtension<AccountListTheme>? other, double t) {
|
||||
if (other is! AccountListTheme) {
|
||||
return this;
|
||||
}
|
||||
|
||||
return AccountListTheme(
|
||||
tilesTextColor: Color.lerp(tilesTextColor, other.tilesTextColor, t)!,
|
||||
tilesAmountColor:
|
||||
Color.lerp(tilesAmountColor, other.tilesAmountColor, t)!,
|
||||
tilesBackgroundColor:
|
||||
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)!);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class AddressTheme extends ThemeExtension<AddressTheme> {
|
||||
final Color actionButtonColor;
|
||||
|
||||
AddressTheme({required this.actionButtonColor});
|
||||
|
||||
@override
|
||||
AddressTheme copyWith({Color? actionButtonColor}) => AddressTheme(
|
||||
actionButtonColor: actionButtonColor ?? this.actionButtonColor);
|
||||
|
||||
@override
|
||||
AddressTheme lerp(ThemeExtension<AddressTheme>? other, double t) {
|
||||
if (other is! AddressTheme) {
|
||||
return this;
|
||||
}
|
||||
|
||||
return AddressTheme(
|
||||
actionButtonColor:
|
||||
Color.lerp(actionButtonColor, other.actionButtonColor, t) ??
|
||||
actionButtonColor,
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class AlertTheme extends ThemeExtension<AlertTheme> {
|
||||
final Color leftButtonTextColor;
|
||||
final Color backdropColor;
|
||||
|
||||
AlertTheme({required this.leftButtonTextColor, required this.backdropColor});
|
||||
|
||||
@override
|
||||
AlertTheme copyWith({Color? leftButtonTextColor, Color? backdropColor}) =>
|
||||
AlertTheme(
|
||||
leftButtonTextColor: leftButtonTextColor ?? this.leftButtonTextColor,
|
||||
backdropColor: backdropColor ?? this.backdropColor);
|
||||
|
||||
@override
|
||||
AlertTheme lerp(ThemeExtension<AlertTheme>? other, double t) {
|
||||
if (other is! AlertTheme) {
|
||||
return this;
|
||||
}
|
||||
|
||||
return AlertTheme(
|
||||
leftButtonTextColor:
|
||||
Color.lerp(leftButtonTextColor, other.leftButtonTextColor, t) ??
|
||||
leftButtonTextColor,
|
||||
backdropColor:
|
||||
Color.lerp(backdropColor, other.backdropColor, t) ?? backdropColor);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,53 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class BalancePageTheme extends ThemeExtension<BalancePageTheme> {
|
||||
final Color textColor;
|
||||
final Color labelTextColor;
|
||||
final Color balanceAmountColor;
|
||||
final Color assetTitleColor;
|
||||
final Color cardBorderColor;
|
||||
|
||||
BalancePageTheme(
|
||||
{required this.labelTextColor,
|
||||
required this.textColor,
|
||||
Color? balanceAmountColor,
|
||||
Color? assetTitleColor,
|
||||
this.cardBorderColor = Colors.transparent})
|
||||
: this.balanceAmountColor = balanceAmountColor ?? textColor,
|
||||
this.assetTitleColor = assetTitleColor ?? textColor;
|
||||
|
||||
@override
|
||||
BalancePageTheme copyWith(
|
||||
{Color? textColor,
|
||||
Color? labelTextColor,
|
||||
Color? balanceAmountColor,
|
||||
Color? assetTitleColor,
|
||||
Color? cardBorderColor}) =>
|
||||
BalancePageTheme(
|
||||
textColor: textColor ?? this.textColor,
|
||||
labelTextColor: labelTextColor ?? this.labelTextColor,
|
||||
balanceAmountColor: balanceAmountColor ?? this.balanceAmountColor,
|
||||
assetTitleColor: assetTitleColor ?? this.assetTitleColor,
|
||||
cardBorderColor: cardBorderColor ?? this.cardBorderColor);
|
||||
|
||||
@override
|
||||
BalancePageTheme lerp(ThemeExtension<BalancePageTheme>? other, double t) {
|
||||
if (other is! BalancePageTheme) {
|
||||
return this;
|
||||
}
|
||||
|
||||
return BalancePageTheme(
|
||||
textColor: Color.lerp(textColor, other.textColor, t) ?? textColor,
|
||||
labelTextColor: Color.lerp(labelTextColor, other.labelTextColor, t) ??
|
||||
labelTextColor,
|
||||
balanceAmountColor:
|
||||
Color.lerp(balanceAmountColor, other.balanceAmountColor, t) ??
|
||||
balanceAmountColor,
|
||||
assetTitleColor:
|
||||
Color.lerp(assetTitleColor, other.assetTitleColor, t) ??
|
||||
assetTitleColor,
|
||||
cardBorderColor:
|
||||
Color.lerp(cardBorderColor, other.cardBorderColor, t) ??
|
||||
cardBorderColor);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class CakeScrollbarTheme extends ThemeExtension<CakeScrollbarTheme> {
|
||||
final Color thumbColor;
|
||||
final Color trackColor;
|
||||
|
||||
CakeScrollbarTheme({required this.thumbColor, required this.trackColor});
|
||||
|
||||
@override
|
||||
Object get type => CakeScrollbarTheme;
|
||||
|
||||
@override
|
||||
CakeScrollbarTheme copyWith({Color? thumbColor, Color? trackColor}) =>
|
||||
CakeScrollbarTheme(
|
||||
thumbColor: thumbColor ?? this.thumbColor,
|
||||
trackColor: trackColor ?? this.trackColor);
|
||||
|
||||
@override
|
||||
CakeScrollbarTheme lerp(ThemeExtension<CakeScrollbarTheme>? other, double t) {
|
||||
if (other is! CakeScrollbarTheme) {
|
||||
return this;
|
||||
}
|
||||
|
||||
return CakeScrollbarTheme(
|
||||
thumbColor: Color.lerp(thumbColor, other.thumbColor, t) ?? thumbColor,
|
||||
trackColor: Color.lerp(trackColor, other.trackColor, t) ?? trackColor);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,65 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class CakeTextTheme extends ThemeExtension<CakeTextTheme> {
|
||||
final Color secondaryTextColor;
|
||||
final Color textfieldUnderlineColor;
|
||||
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,
|
||||
Color? buttonTextColor,
|
||||
Color? buttonSecondaryTextColor})
|
||||
: buttonTextColor = buttonTextColor ?? titleColor,
|
||||
buttonSecondaryTextColor =
|
||||
buttonSecondaryTextColor ?? secondaryTextColor;
|
||||
|
||||
@override
|
||||
CakeTextTheme copyWith(
|
||||
{Color? secondaryTextColor,
|
||||
Color? textfieldUnderlineColor,
|
||||
Color? titleColor,
|
||||
Color? addressButtonBorderColor,
|
||||
Color? dateSectionRowColor,
|
||||
Color? buttonTextColor,
|
||||
Color? buttonSecondaryTextColor}) =>
|
||||
CakeTextTheme(
|
||||
secondaryTextColor: secondaryTextColor ?? this.secondaryTextColor,
|
||||
textfieldUnderlineColor:
|
||||
textfieldUnderlineColor ?? this.textfieldUnderlineColor,
|
||||
titleColor: titleColor ?? this.titleColor,
|
||||
addressButtonBorderColor:
|
||||
addressButtonBorderColor ?? this.addressButtonBorderColor,
|
||||
dateSectionRowColor: dateSectionRowColor ?? this.dateSectionRowColor,
|
||||
buttonTextColor: buttonTextColor ?? this.buttonTextColor,
|
||||
buttonSecondaryTextColor:
|
||||
buttonSecondaryTextColor ?? this.buttonSecondaryTextColor);
|
||||
|
||||
@override
|
||||
CakeTextTheme lerp(ThemeExtension<CakeTextTheme>? other, double t) {
|
||||
if (other is! CakeTextTheme) {
|
||||
return this;
|
||||
}
|
||||
|
||||
return CakeTextTheme(
|
||||
secondaryTextColor:
|
||||
Color.lerp(secondaryTextColor, other.secondaryTextColor, t)!,
|
||||
textfieldUnderlineColor: Color.lerp(
|
||||
textfieldUnderlineColor, other.textfieldUnderlineColor, t)!,
|
||||
titleColor: Color.lerp(titleColor, other.titleColor, t)!,
|
||||
addressButtonBorderColor: Color.lerp(
|
||||
addressButtonBorderColor, other.addressButtonBorderColor, t)!,
|
||||
dateSectionRowColor:
|
||||
Color.lerp(dateSectionRowColor, other.dateSectionRowColor, t)!,
|
||||
buttonTextColor: Color.lerp(buttonTextColor, other.buttonTextColor, t)!,
|
||||
buttonSecondaryTextColor: Color.lerp(
|
||||
buttonSecondaryTextColor, other.buttonSecondaryTextColor, t)!);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,79 @@
|
||||
import 'package:cake_wallet/themes/extensions/indicator_dot_theme.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class DashboardPageTheme extends ThemeExtension<DashboardPageTheme> {
|
||||
final Color firstGradientBackgroundColor;
|
||||
final Color secondGradientBackgroundColor;
|
||||
final Color thirdGradientBackgroundColor;
|
||||
final Color textColor;
|
||||
final Color cardTextColor;
|
||||
final Color pageTitleTextColor;
|
||||
final Color mainActionsIconColor;
|
||||
|
||||
final IndicatorDotTheme indicatorDotTheme;
|
||||
|
||||
DashboardPageTheme(
|
||||
{required this.firstGradientBackgroundColor,
|
||||
required this.secondGradientBackgroundColor,
|
||||
required this.thirdGradientBackgroundColor,
|
||||
required this.textColor,
|
||||
required this.indicatorDotTheme,
|
||||
Color? mainActionsIconColor,
|
||||
Color? pageTitleTextColor,
|
||||
Color? cardTextColor})
|
||||
: pageTitleTextColor = pageTitleTextColor ?? textColor,
|
||||
mainActionsIconColor = mainActionsIconColor ?? textColor,
|
||||
cardTextColor = cardTextColor ?? textColor;
|
||||
|
||||
@override
|
||||
DashboardPageTheme copyWith(
|
||||
{Color? firstGradientBackgroundColor,
|
||||
Color? secondGradientBackgroundColor,
|
||||
Color? thirdGradientBackgroundColor,
|
||||
Color? textColor,
|
||||
IndicatorDotTheme? indicatorDotTheme,
|
||||
Color? pageTitleTextColor,
|
||||
Color? mainActionsIconColor,
|
||||
Color? cardTextColor}) =>
|
||||
DashboardPageTheme(
|
||||
firstGradientBackgroundColor:
|
||||
firstGradientBackgroundColor ?? this.firstGradientBackgroundColor,
|
||||
secondGradientBackgroundColor: secondGradientBackgroundColor ??
|
||||
this.secondGradientBackgroundColor,
|
||||
thirdGradientBackgroundColor:
|
||||
thirdGradientBackgroundColor ?? this.thirdGradientBackgroundColor,
|
||||
textColor: textColor ?? this.textColor,
|
||||
indicatorDotTheme: indicatorDotTheme ?? this.indicatorDotTheme,
|
||||
pageTitleTextColor: pageTitleTextColor ?? this.pageTitleTextColor,
|
||||
mainActionsIconColor:
|
||||
mainActionsIconColor ?? this.mainActionsIconColor,
|
||||
cardTextColor: cardTextColor ?? this.cardTextColor);
|
||||
|
||||
@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,
|
||||
indicatorDotTheme: indicatorDotTheme.lerp(other.indicatorDotTheme, t),
|
||||
pageTitleTextColor:
|
||||
Color.lerp(pageTitleTextColor, other.pageTitleTextColor, t) ??
|
||||
pageTitleTextColor,
|
||||
mainActionsIconColor:
|
||||
Color.lerp(mainActionsIconColor, other.mainActionsIconColor, t) ??
|
||||
mainActionsIconColor,
|
||||
cardTextColor:
|
||||
Color.lerp(cardTextColor, other.cardTextColor, t) ?? cardTextColor);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,88 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class ExchangePageTheme extends ThemeExtension<ExchangePageTheme> {
|
||||
final Color hintTextColor;
|
||||
final Color receiveAmountColor;
|
||||
final Color firstGradientTopPanelColor;
|
||||
final Color secondGradientTopPanelColor;
|
||||
final Color firstGradientBottomPanelColor;
|
||||
final Color secondGradientBottomPanelColor;
|
||||
final Color textFieldBorderTopPanelColor;
|
||||
final Color textFieldBorderBottomPanelColor;
|
||||
final Color textFieldButtonColor;
|
||||
final Color buttonBackgroundColor;
|
||||
final Color qrCodeColor;
|
||||
final Color dividerCodeColor;
|
||||
|
||||
ExchangePageTheme(
|
||||
{required this.hintTextColor,
|
||||
required this.receiveAmountColor,
|
||||
required this.firstGradientTopPanelColor,
|
||||
required this.secondGradientTopPanelColor,
|
||||
required this.firstGradientBottomPanelColor,
|
||||
required this.secondGradientBottomPanelColor,
|
||||
required this.textFieldBorderTopPanelColor,
|
||||
required this.textFieldBorderBottomPanelColor,
|
||||
required this.textFieldButtonColor,
|
||||
required this.buttonBackgroundColor,
|
||||
required this.qrCodeColor,
|
||||
required this.dividerCodeColor});
|
||||
|
||||
@override
|
||||
ExchangePageTheme copyWith({
|
||||
Color? hintTextColor,
|
||||
Color? receiveAmountColor,
|
||||
Color? firstGradientTopPanelColor,
|
||||
Color? secondGradientTopPanelColor,
|
||||
Color? firstGradientBottomPanelColor,
|
||||
Color? secondGradientBottomPanelColor,
|
||||
Color? textFieldBorderTopPanelColor,
|
||||
Color? textFieldBorderBottomPanelColor,
|
||||
Color? textFieldButtonColor,
|
||||
Color? buttonBackgroundColor,
|
||||
Color? qrCodeColor,
|
||||
Color? dividerCodeColor,
|
||||
}) =>
|
||||
ExchangePageTheme(
|
||||
hintTextColor: hintTextColor ?? this.hintTextColor,
|
||||
receiveAmountColor: receiveAmountColor ?? this.receiveAmountColor,
|
||||
firstGradientTopPanelColor:
|
||||
firstGradientTopPanelColor ?? this.firstGradientTopPanelColor,
|
||||
secondGradientTopPanelColor:
|
||||
secondGradientTopPanelColor ?? this.secondGradientTopPanelColor,
|
||||
firstGradientBottomPanelColor: firstGradientBottomPanelColor ??
|
||||
this.firstGradientBottomPanelColor,
|
||||
secondGradientBottomPanelColor: secondGradientBottomPanelColor ??
|
||||
this.secondGradientBottomPanelColor,
|
||||
textFieldBorderTopPanelColor:
|
||||
textFieldBorderTopPanelColor ?? this.textFieldBorderTopPanelColor,
|
||||
textFieldBorderBottomPanelColor: textFieldBorderBottomPanelColor ??
|
||||
this.textFieldBorderBottomPanelColor,
|
||||
textFieldButtonColor:
|
||||
textFieldButtonColor ?? this.textFieldButtonColor,
|
||||
buttonBackgroundColor:
|
||||
buttonBackgroundColor ?? this.buttonBackgroundColor,
|
||||
qrCodeColor: qrCodeColor ?? this.qrCodeColor,
|
||||
dividerCodeColor: dividerCodeColor ?? this.dividerCodeColor);
|
||||
|
||||
@override
|
||||
ExchangePageTheme lerp(ThemeExtension<ExchangePageTheme>? other, double t) {
|
||||
if (other is! ExchangePageTheme) {
|
||||
return this;
|
||||
}
|
||||
|
||||
return ExchangePageTheme(
|
||||
hintTextColor: Color.lerp(hintTextColor, other.hintTextColor, t) ?? hintTextColor,
|
||||
receiveAmountColor: Color.lerp(receiveAmountColor, other.receiveAmountColor, t) ?? receiveAmountColor,
|
||||
firstGradientTopPanelColor: Color.lerp(firstGradientTopPanelColor, other.firstGradientTopPanelColor, t) ?? firstGradientTopPanelColor,
|
||||
secondGradientTopPanelColor: Color.lerp(secondGradientTopPanelColor, other.secondGradientTopPanelColor, t) ?? secondGradientTopPanelColor,
|
||||
firstGradientBottomPanelColor: Color.lerp(firstGradientBottomPanelColor, other.firstGradientBottomPanelColor, t) ?? firstGradientBottomPanelColor,
|
||||
secondGradientBottomPanelColor: Color.lerp(secondGradientBottomPanelColor, other.secondGradientBottomPanelColor, t) ?? secondGradientBottomPanelColor,
|
||||
textFieldBorderTopPanelColor: Color.lerp(textFieldBorderTopPanelColor, other.textFieldBorderTopPanelColor, t) ?? textFieldBorderTopPanelColor,
|
||||
textFieldBorderBottomPanelColor: Color.lerp(textFieldBorderBottomPanelColor, other.textFieldBorderBottomPanelColor, t) ?? textFieldBorderBottomPanelColor,
|
||||
textFieldButtonColor: Color.lerp(textFieldButtonColor, other.textFieldButtonColor, t) ?? textFieldButtonColor,
|
||||
buttonBackgroundColor: Color.lerp(buttonBackgroundColor, other.buttonBackgroundColor, t) ?? buttonBackgroundColor,
|
||||
qrCodeColor: Color.lerp(qrCodeColor, other.qrCodeColor, t) ?? qrCodeColor,
|
||||
dividerCodeColor: Color.lerp(dividerCodeColor, other.dividerCodeColor, t) ?? dividerCodeColor);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,68 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class FilterTheme extends ThemeExtension<FilterTheme> {
|
||||
final Color checkboxFirstGradientColor;
|
||||
final Color checkboxSecondGradientColor;
|
||||
final Color checkboxBoundsColor;
|
||||
final Color checkboxBackgroundColor;
|
||||
final Color titlesColor;
|
||||
final Color buttonColor;
|
||||
final Color iconColor;
|
||||
|
||||
FilterTheme(
|
||||
{required this.checkboxFirstGradientColor,
|
||||
required this.checkboxSecondGradientColor,
|
||||
required this.checkboxBoundsColor,
|
||||
required this.checkboxBackgroundColor,
|
||||
required this.titlesColor,
|
||||
required this.buttonColor,
|
||||
required this.iconColor});
|
||||
|
||||
@override
|
||||
FilterTheme copyWith({
|
||||
Color? checkboxFirstGradientColor,
|
||||
Color? checkboxSecondGradientColor,
|
||||
Color? checkboxBoundsColor,
|
||||
Color? checkboxBackgroundColor,
|
||||
Color? titlesColor,
|
||||
Color? buttonColor,
|
||||
Color? iconColor,
|
||||
}) =>
|
||||
FilterTheme(
|
||||
checkboxFirstGradientColor:
|
||||
checkboxFirstGradientColor ?? this.checkboxFirstGradientColor,
|
||||
checkboxSecondGradientColor:
|
||||
checkboxSecondGradientColor ?? this.checkboxSecondGradientColor,
|
||||
checkboxBoundsColor: checkboxBoundsColor ?? this.checkboxBoundsColor,
|
||||
checkboxBackgroundColor:
|
||||
checkboxBackgroundColor ?? this.checkboxBackgroundColor,
|
||||
titlesColor: titlesColor ?? this.titlesColor,
|
||||
buttonColor: buttonColor ?? this.buttonColor,
|
||||
iconColor: iconColor ?? this.iconColor);
|
||||
|
||||
@override
|
||||
FilterTheme lerp(ThemeExtension<FilterTheme>? other, double t) {
|
||||
if (other is! FilterTheme) {
|
||||
return this;
|
||||
}
|
||||
|
||||
return FilterTheme(
|
||||
checkboxFirstGradientColor: Color.lerp(checkboxFirstGradientColor,
|
||||
other.checkboxFirstGradientColor, t) ??
|
||||
this.checkboxFirstGradientColor,
|
||||
checkboxSecondGradientColor: Color.lerp(checkboxSecondGradientColor,
|
||||
other.checkboxSecondGradientColor, t) ??
|
||||
this.checkboxSecondGradientColor,
|
||||
checkboxBoundsColor:
|
||||
Color.lerp(checkboxBoundsColor, other.checkboxBoundsColor, t) ??
|
||||
this.checkboxBoundsColor,
|
||||
checkboxBackgroundColor: Color.lerp(
|
||||
checkboxBackgroundColor, other.checkboxBackgroundColor, t) ??
|
||||
this.checkboxBackgroundColor,
|
||||
titlesColor:
|
||||
Color.lerp(titlesColor, other.titlesColor, t) ?? this.titlesColor,
|
||||
buttonColor:
|
||||
Color.lerp(buttonColor, other.buttonColor, t) ?? this.buttonColor,
|
||||
iconColor: Color.lerp(iconColor, other.iconColor, t) ?? this.iconColor);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class IndicatorDotTheme extends ThemeExtension<IndicatorDotTheme> {
|
||||
final Color indicatorColor;
|
||||
final Color activeIndicatorColor;
|
||||
|
||||
IndicatorDotTheme(
|
||||
{required this.indicatorColor, required this.activeIndicatorColor});
|
||||
|
||||
@override
|
||||
IndicatorDotTheme copyWith(
|
||||
{Color? indicatorColor, Color? actionButtonColor}) =>
|
||||
IndicatorDotTheme(
|
||||
indicatorColor: indicatorColor ?? this.indicatorColor,
|
||||
activeIndicatorColor: actionButtonColor ?? this.activeIndicatorColor);
|
||||
|
||||
@override
|
||||
IndicatorDotTheme lerp(ThemeExtension<IndicatorDotTheme>? other, double t) {
|
||||
if (other is! IndicatorDotTheme) {
|
||||
return this;
|
||||
}
|
||||
|
||||
return IndicatorDotTheme(
|
||||
indicatorColor: Color.lerp(indicatorColor, other.indicatorColor, t) ??
|
||||
indicatorColor,
|
||||
activeIndicatorColor:
|
||||
Color.lerp(activeIndicatorColor, other.activeIndicatorColor, t) ??
|
||||
activeIndicatorColor);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class InfoTheme extends ThemeExtension<InfoTheme> {
|
||||
final Color textColor;
|
||||
|
||||
InfoTheme({required this.textColor});
|
||||
|
||||
@override
|
||||
InfoTheme copyWith({Color? textColor}) =>
|
||||
InfoTheme(textColor: textColor ?? this.textColor);
|
||||
|
||||
@override
|
||||
InfoTheme lerp(ThemeExtension<InfoTheme>? other, double t) {
|
||||
if (other is! InfoTheme) {
|
||||
return this;
|
||||
}
|
||||
|
||||
return InfoTheme(
|
||||
textColor: Color.lerp(textColor, other.textColor, t) ?? textColor);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class KeyboardTheme extends ThemeExtension<KeyboardTheme> {
|
||||
final Color keyboardBarColor;
|
||||
|
||||
KeyboardTheme({required this.keyboardBarColor});
|
||||
|
||||
@override
|
||||
Object get type => KeyboardTheme;
|
||||
|
||||
@override
|
||||
KeyboardTheme copyWith({Color? keyboardBarColor}) => KeyboardTheme(
|
||||
keyboardBarColor: keyboardBarColor ?? this.keyboardBarColor);
|
||||
|
||||
@override
|
||||
KeyboardTheme lerp(ThemeExtension<KeyboardTheme>? other, double t) {
|
||||
if (other is! KeyboardTheme) {
|
||||
return this;
|
||||
}
|
||||
|
||||
return KeyboardTheme(
|
||||
keyboardBarColor:
|
||||
Color.lerp(keyboardBarColor, other.keyboardBarColor, t) ??
|
||||
keyboardBarColor);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,75 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class CakeMenuTheme extends ThemeExtension<CakeMenuTheme> {
|
||||
final Color headerFirstGradientColor;
|
||||
final Color headerSecondGradientColor;
|
||||
final Color subnameTextColor;
|
||||
final Color dividerColor;
|
||||
final Color backgroundColor;
|
||||
final Color iconColor;
|
||||
final Color settingActionsIconColor;
|
||||
final Color settingTitleColor;
|
||||
|
||||
CakeMenuTheme(
|
||||
{required this.headerFirstGradientColor,
|
||||
required this.headerSecondGradientColor,
|
||||
required this.backgroundColor,
|
||||
required this.subnameTextColor,
|
||||
required this.dividerColor,
|
||||
required this.iconColor,
|
||||
required this.settingActionsIconColor,
|
||||
required this.settingTitleColor});
|
||||
|
||||
@override
|
||||
CakeMenuTheme copyWith(
|
||||
{Color? headerFirstGradientColor,
|
||||
Color? headerSecondGradientColor,
|
||||
Color? backgroundColor,
|
||||
Color? subnameTextColor,
|
||||
Color? dividerColor,
|
||||
Color? iconColor,
|
||||
Color? settingActionsIconColor,
|
||||
Color? settingTitleColor}) =>
|
||||
CakeMenuTheme(
|
||||
headerFirstGradientColor:
|
||||
headerFirstGradientColor ?? this.headerFirstGradientColor,
|
||||
headerSecondGradientColor:
|
||||
headerSecondGradientColor ?? this.headerSecondGradientColor,
|
||||
backgroundColor: backgroundColor ?? this.backgroundColor,
|
||||
subnameTextColor: subnameTextColor ?? this.subnameTextColor,
|
||||
dividerColor: dividerColor ?? this.dividerColor,
|
||||
iconColor: iconColor ?? this.iconColor,
|
||||
settingActionsIconColor:
|
||||
settingActionsIconColor ?? this.settingActionsIconColor,
|
||||
settingTitleColor: settingTitleColor ?? this.settingTitleColor);
|
||||
|
||||
@override
|
||||
CakeMenuTheme lerp(ThemeExtension<CakeMenuTheme>? other, double t) {
|
||||
if (other is! CakeMenuTheme) {
|
||||
return this;
|
||||
}
|
||||
|
||||
return CakeMenuTheme(
|
||||
headerFirstGradientColor: Color.lerp(
|
||||
headerFirstGradientColor, other.headerFirstGradientColor, t) ??
|
||||
headerFirstGradientColor,
|
||||
headerSecondGradientColor: Color.lerp(headerSecondGradientColor,
|
||||
other.headerSecondGradientColor, t) ??
|
||||
headerSecondGradientColor,
|
||||
backgroundColor:
|
||||
Color.lerp(backgroundColor, other.backgroundColor, t) ??
|
||||
backgroundColor,
|
||||
subnameTextColor:
|
||||
Color.lerp(subnameTextColor, other.subnameTextColor, t) ??
|
||||
subnameTextColor,
|
||||
dividerColor:
|
||||
Color.lerp(dividerColor, other.dividerColor, t) ?? dividerColor,
|
||||
iconColor: Color.lerp(iconColor, other.iconColor, t) ?? iconColor,
|
||||
settingActionsIconColor: Color.lerp(
|
||||
settingActionsIconColor, other.settingActionsIconColor, t) ??
|
||||
settingActionsIconColor,
|
||||
settingTitleColor: Color.lerp(
|
||||
settingTitleColor, other.settingTitleColor, t) ??
|
||||
settingTitleColor);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class NewWalletTheme extends ThemeExtension<NewWalletTheme> {
|
||||
final Color hintTextColor;
|
||||
final Color underlineColor;
|
||||
|
||||
NewWalletTheme({required this.hintTextColor, required this.underlineColor});
|
||||
|
||||
@override
|
||||
Object get type => NewWalletTheme;
|
||||
|
||||
@override
|
||||
NewWalletTheme copyWith({Color? hintTextColor, Color? underlineColor}) =>
|
||||
NewWalletTheme(
|
||||
hintTextColor: hintTextColor ?? this.hintTextColor,
|
||||
underlineColor: underlineColor ?? this.underlineColor);
|
||||
|
||||
@override
|
||||
NewWalletTheme lerp(ThemeExtension<NewWalletTheme>? other, double t) {
|
||||
if (other is! NewWalletTheme) {
|
||||
return this;
|
||||
}
|
||||
|
||||
return NewWalletTheme(
|
||||
hintTextColor:
|
||||
Color.lerp(hintTextColor, other.hintTextColor, t) ?? hintTextColor,
|
||||
underlineColor: Color.lerp(underlineColor, other.underlineColor, t) ??
|
||||
underlineColor);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class OrderTheme extends ThemeExtension<OrderTheme> {
|
||||
final Color iconColor;
|
||||
|
||||
OrderTheme({required this.iconColor});
|
||||
|
||||
@override
|
||||
OrderTheme copyWith({Color? iconColor}) =>
|
||||
OrderTheme(iconColor: iconColor ?? this.iconColor);
|
||||
|
||||
@override
|
||||
OrderTheme lerp(ThemeExtension<OrderTheme>? other, double t) {
|
||||
if (other is! OrderTheme) {
|
||||
return this;
|
||||
}
|
||||
|
||||
return OrderTheme(
|
||||
iconColor: Color.lerp(iconColor, other.iconColor, t) ?? iconColor);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,54 @@
|
||||
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,
|
||||
this.searchIconColor,
|
||||
required this.searchBackgroundFillColor,
|
||||
required this.searchTextColor,
|
||||
this.searchHintColor});
|
||||
|
||||
@override
|
||||
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) {
|
||||
if (other is! PickerTheme) {
|
||||
return this;
|
||||
}
|
||||
|
||||
return PickerTheme(
|
||||
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);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class PinCodeTheme extends ThemeExtension<PinCodeTheme> {
|
||||
final Color indicatorsColor;
|
||||
final Color switchColor;
|
||||
|
||||
PinCodeTheme({required this.indicatorsColor, required this.switchColor});
|
||||
|
||||
@override
|
||||
PinCodeTheme copyWith({Color? indicatorsColor, Color? switchColor}) =>
|
||||
PinCodeTheme(
|
||||
indicatorsColor: indicatorsColor ?? this.indicatorsColor,
|
||||
switchColor: switchColor ?? this.switchColor);
|
||||
|
||||
@override
|
||||
PinCodeTheme lerp(ThemeExtension<PinCodeTheme>? other, double t) {
|
||||
if (other is! PinCodeTheme) {
|
||||
return this;
|
||||
}
|
||||
|
||||
return PinCodeTheme(
|
||||
indicatorsColor:
|
||||
Color.lerp(indicatorsColor, other.indicatorsColor, t) ??
|
||||
indicatorsColor,
|
||||
switchColor:
|
||||
Color.lerp(switchColor, other.switchColor, t) ?? switchColor);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class PlaceholderTheme extends ThemeExtension<PlaceholderTheme> {
|
||||
final Color color;
|
||||
|
||||
PlaceholderTheme({required this.color});
|
||||
|
||||
@override
|
||||
PlaceholderTheme copyWith({Color? color}) =>
|
||||
PlaceholderTheme(color: color ?? this.color);
|
||||
|
||||
@override
|
||||
PlaceholderTheme lerp(ThemeExtension<PlaceholderTheme>? other, double t) {
|
||||
if (other is! PlaceholderTheme) {
|
||||
return this;
|
||||
}
|
||||
|
||||
return PlaceholderTheme(color: Color.lerp(color, other.color, t) ?? color);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class QRCodeTheme extends ThemeExtension<QRCodeTheme> {
|
||||
final Color qrCodeColor;
|
||||
final Color qrWidgetCopyButtonColor;
|
||||
|
||||
QRCodeTheme(
|
||||
{required this.qrCodeColor, required this.qrWidgetCopyButtonColor});
|
||||
|
||||
@override
|
||||
QRCodeTheme copyWith({Color? qrCodeColor, Color? qrWidgetCopyButtonColor}) =>
|
||||
QRCodeTheme(
|
||||
qrCodeColor: qrCodeColor ?? this.qrCodeColor,
|
||||
qrWidgetCopyButtonColor:
|
||||
qrWidgetCopyButtonColor ?? this.qrWidgetCopyButtonColor);
|
||||
|
||||
@override
|
||||
QRCodeTheme lerp(ThemeExtension<QRCodeTheme>? other, double t) {
|
||||
if (other is! QRCodeTheme) {
|
||||
return this;
|
||||
}
|
||||
|
||||
return QRCodeTheme(
|
||||
qrCodeColor: Color.lerp(qrCodeColor, other.qrCodeColor, t)!,
|
||||
qrWidgetCopyButtonColor: Color.lerp(
|
||||
qrWidgetCopyButtonColor, other.qrWidgetCopyButtonColor, t)!);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,70 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class ReceivePageTheme extends ThemeExtension<ReceivePageTheme> {
|
||||
final Color currentTileBackgroundColor;
|
||||
final Color currentTileTextColor;
|
||||
final Color tilesBackgroundColor;
|
||||
final Color tilesTextColor;
|
||||
final Color iconsBackgroundColor;
|
||||
final Color iconsColor;
|
||||
final Color amountBottomBorderColor;
|
||||
final Color amountHintTextColor;
|
||||
|
||||
ReceivePageTheme(
|
||||
{required this.currentTileBackgroundColor,
|
||||
required this.currentTileTextColor,
|
||||
required this.tilesBackgroundColor,
|
||||
required this.tilesTextColor,
|
||||
required this.iconsBackgroundColor,
|
||||
required this.iconsColor,
|
||||
required this.amountBottomBorderColor,
|
||||
required this.amountHintTextColor});
|
||||
|
||||
@override
|
||||
ReceivePageTheme copyWith(
|
||||
{Color? currentTileBackgroundColor,
|
||||
Color? currentTileTextColor,
|
||||
Color? tilesBackgroundColor,
|
||||
Color? tilesTextColor,
|
||||
Color? iconsBackgroundColor,
|
||||
Color? iconsColor,
|
||||
Color? amountBottomBorderColor,
|
||||
Color? amountHintTextColor}) =>
|
||||
ReceivePageTheme(
|
||||
currentTileBackgroundColor:
|
||||
currentTileBackgroundColor ?? this.currentTileBackgroundColor,
|
||||
currentTileTextColor:
|
||||
currentTileTextColor ?? this.currentTileTextColor,
|
||||
tilesBackgroundColor:
|
||||
tilesBackgroundColor ?? this.tilesBackgroundColor,
|
||||
tilesTextColor: tilesTextColor ?? this.tilesTextColor,
|
||||
iconsBackgroundColor:
|
||||
iconsBackgroundColor ?? this.iconsBackgroundColor,
|
||||
iconsColor: iconsColor ?? this.iconsColor,
|
||||
amountBottomBorderColor:
|
||||
amountBottomBorderColor ?? this.amountBottomBorderColor,
|
||||
amountHintTextColor: amountHintTextColor ?? this.amountHintTextColor);
|
||||
|
||||
@override
|
||||
ReceivePageTheme lerp(ThemeExtension<ReceivePageTheme>? other, double t) {
|
||||
if (other is! ReceivePageTheme) {
|
||||
return this;
|
||||
}
|
||||
|
||||
return ReceivePageTheme(
|
||||
currentTileBackgroundColor: Color.lerp(
|
||||
currentTileBackgroundColor, other.currentTileBackgroundColor, t)!,
|
||||
currentTileTextColor:
|
||||
Color.lerp(currentTileTextColor, other.currentTileTextColor, t)!,
|
||||
tilesBackgroundColor:
|
||||
Color.lerp(tilesBackgroundColor, other.tilesBackgroundColor, t)!,
|
||||
tilesTextColor: Color.lerp(tilesTextColor, other.tilesTextColor, t)!,
|
||||
iconsBackgroundColor:
|
||||
Color.lerp(iconsBackgroundColor, other.iconsBackgroundColor, t)!,
|
||||
iconsColor: Color.lerp(iconsColor, other.iconsColor, t)!,
|
||||
amountBottomBorderColor: Color.lerp(
|
||||
amountBottomBorderColor, other.amountBottomBorderColor, t)!,
|
||||
amountHintTextColor:
|
||||
Color.lerp(amountHintTextColor, other.amountHintTextColor, t)!);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class SeedWidgetTheme extends ThemeExtension<SeedWidgetTheme> {
|
||||
final Color hintTextColor;
|
||||
|
||||
SeedWidgetTheme({required this.hintTextColor});
|
||||
|
||||
@override
|
||||
SeedWidgetTheme copyWith({Color? hintTextColor}) =>
|
||||
SeedWidgetTheme(hintTextColor: hintTextColor ?? this.hintTextColor);
|
||||
|
||||
@override
|
||||
SeedWidgetTheme lerp(ThemeExtension<SeedWidgetTheme>? other, double t) {
|
||||
if (other is! SeedWidgetTheme) {
|
||||
return this;
|
||||
}
|
||||
|
||||
return SeedWidgetTheme(
|
||||
hintTextColor:
|
||||
Color.lerp(hintTextColor, other.hintTextColor, t) ?? hintTextColor);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,117 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class SendPageTheme extends ThemeExtension<SendPageTheme> {
|
||||
final Color templateTitleColor;
|
||||
final Color templateBackgroundColor;
|
||||
final Color templateNewTextColor;
|
||||
final Color templateSelectedCurrencyBackgroundColor;
|
||||
final Color templateSelectedCurrencyTitleColor;
|
||||
final Color templateDottedBorderColor;
|
||||
final Color estimatedFeeColor;
|
||||
final Color textFieldButtonIconColor;
|
||||
final Color textFieldButtonColor;
|
||||
final Color textFieldHintColor;
|
||||
final Color textFieldBorderColor;
|
||||
final Color firstGradientColor;
|
||||
final Color secondGradientColor;
|
||||
final Color indicatorDotColor;
|
||||
|
||||
SendPageTheme(
|
||||
{required this.templateTitleColor,
|
||||
required this.templateBackgroundColor,
|
||||
required this.templateNewTextColor,
|
||||
required this.templateSelectedCurrencyBackgroundColor,
|
||||
required this.templateSelectedCurrencyTitleColor,
|
||||
required this.templateDottedBorderColor,
|
||||
required this.estimatedFeeColor,
|
||||
required this.textFieldButtonIconColor,
|
||||
required this.textFieldButtonColor,
|
||||
required this.textFieldHintColor,
|
||||
required this.textFieldBorderColor,
|
||||
required this.firstGradientColor,
|
||||
required this.secondGradientColor,
|
||||
required this.indicatorDotColor});
|
||||
|
||||
@override
|
||||
SendPageTheme copyWith(
|
||||
{Color? templateTitleColor,
|
||||
Color? templateBackgroundColor,
|
||||
Color? templateNewTextColor,
|
||||
Color? templateSelectedCurrencyBackgroundColor,
|
||||
Color? templateSelectedCurrencyTitleColor,
|
||||
Color? templateDottedBorderColor,
|
||||
Color? estimatedFeeColor,
|
||||
Color? textFieldButtonIconColor,
|
||||
Color? textFieldButtonColor,
|
||||
Color? textFieldHintColor,
|
||||
Color? textFieldBorderColor,
|
||||
Color? firstGradientColor,
|
||||
Color? secondGradientColor,
|
||||
Color? indicatorDotColor}) =>
|
||||
SendPageTheme(
|
||||
templateTitleColor: templateTitleColor ?? this.templateTitleColor,
|
||||
templateBackgroundColor:
|
||||
templateBackgroundColor ?? this.templateBackgroundColor,
|
||||
templateNewTextColor:
|
||||
templateNewTextColor ?? this.templateNewTextColor,
|
||||
templateSelectedCurrencyBackgroundColor:
|
||||
templateSelectedCurrencyBackgroundColor ??
|
||||
this.templateSelectedCurrencyBackgroundColor,
|
||||
templateSelectedCurrencyTitleColor:
|
||||
templateSelectedCurrencyTitleColor ??
|
||||
this.templateSelectedCurrencyTitleColor,
|
||||
templateDottedBorderColor:
|
||||
templateDottedBorderColor ?? this.templateDottedBorderColor,
|
||||
estimatedFeeColor: estimatedFeeColor ?? this.estimatedFeeColor,
|
||||
textFieldButtonIconColor:
|
||||
textFieldButtonIconColor ?? this.textFieldButtonIconColor,
|
||||
textFieldButtonColor:
|
||||
textFieldButtonColor ?? this.textFieldButtonColor,
|
||||
textFieldHintColor: textFieldHintColor ?? this.textFieldHintColor,
|
||||
textFieldBorderColor:
|
||||
textFieldBorderColor ?? this.textFieldBorderColor,
|
||||
firstGradientColor: firstGradientColor ?? this.firstGradientColor,
|
||||
secondGradientColor: secondGradientColor ?? this.secondGradientColor,
|
||||
indicatorDotColor: indicatorDotColor ?? this.indicatorDotColor);
|
||||
|
||||
@override
|
||||
SendPageTheme lerp(ThemeExtension<SendPageTheme>? other, double t) {
|
||||
if (other is! SendPageTheme) {
|
||||
return this;
|
||||
}
|
||||
|
||||
return SendPageTheme(
|
||||
templateTitleColor:
|
||||
Color.lerp(templateTitleColor, other.templateTitleColor, t)!,
|
||||
templateBackgroundColor: Color.lerp(
|
||||
templateBackgroundColor, other.templateBackgroundColor, t)!,
|
||||
templateNewTextColor:
|
||||
Color.lerp(templateNewTextColor, other.templateNewTextColor, t)!,
|
||||
templateSelectedCurrencyBackgroundColor: Color.lerp(
|
||||
templateSelectedCurrencyBackgroundColor,
|
||||
other.templateSelectedCurrencyBackgroundColor,
|
||||
t)!,
|
||||
templateSelectedCurrencyTitleColor: Color.lerp(
|
||||
templateSelectedCurrencyTitleColor,
|
||||
other.templateSelectedCurrencyTitleColor,
|
||||
t)!,
|
||||
templateDottedBorderColor: Color.lerp(
|
||||
templateDottedBorderColor, other.templateDottedBorderColor, t)!,
|
||||
estimatedFeeColor:
|
||||
Color.lerp(estimatedFeeColor, other.estimatedFeeColor, t)!,
|
||||
textFieldButtonIconColor: Color.lerp(
|
||||
textFieldButtonIconColor, other.textFieldButtonIconColor, t)!,
|
||||
textFieldButtonColor:
|
||||
Color.lerp(textFieldButtonColor, other.textFieldButtonColor, t)!,
|
||||
textFieldHintColor:
|
||||
Color.lerp(textFieldHintColor, other.textFieldHintColor, t)!,
|
||||
textFieldBorderColor:
|
||||
Color.lerp(textFieldBorderColor, other.textFieldBorderColor, t)!,
|
||||
firstGradientColor:
|
||||
Color.lerp(firstGradientColor, other.firstGradientColor, t)!,
|
||||
secondGradientColor:
|
||||
Color.lerp(secondGradientColor, other.secondGradientColor, t)!,
|
||||
indicatorDotColor:
|
||||
Color.lerp(indicatorDotColor, other.indicatorDotColor, t)!);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class SupportPageTheme extends ThemeExtension<SupportPageTheme> {
|
||||
final Color iconColor;
|
||||
|
||||
SupportPageTheme({required this.iconColor});
|
||||
|
||||
@override
|
||||
SupportPageTheme copyWith({Color? iconColor}) =>
|
||||
SupportPageTheme(iconColor: iconColor ?? this.iconColor);
|
||||
|
||||
@override
|
||||
SupportPageTheme lerp(ThemeExtension<SupportPageTheme>? other, double t) {
|
||||
if (other is! SupportPageTheme) {
|
||||
return this;
|
||||
}
|
||||
|
||||
return SupportPageTheme(
|
||||
iconColor: Color.lerp(iconColor, other.iconColor, t) ?? iconColor);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,48 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class SyncIndicatorTheme extends ThemeExtension<SyncIndicatorTheme> {
|
||||
final Color textColor;
|
||||
final Color syncedBackgroundColor;
|
||||
final Color notSyncedIconColor;
|
||||
final Color notSyncedBackgroundColor;
|
||||
|
||||
SyncIndicatorTheme(
|
||||
{required this.textColor,
|
||||
required this.syncedBackgroundColor,
|
||||
required this.notSyncedIconColor,
|
||||
required this.notSyncedBackgroundColor});
|
||||
|
||||
@override
|
||||
SyncIndicatorTheme copyWith({
|
||||
Color? textColor,
|
||||
Color? syncedBackgroundColor,
|
||||
Color? notSyncedIconColor,
|
||||
Color? notSyncedBackgroundColor,
|
||||
}) =>
|
||||
SyncIndicatorTheme(
|
||||
textColor: textColor ?? this.textColor,
|
||||
syncedBackgroundColor:
|
||||
syncedBackgroundColor ?? this.syncedBackgroundColor,
|
||||
notSyncedIconColor: notSyncedIconColor ?? this.notSyncedIconColor,
|
||||
notSyncedBackgroundColor:
|
||||
notSyncedBackgroundColor ?? this.notSyncedBackgroundColor);
|
||||
|
||||
@override
|
||||
SyncIndicatorTheme lerp(ThemeExtension<SyncIndicatorTheme>? other, double t) {
|
||||
if (other is! SyncIndicatorTheme) {
|
||||
return this;
|
||||
}
|
||||
|
||||
return SyncIndicatorTheme(
|
||||
textColor: Color.lerp(textColor, other.textColor, t) ?? textColor,
|
||||
syncedBackgroundColor:
|
||||
Color.lerp(syncedBackgroundColor, other.syncedBackgroundColor, t) ??
|
||||
syncedBackgroundColor,
|
||||
notSyncedIconColor:
|
||||
Color.lerp(notSyncedIconColor, other.notSyncedIconColor, t) ??
|
||||
notSyncedIconColor,
|
||||
notSyncedBackgroundColor: Color.lerp(
|
||||
notSyncedBackgroundColor, other.notSyncedBackgroundColor, t) ??
|
||||
notSyncedBackgroundColor);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class TransactionTradeTheme extends ThemeExtension<TransactionTradeTheme> {
|
||||
final Color detailsTitlesColor;
|
||||
final Color rowsColor;
|
||||
|
||||
TransactionTradeTheme(
|
||||
{required this.detailsTitlesColor, required this.rowsColor});
|
||||
|
||||
@override
|
||||
TransactionTradeTheme copyWith(
|
||||
{Color? detailsTitlesColor, Color? rowsColor}) =>
|
||||
TransactionTradeTheme(
|
||||
detailsTitlesColor: detailsTitlesColor ?? this.detailsTitlesColor,
|
||||
rowsColor: rowsColor ?? this.rowsColor);
|
||||
|
||||
@override
|
||||
TransactionTradeTheme lerp(
|
||||
ThemeExtension<TransactionTradeTheme>? other, double t) {
|
||||
if (other is! TransactionTradeTheme) {
|
||||
return this;
|
||||
}
|
||||
|
||||
return TransactionTradeTheme(
|
||||
detailsTitlesColor:
|
||||
Color.lerp(detailsTitlesColor, other.detailsTitlesColor, t)!,
|
||||
rowsColor: Color.lerp(rowsColor, other.rowsColor, t)!);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class WalletListTheme extends ThemeExtension<WalletListTheme> {
|
||||
final Color restoreWalletButtonTextColor;
|
||||
final Color createNewWalletButtonBackgroundColor;
|
||||
|
||||
WalletListTheme(
|
||||
{required this.restoreWalletButtonTextColor,
|
||||
required this.createNewWalletButtonBackgroundColor});
|
||||
|
||||
@override
|
||||
WalletListTheme copyWith(
|
||||
{Color? restoreWalletButtonTextColor,
|
||||
Color? createNewWalletButtonBackgroundColor}) =>
|
||||
WalletListTheme(
|
||||
restoreWalletButtonTextColor:
|
||||
restoreWalletButtonTextColor ?? this.restoreWalletButtonTextColor,
|
||||
createNewWalletButtonBackgroundColor:
|
||||
createNewWalletButtonBackgroundColor ??
|
||||
this.createNewWalletButtonBackgroundColor);
|
||||
|
||||
@override
|
||||
WalletListTheme lerp(ThemeExtension<WalletListTheme>? other, double t) {
|
||||
if (other is! WalletListTheme) {
|
||||
return this;
|
||||
}
|
||||
|
||||
return WalletListTheme(
|
||||
restoreWalletButtonTextColor: Color.lerp(restoreWalletButtonTextColor,
|
||||
other.restoreWalletButtonTextColor, t) ??
|
||||
restoreWalletButtonTextColor,
|
||||
createNewWalletButtonBackgroundColor: Color.lerp(
|
||||
createNewWalletButtonBackgroundColor,
|
||||
other.createNewWalletButtonBackgroundColor,
|
||||
t) ??
|
||||
createNewWalletButtonBackgroundColor);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user