mirror of
https://github.com/cypherstack/stack_wallet.git
synced 2024-11-17 01:37:54 +00:00
textRestore added for color fix
This commit is contained in:
parent
a90f7fe994
commit
9f5ce0db7a
7 changed files with 33 additions and 7 deletions
|
@ -373,17 +373,22 @@ class _RestoreWalletViewState extends ConsumerState<RestoreWalletView> {
|
||||||
FormInputStatus status, String prefix) {
|
FormInputStatus status, String prefix) {
|
||||||
Color color;
|
Color color;
|
||||||
Color prefixColor;
|
Color prefixColor;
|
||||||
|
Color borderColor;
|
||||||
Widget? suffixIcon;
|
Widget? suffixIcon;
|
||||||
switch (status) {
|
switch (status) {
|
||||||
case FormInputStatus.empty:
|
case FormInputStatus.empty:
|
||||||
color = Theme.of(context).extension<StackColors>()!.textFieldDefaultBG;
|
color = Theme.of(context).extension<StackColors>()!.textFieldDefaultBG;
|
||||||
prefixColor = Theme.of(context).extension<StackColors>()!.textSubtitle2;
|
prefixColor = Theme.of(context).extension<StackColors>()!.textSubtitle2;
|
||||||
|
borderColor =
|
||||||
|
Theme.of(context).extension<StackColors>()!.textFieldDefaultBG;
|
||||||
break;
|
break;
|
||||||
case FormInputStatus.invalid:
|
case FormInputStatus.invalid:
|
||||||
color = Theme.of(context).extension<StackColors>()!.textFieldErrorBG;
|
color = Theme.of(context).extension<StackColors>()!.textFieldErrorBG;
|
||||||
prefixColor = Theme.of(context)
|
prefixColor = Theme.of(context)
|
||||||
.extension<StackColors>()!
|
.extension<StackColors>()!
|
||||||
.textFieldErrorSearchIconLeft;
|
.textFieldErrorSearchIconLeft;
|
||||||
|
borderColor =
|
||||||
|
Theme.of(context).extension<StackColors>()!.textFieldErrorBorder;
|
||||||
suffixIcon = SvgPicture.asset(
|
suffixIcon = SvgPicture.asset(
|
||||||
Assets.svg.alertCircle,
|
Assets.svg.alertCircle,
|
||||||
width: 16,
|
width: 16,
|
||||||
|
@ -398,6 +403,8 @@ class _RestoreWalletViewState extends ConsumerState<RestoreWalletView> {
|
||||||
prefixColor = Theme.of(context)
|
prefixColor = Theme.of(context)
|
||||||
.extension<StackColors>()!
|
.extension<StackColors>()!
|
||||||
.textFieldSuccessSearchIconLeft;
|
.textFieldSuccessSearchIconLeft;
|
||||||
|
borderColor =
|
||||||
|
Theme.of(context).extension<StackColors>()!.textFieldSuccessBorder;
|
||||||
suffixIcon = SvgPicture.asset(
|
suffixIcon = SvgPicture.asset(
|
||||||
Assets.svg.checkCircle,
|
Assets.svg.checkCircle,
|
||||||
width: 16,
|
width: 16,
|
||||||
|
@ -449,11 +456,11 @@ class _RestoreWalletViewState extends ConsumerState<RestoreWalletView> {
|
||||||
child: suffixIcon,
|
child: suffixIcon,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
enabledBorder: _buildOutlineInputBorder(color),
|
enabledBorder: _buildOutlineInputBorder(borderColor),
|
||||||
focusedBorder: _buildOutlineInputBorder(color),
|
focusedBorder: _buildOutlineInputBorder(borderColor),
|
||||||
errorBorder: _buildOutlineInputBorder(color),
|
errorBorder: _buildOutlineInputBorder(borderColor),
|
||||||
disabledBorder: _buildOutlineInputBorder(color),
|
disabledBorder: _buildOutlineInputBorder(borderColor),
|
||||||
focusedErrorBorder: _buildOutlineInputBorder(color),
|
focusedErrorBorder: _buildOutlineInputBorder(borderColor),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -786,7 +793,7 @@ class _RestoreWalletViewState extends ConsumerState<RestoreWalletView> {
|
||||||
.copyWith(
|
.copyWith(
|
||||||
color: Theme.of(context)
|
color: Theme.of(context)
|
||||||
.extension<StackColors>()!
|
.extension<StackColors>()!
|
||||||
.overlay,
|
.textRestore,
|
||||||
fontSize: isDesktop ? 16 : 14,
|
fontSize: isDesktop ? 16 : 14,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@ -993,7 +1000,7 @@ class _RestoreWalletViewState extends ConsumerState<RestoreWalletView> {
|
||||||
STextStyles.field(context).copyWith(
|
STextStyles.field(context).copyWith(
|
||||||
color: Theme.of(context)
|
color: Theme.of(context)
|
||||||
.extension<StackColors>()!
|
.extension<StackColors>()!
|
||||||
.overlay,
|
.textRestore,
|
||||||
fontSize: isDesktop ? 16 : 14,
|
fontSize: isDesktop ? 16 : 14,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
|
@ -68,6 +68,7 @@ abstract class StackColorTheme {
|
||||||
Color get textWhite;
|
Color get textWhite;
|
||||||
Color get textFavoriteCard;
|
Color get textFavoriteCard;
|
||||||
Color get textError;
|
Color get textError;
|
||||||
|
Color get textRestore;
|
||||||
|
|
||||||
// button background
|
// button background
|
||||||
Color get buttonBackPrimary;
|
Color get buttonBackPrimary;
|
||||||
|
|
|
@ -55,6 +55,8 @@ class DarkColors extends StackColorTheme {
|
||||||
Color get textFavoriteCard => const Color(0xFF232323);
|
Color get textFavoriteCard => const Color(0xFF232323);
|
||||||
@override
|
@override
|
||||||
Color get textError => const Color(0xFFF37475);
|
Color get textError => const Color(0xFFF37475);
|
||||||
|
@override
|
||||||
|
Color get textRestore => overlay;
|
||||||
|
|
||||||
// button background
|
// button background
|
||||||
@override
|
@override
|
||||||
|
|
|
@ -55,6 +55,8 @@ class LightColors extends StackColorTheme {
|
||||||
Color get textFavoriteCard => const Color(0xFF232323);
|
Color get textFavoriteCard => const Color(0xFF232323);
|
||||||
@override
|
@override
|
||||||
Color get textError => const Color(0xFF930006);
|
Color get textError => const Color(0xFF930006);
|
||||||
|
@override
|
||||||
|
Color get textRestore => overlay;
|
||||||
|
|
||||||
// button background
|
// button background
|
||||||
@override
|
@override
|
||||||
|
|
|
@ -62,6 +62,8 @@ class OceanBreezeColors extends StackColorTheme {
|
||||||
Color get textFavoriteCard => const Color(0xFF232323);
|
Color get textFavoriteCard => const Color(0xFF232323);
|
||||||
@override
|
@override
|
||||||
Color get textError => const Color(0xFF8D0006);
|
Color get textError => const Color(0xFF8D0006);
|
||||||
|
@override
|
||||||
|
Color get textRestore => overlay;
|
||||||
|
|
||||||
// button background
|
// button background
|
||||||
@override
|
@override
|
||||||
|
|
|
@ -56,6 +56,8 @@ class OledBlackColors extends StackColorTheme {
|
||||||
Color get textFavoriteCard => const Color(0xFF232323);
|
Color get textFavoriteCard => const Color(0xFF232323);
|
||||||
@override
|
@override
|
||||||
Color get textError => const Color(0xFFCF6679);
|
Color get textError => const Color(0xFFCF6679);
|
||||||
|
@override
|
||||||
|
Color get textRestore => textDark;
|
||||||
|
|
||||||
// button background
|
// button background
|
||||||
@override
|
@override
|
||||||
|
|
|
@ -32,6 +32,7 @@ class StackColors extends ThemeExtension<StackColors> {
|
||||||
final Color textWhite;
|
final Color textWhite;
|
||||||
final Color textFavoriteCard;
|
final Color textFavoriteCard;
|
||||||
final Color textError;
|
final Color textError;
|
||||||
|
final Color textRestore;
|
||||||
|
|
||||||
// button background
|
// button background
|
||||||
final Color buttonBackPrimary;
|
final Color buttonBackPrimary;
|
||||||
|
@ -200,6 +201,7 @@ class StackColors extends ThemeExtension<StackColors> {
|
||||||
required this.textWhite,
|
required this.textWhite,
|
||||||
required this.textFavoriteCard,
|
required this.textFavoriteCard,
|
||||||
required this.textError,
|
required this.textError,
|
||||||
|
required this.textRestore,
|
||||||
required this.buttonBackPrimary,
|
required this.buttonBackPrimary,
|
||||||
required this.buttonBackSecondary,
|
required this.buttonBackSecondary,
|
||||||
required this.buttonBackPrimaryDisabled,
|
required this.buttonBackPrimaryDisabled,
|
||||||
|
@ -338,6 +340,7 @@ class StackColors extends ThemeExtension<StackColors> {
|
||||||
textWhite: colorTheme.textWhite,
|
textWhite: colorTheme.textWhite,
|
||||||
textFavoriteCard: colorTheme.textFavoriteCard,
|
textFavoriteCard: colorTheme.textFavoriteCard,
|
||||||
textError: colorTheme.textError,
|
textError: colorTheme.textError,
|
||||||
|
textRestore: colorTheme.textRestore,
|
||||||
buttonBackPrimary: colorTheme.buttonBackPrimary,
|
buttonBackPrimary: colorTheme.buttonBackPrimary,
|
||||||
buttonBackSecondary: colorTheme.buttonBackSecondary,
|
buttonBackSecondary: colorTheme.buttonBackSecondary,
|
||||||
buttonBackPrimaryDisabled: colorTheme.buttonBackPrimaryDisabled,
|
buttonBackPrimaryDisabled: colorTheme.buttonBackPrimaryDisabled,
|
||||||
|
@ -479,6 +482,7 @@ class StackColors extends ThemeExtension<StackColors> {
|
||||||
Color? textWhite,
|
Color? textWhite,
|
||||||
Color? textFavoriteCard,
|
Color? textFavoriteCard,
|
||||||
Color? textError,
|
Color? textError,
|
||||||
|
Color? textRestore,
|
||||||
Color? buttonBackPrimary,
|
Color? buttonBackPrimary,
|
||||||
Color? buttonBackSecondary,
|
Color? buttonBackSecondary,
|
||||||
Color? buttonBackPrimaryDisabled,
|
Color? buttonBackPrimaryDisabled,
|
||||||
|
@ -615,6 +619,7 @@ class StackColors extends ThemeExtension<StackColors> {
|
||||||
textWhite: textWhite ?? this.textWhite,
|
textWhite: textWhite ?? this.textWhite,
|
||||||
textFavoriteCard: textFavoriteCard ?? this.textFavoriteCard,
|
textFavoriteCard: textFavoriteCard ?? this.textFavoriteCard,
|
||||||
textError: textError ?? this.textError,
|
textError: textError ?? this.textError,
|
||||||
|
textRestore: textRestore ?? this.textRestore,
|
||||||
buttonBackPrimary: buttonBackPrimary ?? this.buttonBackPrimary,
|
buttonBackPrimary: buttonBackPrimary ?? this.buttonBackPrimary,
|
||||||
buttonBackSecondary: buttonBackSecondary ?? this.buttonBackSecondary,
|
buttonBackSecondary: buttonBackSecondary ?? this.buttonBackSecondary,
|
||||||
buttonBackPrimaryDisabled:
|
buttonBackPrimaryDisabled:
|
||||||
|
@ -888,6 +893,11 @@ class StackColors extends ThemeExtension<StackColors> {
|
||||||
other.textError,
|
other.textError,
|
||||||
t,
|
t,
|
||||||
)!,
|
)!,
|
||||||
|
textRestore: Color.lerp(
|
||||||
|
textRestore,
|
||||||
|
other.textRestore,
|
||||||
|
t,
|
||||||
|
)!,
|
||||||
buttonBackPrimary: Color.lerp(
|
buttonBackPrimary: Color.lerp(
|
||||||
buttonBackPrimary,
|
buttonBackPrimary,
|
||||||
other.buttonBackPrimary,
|
other.buttonBackPrimary,
|
||||||
|
|
Loading…
Reference in a new issue