diff --git a/lib/src/screens/pin_code/pin_code_widget.dart b/lib/src/screens/pin_code/pin_code_widget.dart index 628d5ab6f..5153044ff 100644 --- a/lib/src/screens/pin_code/pin_code_widget.dart +++ b/lib/src/screens/pin_code/pin_code_widget.dart @@ -1,3 +1,4 @@ +import 'package:cake_wallet/themes/extensions/pin_code_theme.dart'; import 'package:cake_wallet/utils/responsive_layout_util.dart'; import 'package:cake_wallet/utils/show_bar.dart'; import 'package:another_flushbar/flushbar.dart'; @@ -163,10 +164,7 @@ class PinCodeState extends State { .primaryTextTheme! .titleLarge! .color! - : Theme.of(context) - .accentTextTheme! - .bodyMedium! - .color! + : Theme.of(context).extension()!.indicatorsColor .withOpacity(0.25), )); }), @@ -185,10 +183,7 @@ class PinCodeState extends State { style: TextStyle( fontSize: 14.0, fontWeight: FontWeight.normal, - color: Theme.of(context) - .accentTextTheme! - .bodyMedium! - .decorationColor!), + color: Theme.of(context).extension()!.switchColor), ), ) ], diff --git a/lib/src/screens/seed/wallet_seed_page.dart b/lib/src/screens/seed/wallet_seed_page.dart index 110923d1f..3ae31ff09 100644 --- a/lib/src/screens/seed/wallet_seed_page.dart +++ b/lib/src/screens/seed/wallet_seed_page.dart @@ -1,4 +1,5 @@ import 'package:cake_wallet/palette.dart'; +import 'package:cake_wallet/themes/extensions/pin_code_theme.dart'; import 'package:cake_wallet/themes/theme_base.dart'; import 'package:cake_wallet/src/widgets/alert_with_two_actions.dart'; import 'package:cake_wallet/utils/share_util.dart'; @@ -185,10 +186,7 @@ class WalletSeedPage extends BasePage { S.of(context).copied_to_clipboard); }, text: S.of(context).copy, - color: Theme.of(context) - .accentTextTheme! - .bodyMedium! - .color!, + color: Theme.of(context).extension()!.indicatorsColor, textColor: Colors.white)), )) ], diff --git a/lib/themes/bright_theme.dart b/lib/themes/bright_theme.dart index 905e267e4..35d72b6cb 100644 --- a/lib/themes/bright_theme.dart +++ b/lib/themes/bright_theme.dart @@ -235,9 +235,5 @@ class BrightTheme extends LightTheme { backgroundColor: Colors.black, // icon color on support page (moonpay, github) decorationColor: Colors.white.withOpacity(0.4) // hint text (exchange page) ), - // body -> bodyMedium - bodyMedium: TextStyle( - color: Palette.darkGray, // indicators (PIN code) - decorationColor: Palette.darkGray, // switch (PIN code) - ))); + )); } diff --git a/lib/themes/dark_theme.dart b/lib/themes/dark_theme.dart index 12de5bae5..18f1094ff 100644 --- a/lib/themes/dark_theme.dart +++ b/lib/themes/dark_theme.dart @@ -1,5 +1,6 @@ import 'package:cake_wallet/themes/extensions/cake_scrollbar_theme.dart'; import 'package:cake_wallet/themes/extensions/keyboard_theme.dart'; +import 'package:cake_wallet/themes/extensions/pin_code_theme.dart'; import 'package:cake_wallet/themes/extensions/sync_indicator_theme.dart'; import 'package:cake_wallet/themes/theme_base.dart'; import 'package:cake_wallet/generated/i18n.dart'; @@ -41,6 +42,11 @@ class DarkTheme extends ThemeBase { KeyboardTheme get keyboardTheme => KeyboardTheme(keyboardBarColor: PaletteDark.granite); + @override + PinCodeTheme get pinCodeTheme => PinCodeTheme( + indicatorsColor: PaletteDark.indicatorVioletBlue, + switchColor: PaletteDark.lightPurpleBlue); + @override ThemeData get themeData => super.themeData.copyWith( indicatorColor: PaletteDark.cyanBlue, // page indicator @@ -254,11 +260,6 @@ class DarkTheme extends ThemeBase { decorationColor: PaletteDark.lightBlueGrey // hint text (exchange page) ), - // body1 -> bodyMedium - bodyMedium: TextStyle( - color: PaletteDark.indicatorVioletBlue, // indicators (PIN code) - decorationColor: PaletteDark.lightPurpleBlue, // switch (PIN code) - ), ), ); } diff --git a/lib/themes/light_theme.dart b/lib/themes/light_theme.dart index 5636b64df..806190a41 100644 --- a/lib/themes/light_theme.dart +++ b/lib/themes/light_theme.dart @@ -1,5 +1,6 @@ import 'package:cake_wallet/themes/extensions/cake_scrollbar_theme.dart'; import 'package:cake_wallet/themes/extensions/keyboard_theme.dart'; +import 'package:cake_wallet/themes/extensions/pin_code_theme.dart'; import 'package:cake_wallet/themes/extensions/sync_indicator_theme.dart'; import 'package:cake_wallet/themes/theme_base.dart'; import 'package:cake_wallet/generated/i18n.dart'; @@ -42,6 +43,11 @@ class LightTheme extends ThemeBase { KeyboardTheme get keyboardTheme => KeyboardTheme(keyboardBarColor: Palette.dullGray); + @override + PinCodeTheme get pinCodeTheme => PinCodeTheme( + indicatorsColor: Palette.darkGray, + switchColor: Palette.darkGray); + @override ThemeData get themeData => super.themeData.copyWith( indicatorColor: @@ -250,11 +256,6 @@ class LightTheme extends ThemeBase { decorationColor: Colors.white.withOpacity(0.4) // hint text (exchange page) ), - // body -> bodyMedium - bodyMedium: TextStyle( - color: Palette.darkGray, // indicators (PIN code) - decorationColor: Palette.darkGray, // switch (PIN code) - ), ), ); } diff --git a/lib/themes/theme_base.dart b/lib/themes/theme_base.dart index 9d09e7f3d..78cb2bfd8 100644 --- a/lib/themes/theme_base.dart +++ b/lib/themes/theme_base.dart @@ -1,6 +1,7 @@ import 'package:cake_wallet/themes/extensions/cake_scrollbar_theme.dart'; import 'package:cake_wallet/themes/extensions/dashboard_gradient_theme.dart'; import 'package:cake_wallet/themes/extensions/keyboard_theme.dart'; +import 'package:cake_wallet/themes/extensions/pin_code_theme.dart'; import 'package:cake_wallet/themes/extensions/sync_indicator_theme.dart'; import 'package:flutter/material.dart'; @@ -45,6 +46,8 @@ abstract class ThemeBase { KeyboardTheme get keyboardTheme; + PinCodeTheme get pinCodeTheme; + ThemeData get themeData => generatedThemeData.copyWith( primaryColor: primaryColor, cardColor: containerColor, @@ -54,6 +57,7 @@ abstract class ThemeBase { scrollbarTheme, syncIndicatorStyle, keyboardTheme, + pinCodeTheme, ], scrollbarTheme: ScrollbarThemeData( thumbColor: MaterialStateProperty.all(scrollbarTheme.thumbColor),