refactor(ui_kit): update textinput component using borderColors as Color
This commit is contained in:
@@ -273,15 +273,10 @@ class TextInputScreen extends CubitScreen<TextInputCubit, TextInputState> {
|
||||
? style.backgroundColors?.color
|
||||
: null,
|
||||
borderRadius: style.radius ?? BorderRadius.circular(4),
|
||||
border: (style.borderColors?.isGradient ?? false) ||
|
||||
(style.borderColors?.isColor ?? false)
|
||||
border: (style.borderColors != null)
|
||||
? Border.all(
|
||||
width: 1.5,
|
||||
color: (style.borderColors?.isGradient ?? false)
|
||||
? style.borderColors!.colors.first
|
||||
: (style.borderColors?.isColor ?? false)
|
||||
? style.borderColors!.color
|
||||
: Colors.transparent,
|
||||
color: style.borderColors!,
|
||||
)
|
||||
: null,
|
||||
),
|
||||
|
||||
@@ -49,8 +49,7 @@ class TextInputThemeResolver extends ThemeResolver<TextInputStyle,
|
||||
Color? prefixIconColor = Theme.of(context).unselectedWidgetColor;
|
||||
Color? suffixIconColor = Theme.of(context).unselectedWidgetColor;
|
||||
|
||||
MultiColor? borderColors =
|
||||
MultiColor.single(Theme.of(context).unselectedWidgetColor);
|
||||
Color? borderColors = Theme.of(context).unselectedWidgetColor;
|
||||
|
||||
MultiColor? backgroundColors;
|
||||
BoxShadow? boxShadow;
|
||||
@@ -68,7 +67,7 @@ class TextInputThemeResolver extends ThemeResolver<TextInputStyle,
|
||||
suffixStyle?.copyWith(color: Theme.of(context).disabledColor);
|
||||
inputStyle =
|
||||
inputStyle?.copyWith(color: Theme.of(context).disabledColor);
|
||||
borderColors = MultiColor.single(Theme.of(context).disabledColor);
|
||||
borderColors = Theme.of(context).disabledColor;
|
||||
prefixIconColor = Theme.of(context).disabledColor;
|
||||
suffixIconColor = Theme.of(context).disabledColor;
|
||||
|
||||
@@ -78,7 +77,7 @@ class TextInputThemeResolver extends ThemeResolver<TextInputStyle,
|
||||
prefixIconColor = context.colorScheme.primary;
|
||||
suffixIconColor = context.colorScheme.primary;
|
||||
iconColor = context.colorScheme.primary;
|
||||
borderColors = MultiColor.single(context.colorScheme.primary);
|
||||
borderColors = context.colorScheme.primary;
|
||||
labelStyle = labelStyle?.copyWith(color: context.colorScheme.primary);
|
||||
break;
|
||||
case ControlState.hovered:
|
||||
@@ -95,7 +94,7 @@ class TextInputThemeResolver extends ThemeResolver<TextInputStyle,
|
||||
case StatusState.error:
|
||||
labelStyle = context.textTheme.labelLarge
|
||||
?.copyWith(color: context.colorScheme.error);
|
||||
borderColors = MultiColor.single(context.colorScheme.error);
|
||||
borderColors = context.colorScheme.error;
|
||||
break;
|
||||
case StatusState.initial:
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user