fix: missing migrated styles

This commit is contained in:
Rafael Saes 2023-07-05 09:23:29 -03:00
parent c0cf20b543
commit e49c4ea9a8
5 changed files with 41 additions and 12 deletions

View file

@ -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/picker.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/utils/payment_request.dart';
import 'package:cake_wallet/utils/request_review_handler.dart';
@ -319,10 +321,7 @@ class SendPage extends BasePage {
text:
'Change your asset (${sendViewModel.selectedCryptoCurrency})',
color: Colors.transparent,
textColor: Theme.of(context)
.accentTextTheme
!.displaySmall!
.decorationColor!,
textColor: Theme.of(context).extension<SeedWidgetTheme>()!.hintTextColor,
))),
if (sendViewModel.hasMultiRecipient)
Padding(
@ -337,15 +336,9 @@ class SendPage extends BasePage {
},
text: S.of(context).add_receiver,
color: Colors.transparent,
textColor: Theme.of(context)
.accentTextTheme
!.displaySmall!
.decorationColor!,
textColor: Theme.of(context).extension<SeedWidgetTheme>()!.hintTextColor,
isDottedBorder: true,
borderColor: Theme.of(context)
.primaryTextTheme
!.displaySmall!
.decorationColor!,
borderColor: Theme.of(context).extension<SendPageTheme>()!.templateDottedBorderColor,
)),
Observer(
builder: (_) {

View file

@ -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/picker_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/support_page_theme.dart';
import 'package:cake_wallet/themes/extensions/sync_indicator_theme.dart';
@ -151,6 +152,10 @@ class DarkTheme extends ThemeBase {
secondGradientColor: PaletteDark.darkNightBlue,
firstGradientColor: PaletteDark.darkNightBlue);
@override
SeedWidgetTheme get seedWidgetTheme =>
SeedWidgetTheme(hintTextColor: PaletteDark.darkCyanBlue);
@override
ThemeData get themeData => super.themeData.copyWith(
indicatorColor: PaletteDark.cyanBlue, // page indicator

View 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);
}
}

View file

@ -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/picker_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/support_page_theme.dart';
import 'package:cake_wallet/themes/extensions/sync_indicator_theme.dart';
@ -152,6 +153,10 @@ class LightTheme extends ThemeBase {
secondGradientColor: Palette.blueGreyCraiola,
firstGradientColor: Palette.blueCraiola);
@override
SeedWidgetTheme get seedWidgetTheme =>
SeedWidgetTheme(hintTextColor: Palette.darkGray);
@override
ThemeData get themeData => super.themeData.copyWith(
indicatorColor:

View file

@ -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/picker_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/support_page_theme.dart';
import 'package:cake_wallet/themes/extensions/sync_indicator_theme.dart';
@ -88,6 +89,8 @@ abstract class ThemeBase {
SendPageTheme get sendPageTheme;
SeedWidgetTheme get seedWidgetTheme;
ThemeData get themeData => generatedThemeData.copyWith(
primaryColor: primaryColor,
cardColor: containerColor,
@ -111,6 +114,7 @@ abstract class ThemeBase {
alertTheme,
orderTheme,
sendPageTheme,
seedWidgetTheme,
],
scrollbarTheme: ScrollbarThemeData(
thumbColor: MaterialStateProperty.all(scrollbarTheme.thumbColor),