mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2025-01-28 21:46:02 +00:00
fix: missing migrated styles
This commit is contained in:
parent
c0cf20b543
commit
e49c4ea9a8
5 changed files with 41 additions and 12 deletions
|
@ -5,6 +5,8 @@ import 'package:cake_wallet/src/widgets/add_template_button.dart';
|
||||||
import 'package:cake_wallet/src/widgets/alert_with_two_actions.dart';
|
import 'package:cake_wallet/src/widgets/alert_with_two_actions.dart';
|
||||||
import 'package:cake_wallet/src/widgets/picker.dart';
|
import 'package:cake_wallet/src/widgets/picker.dart';
|
||||||
import 'package:cake_wallet/src/widgets/template_tile.dart';
|
import 'package:cake_wallet/src/widgets/template_tile.dart';
|
||||||
|
import 'package:cake_wallet/themes/extensions/seed_widget_theme.dart';
|
||||||
|
import 'package:cake_wallet/themes/extensions/send_page_theme.dart';
|
||||||
import 'package:cake_wallet/themes/theme_base.dart';
|
import 'package:cake_wallet/themes/theme_base.dart';
|
||||||
import 'package:cake_wallet/utils/payment_request.dart';
|
import 'package:cake_wallet/utils/payment_request.dart';
|
||||||
import 'package:cake_wallet/utils/request_review_handler.dart';
|
import 'package:cake_wallet/utils/request_review_handler.dart';
|
||||||
|
@ -319,10 +321,7 @@ class SendPage extends BasePage {
|
||||||
text:
|
text:
|
||||||
'Change your asset (${sendViewModel.selectedCryptoCurrency})',
|
'Change your asset (${sendViewModel.selectedCryptoCurrency})',
|
||||||
color: Colors.transparent,
|
color: Colors.transparent,
|
||||||
textColor: Theme.of(context)
|
textColor: Theme.of(context).extension<SeedWidgetTheme>()!.hintTextColor,
|
||||||
.accentTextTheme
|
|
||||||
!.displaySmall!
|
|
||||||
.decorationColor!,
|
|
||||||
))),
|
))),
|
||||||
if (sendViewModel.hasMultiRecipient)
|
if (sendViewModel.hasMultiRecipient)
|
||||||
Padding(
|
Padding(
|
||||||
|
@ -337,15 +336,9 @@ class SendPage extends BasePage {
|
||||||
},
|
},
|
||||||
text: S.of(context).add_receiver,
|
text: S.of(context).add_receiver,
|
||||||
color: Colors.transparent,
|
color: Colors.transparent,
|
||||||
textColor: Theme.of(context)
|
textColor: Theme.of(context).extension<SeedWidgetTheme>()!.hintTextColor,
|
||||||
.accentTextTheme
|
|
||||||
!.displaySmall!
|
|
||||||
.decorationColor!,
|
|
||||||
isDottedBorder: true,
|
isDottedBorder: true,
|
||||||
borderColor: Theme.of(context)
|
borderColor: Theme.of(context).extension<SendPageTheme>()!.templateDottedBorderColor,
|
||||||
.primaryTextTheme
|
|
||||||
!.displaySmall!
|
|
||||||
.decorationColor!,
|
|
||||||
)),
|
)),
|
||||||
Observer(
|
Observer(
|
||||||
builder: (_) {
|
builder: (_) {
|
||||||
|
|
|
@ -13,6 +13,7 @@ import 'package:cake_wallet/themes/extensions/new_wallet_theme.dart';
|
||||||
import 'package:cake_wallet/themes/extensions/order_theme.dart';
|
import 'package:cake_wallet/themes/extensions/order_theme.dart';
|
||||||
import 'package:cake_wallet/themes/extensions/picker_theme.dart';
|
import 'package:cake_wallet/themes/extensions/picker_theme.dart';
|
||||||
import 'package:cake_wallet/themes/extensions/pin_code_theme.dart';
|
import 'package:cake_wallet/themes/extensions/pin_code_theme.dart';
|
||||||
|
import 'package:cake_wallet/themes/extensions/seed_widget_theme.dart';
|
||||||
import 'package:cake_wallet/themes/extensions/send_page_theme.dart';
|
import 'package:cake_wallet/themes/extensions/send_page_theme.dart';
|
||||||
import 'package:cake_wallet/themes/extensions/support_page_theme.dart';
|
import 'package:cake_wallet/themes/extensions/support_page_theme.dart';
|
||||||
import 'package:cake_wallet/themes/extensions/sync_indicator_theme.dart';
|
import 'package:cake_wallet/themes/extensions/sync_indicator_theme.dart';
|
||||||
|
@ -151,6 +152,10 @@ class DarkTheme extends ThemeBase {
|
||||||
secondGradientColor: PaletteDark.darkNightBlue,
|
secondGradientColor: PaletteDark.darkNightBlue,
|
||||||
firstGradientColor: PaletteDark.darkNightBlue);
|
firstGradientColor: PaletteDark.darkNightBlue);
|
||||||
|
|
||||||
|
@override
|
||||||
|
SeedWidgetTheme get seedWidgetTheme =>
|
||||||
|
SeedWidgetTheme(hintTextColor: PaletteDark.darkCyanBlue);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
ThemeData get themeData => super.themeData.copyWith(
|
ThemeData get themeData => super.themeData.copyWith(
|
||||||
indicatorColor: PaletteDark.cyanBlue, // page indicator
|
indicatorColor: PaletteDark.cyanBlue, // page indicator
|
||||||
|
|
22
lib/themes/extensions/seed_widget_theme.dart
Normal file
22
lib/themes/extensions/seed_widget_theme.dart
Normal file
|
@ -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);
|
||||||
|
}
|
||||||
|
}
|
|
@ -13,6 +13,7 @@ import 'package:cake_wallet/themes/extensions/new_wallet_theme.dart';
|
||||||
import 'package:cake_wallet/themes/extensions/order_theme.dart';
|
import 'package:cake_wallet/themes/extensions/order_theme.dart';
|
||||||
import 'package:cake_wallet/themes/extensions/picker_theme.dart';
|
import 'package:cake_wallet/themes/extensions/picker_theme.dart';
|
||||||
import 'package:cake_wallet/themes/extensions/pin_code_theme.dart';
|
import 'package:cake_wallet/themes/extensions/pin_code_theme.dart';
|
||||||
|
import 'package:cake_wallet/themes/extensions/seed_widget_theme.dart';
|
||||||
import 'package:cake_wallet/themes/extensions/send_page_theme.dart';
|
import 'package:cake_wallet/themes/extensions/send_page_theme.dart';
|
||||||
import 'package:cake_wallet/themes/extensions/support_page_theme.dart';
|
import 'package:cake_wallet/themes/extensions/support_page_theme.dart';
|
||||||
import 'package:cake_wallet/themes/extensions/sync_indicator_theme.dart';
|
import 'package:cake_wallet/themes/extensions/sync_indicator_theme.dart';
|
||||||
|
@ -152,6 +153,10 @@ class LightTheme extends ThemeBase {
|
||||||
secondGradientColor: Palette.blueGreyCraiola,
|
secondGradientColor: Palette.blueGreyCraiola,
|
||||||
firstGradientColor: Palette.blueCraiola);
|
firstGradientColor: Palette.blueCraiola);
|
||||||
|
|
||||||
|
@override
|
||||||
|
SeedWidgetTheme get seedWidgetTheme =>
|
||||||
|
SeedWidgetTheme(hintTextColor: Palette.darkGray);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
ThemeData get themeData => super.themeData.copyWith(
|
ThemeData get themeData => super.themeData.copyWith(
|
||||||
indicatorColor:
|
indicatorColor:
|
||||||
|
|
|
@ -12,6 +12,7 @@ import 'package:cake_wallet/themes/extensions/new_wallet_theme.dart';
|
||||||
import 'package:cake_wallet/themes/extensions/order_theme.dart';
|
import 'package:cake_wallet/themes/extensions/order_theme.dart';
|
||||||
import 'package:cake_wallet/themes/extensions/picker_theme.dart';
|
import 'package:cake_wallet/themes/extensions/picker_theme.dart';
|
||||||
import 'package:cake_wallet/themes/extensions/pin_code_theme.dart';
|
import 'package:cake_wallet/themes/extensions/pin_code_theme.dart';
|
||||||
|
import 'package:cake_wallet/themes/extensions/seed_widget_theme.dart';
|
||||||
import 'package:cake_wallet/themes/extensions/send_page_theme.dart';
|
import 'package:cake_wallet/themes/extensions/send_page_theme.dart';
|
||||||
import 'package:cake_wallet/themes/extensions/support_page_theme.dart';
|
import 'package:cake_wallet/themes/extensions/support_page_theme.dart';
|
||||||
import 'package:cake_wallet/themes/extensions/sync_indicator_theme.dart';
|
import 'package:cake_wallet/themes/extensions/sync_indicator_theme.dart';
|
||||||
|
@ -88,6 +89,8 @@ abstract class ThemeBase {
|
||||||
|
|
||||||
SendPageTheme get sendPageTheme;
|
SendPageTheme get sendPageTheme;
|
||||||
|
|
||||||
|
SeedWidgetTheme get seedWidgetTheme;
|
||||||
|
|
||||||
ThemeData get themeData => generatedThemeData.copyWith(
|
ThemeData get themeData => generatedThemeData.copyWith(
|
||||||
primaryColor: primaryColor,
|
primaryColor: primaryColor,
|
||||||
cardColor: containerColor,
|
cardColor: containerColor,
|
||||||
|
@ -111,6 +114,7 @@ abstract class ThemeBase {
|
||||||
alertTheme,
|
alertTheme,
|
||||||
orderTheme,
|
orderTheme,
|
||||||
sendPageTheme,
|
sendPageTheme,
|
||||||
|
seedWidgetTheme,
|
||||||
],
|
],
|
||||||
scrollbarTheme: ScrollbarThemeData(
|
scrollbarTheme: ScrollbarThemeData(
|
||||||
thumbColor: MaterialStateProperty.all(scrollbarTheme.thumbColor),
|
thumbColor: MaterialStateProperty.all(scrollbarTheme.thumbColor),
|
||||||
|
|
Loading…
Reference in a new issue