textFieldError/SuccessBorder added

This commit is contained in:
ryleedavis 2023-01-10 13:48:40 -07:00
parent af698332e7
commit a90f7fe994
7 changed files with 41 additions and 28 deletions

View file

@ -1,28 +0,0 @@
<svg width="200" height="162" viewBox="0 0 200 162" fill="none" xmlns="http://www.w3.org/2000/svg">
<g clip-path="url(#clip0_489_21263)">
<rect width="200" height="162" rx="8" fill="url(#paint0_linear_489_21263)"/>
<rect x="10" y="10" width="180" height="20" rx="2" fill="#77A7F9"/>
<rect x="16" y="16" width="106" height="8" rx="1" fill="black"/>
<rect x="10" y="40" width="180" height="20" rx="2" fill="#212F46"/>
<rect x="16" y="46" width="106" height="8" rx="1" fill="black"/>
<rect x="10" y="62" width="180" height="20" rx="2" fill="#212F46"/>
<rect x="16" y="68" width="106" height="8" rx="1" fill="black"/>
<rect x="10" y="84" width="180" height="20" rx="2" fill="#212F46"/>
<rect x="16" y="90" width="106" height="8" rx="1" fill="black"/>
<rect x="10" y="106" width="180" height="20" rx="2" fill="#212F46"/>
<rect x="16" y="112" width="106" height="8" rx="1" fill="black"/>
<rect x="10" y="128" width="180" height="20" rx="2" fill="#212F46"/>
<rect x="16" y="134" width="106" height="8" rx="1" fill="black"/>
<rect x="10" y="150" width="180" height="20" rx="2" fill="#212F46"/>
<rect x="16" y="156" width="106" height="8" rx="1" fill="black"/>
</g>
<defs>
<linearGradient id="paint0_linear_489_21263" x1="100" y1="0" x2="100" y2="162" gradientUnits="userSpaceOnUse">
<stop offset="0.9999"/>
<stop offset="1" stop-color="#E8F2F9"/>
</linearGradient>
<clipPath id="clip0_489_21263">
<rect width="200" height="162" rx="8" fill="white"/>
</clipPath>
</defs>
</svg>

Before

Width:  |  Height:  |  Size: 1.4 KiB

View file

@ -7,6 +7,8 @@ import 'package:stackwallet/utilities/theme/oled_black_colors.dart';
enum ThemeType { light, dark, oceanBreeze, oledBlack }
// adjust this file
extension ThemeTypeExt on ThemeType {
StackColorTheme get colorTheme {
switch (this) {
@ -144,6 +146,8 @@ abstract class StackColorTheme {
Color get textFieldDefaultBG;
Color get textFieldErrorBG;
Color get textFieldSuccessBG;
Color get textFieldErrorBorder;
Color get textFieldSuccessBorder;
Color get textFieldActiveSearchIconLeft;
Color get textFieldDefaultSearchIconLeft;
Color get textFieldErrorSearchIconLeft;

View file

@ -194,6 +194,10 @@ class DarkColors extends StackColorTheme {
Color get textFieldErrorBG => const Color(0xFFFFB4A9);
@override
Color get textFieldSuccessBG => const Color(0xFF8EF5C3);
@override
Color get textFieldErrorBorder => textFieldErrorBG;
@override
Color get textFieldSuccessBorder => textFieldSuccessBG;
@override
Color get textFieldActiveSearchIconLeft => const Color(0xFFA9ACAC);

View file

@ -194,6 +194,10 @@ class LightColors extends StackColorTheme {
Color get textFieldErrorBG => const Color(0xFFFFDAD4);
@override
Color get textFieldSuccessBG => const Color(0xFFB9E9D4);
@override
Color get textFieldErrorBorder => textFieldErrorBG;
@override
Color get textFieldSuccessBorder => textFieldSuccessBG;
@override
Color get textFieldActiveSearchIconLeft => const Color(0xFFA9ACAC);

View file

@ -201,6 +201,10 @@ class OceanBreezeColors extends StackColorTheme {
Color get textFieldErrorBG => const Color(0xFFF6C7C3);
@override
Color get textFieldSuccessBG => const Color(0xFFADD6D2);
@override
Color get textFieldErrorBorder => textFieldErrorBG;
@override
Color get textFieldSuccessBorder => textFieldSuccessBG;
@override
Color get textFieldActiveSearchIconLeft => const Color(0xFF86898C);

View file

@ -196,6 +196,10 @@ class OledBlackColors extends StackColorTheme {
@override
Color get textFieldSuccessBG => const Color(0xFF141414);
//add border color vars here
@override
Color get textFieldErrorBorder => const Color(0xFFCF6679);
@override
Color get textFieldSuccessBorder => const Color(0xFF23CFA1);
@override
Color get textFieldActiveSearchIconLeft => const Color(0xFF9C9C9C);

View file

@ -110,6 +110,8 @@ class StackColors extends ThemeExtension<StackColors> {
final Color textFieldDefaultBG;
final Color textFieldErrorBG;
final Color textFieldSuccessBG;
final Color textFieldErrorBorder;
final Color textFieldSuccessBorder;
final Color textFieldActiveSearchIconLeft;
final Color textFieldDefaultSearchIconLeft;
final Color textFieldErrorSearchIconLeft;
@ -258,6 +260,8 @@ class StackColors extends ThemeExtension<StackColors> {
required this.textFieldDefaultBG,
required this.textFieldErrorBG,
required this.textFieldSuccessBG,
required this.textFieldErrorBorder,
required this.textFieldSuccessBorder,
required this.textFieldActiveSearchIconLeft,
required this.textFieldDefaultSearchIconLeft,
required this.textFieldErrorSearchIconLeft,
@ -394,6 +398,8 @@ class StackColors extends ThemeExtension<StackColors> {
textFieldDefaultBG: colorTheme.textFieldDefaultBG,
textFieldErrorBG: colorTheme.textFieldErrorBG,
textFieldSuccessBG: colorTheme.textFieldSuccessBG,
textFieldErrorBorder: colorTheme.textFieldErrorBorder,
textFieldSuccessBorder: colorTheme.textFieldSuccessBorder,
textFieldActiveSearchIconLeft: colorTheme.textFieldActiveSearchIconLeft,
textFieldDefaultSearchIconLeft: colorTheme.textFieldDefaultSearchIconLeft,
textFieldErrorSearchIconLeft: colorTheme.textFieldErrorSearchIconLeft,
@ -533,6 +539,8 @@ class StackColors extends ThemeExtension<StackColors> {
Color? textFieldDefaultBG,
Color? textFieldErrorBG,
Color? textFieldSuccessBG,
Color? textFieldErrorBorder,
Color? textFieldSuccessBorder,
Color? textFieldActiveSearchIconLeft,
Color? textFieldDefaultSearchIconLeft,
Color? textFieldErrorSearchIconLeft,
@ -679,6 +687,9 @@ class StackColors extends ThemeExtension<StackColors> {
textFieldDefaultBG: textFieldDefaultBG ?? this.textFieldDefaultBG,
textFieldErrorBG: textFieldErrorBG ?? this.textFieldErrorBG,
textFieldSuccessBG: textFieldSuccessBG ?? this.textFieldSuccessBG,
textFieldErrorBorder: textFieldErrorBorder ?? this.textFieldErrorBorder,
textFieldSuccessBorder:
textFieldSuccessBorder ?? this.textFieldSuccessBorder,
textFieldActiveSearchIconLeft:
textFieldActiveSearchIconLeft ?? this.textFieldActiveSearchIconLeft,
textFieldDefaultSearchIconLeft:
@ -1177,6 +1188,16 @@ class StackColors extends ThemeExtension<StackColors> {
other.textFieldSuccessBG,
t,
)!,
textFieldErrorBorder: Color.lerp(
textFieldErrorBorder,
other.textFieldErrorBorder,
t,
)!,
textFieldSuccessBorder: Color.lerp(
textFieldSuccessBorder,
other.textFieldSuccessBorder,
t,
)!,
textFieldActiveSearchIconLeft: Color.lerp(
textFieldActiveSearchIconLeft,
other.textFieldActiveSearchIconLeft,