Skip to content

Commit

Permalink
Update text_field_dialog theme fields
Browse files Browse the repository at this point in the history
  • Loading branch information
DDavidPrime committed Apr 5, 2024
1 parent cd39582 commit 8b3da6f
Show file tree
Hide file tree
Showing 5 changed files with 130 additions and 112 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -80,15 +80,15 @@ class TextFieldDialogTheme extends ThemeExtension<TextFieldDialogTheme>
required this.infoCircleIcon,
required this.loadingIcon,
required this.tickCircleSuccessIcon,
required this.textFieldDialog2,
required this.textFieldDialog4,
required this.textFieldDialog3,
required this.labeledBoxWidgetPadding1,
required this.labeledBoxWidgetPadding2,
required this.labeledBoxWidgetPadding3,
required this.inputTextFieldPadding1,
required this.inputTextFieldPadding2,
required this.inputTextFieldPadding3,
required this.textFieldDialogPadding,
required this.textFieldDialogButtonPadding,
required this.textFieldDialogHeaderPadding,
required this.labeledBoxWidgetContentPadding,
required this.labeledBoxWidgetIconPadding,
required this.labeledBoxWidgetOptionalTextPadding,
required this.inputTextFieldErrorPadding,
required this.inputTextFieldIconPadding,
required this.inputTextFieldIconDisabledPadding,
required this.inputTextFieldPaddingLoading,
required this.inputTextFieldPaddingSuccess,
required this.inputTextFieldPaddingWarning,
Expand Down Expand Up @@ -217,30 +217,30 @@ class TextFieldDialogTheme extends ThemeExtension<TextFieldDialogTheme>
loadingIcon = WidgetToolkitDesignSystem.dark().icons.loadingIcon,
tickCircleSuccessIcon =
WidgetToolkitDesignSystem.dark().icons.tickCircleSuccessIcon,
textFieldDialog2 = EdgeInsets.zero,
textFieldDialog4 = EdgeInsets.only(
textFieldDialogPadding = EdgeInsets.zero,
textFieldDialogButtonPadding = EdgeInsets.only(
top: WidgetToolkitDesignSystem.light().spacings.xl,
bottom: WidgetToolkitDesignSystem.light().spacings.xxxxs,
),
textFieldDialog3 = EdgeInsets.only(
textFieldDialogHeaderPadding = EdgeInsets.only(
left: WidgetToolkitDesignSystem.light().spacings.xs,
bottom: WidgetToolkitDesignSystem.light().spacings.m,
),
labeledBoxWidgetPadding1 = EdgeInsets.symmetric(
labeledBoxWidgetContentPadding = EdgeInsets.symmetric(
vertical: WidgetToolkitDesignSystem.light().spacings.m,
horizontal: WidgetToolkitDesignSystem.light().spacings.s,
),
labeledBoxWidgetPadding2 = EdgeInsets.only(
labeledBoxWidgetIconPadding = EdgeInsets.only(
right: WidgetToolkitDesignSystem.dark().spacings.xs),
labeledBoxWidgetPadding3 = EdgeInsets.only(
labeledBoxWidgetOptionalTextPadding = EdgeInsets.only(
right: WidgetToolkitDesignSystem.light().spacings.m),
inputTextFieldPadding1 = EdgeInsets.only(
inputTextFieldErrorPadding = EdgeInsets.only(
left: WidgetToolkitDesignSystem.light().spacings.m,
top: WidgetToolkitDesignSystem.light().spacings.xxxs,
),
inputTextFieldPadding2 = EdgeInsets.only(
inputTextFieldIconPadding = EdgeInsets.only(
right: WidgetToolkitDesignSystem.light().spacings.xs),
inputTextFieldPadding3 = EdgeInsets.only(
inputTextFieldIconDisabledPadding = EdgeInsets.only(
right: WidgetToolkitDesignSystem.light().spacings.xs),
inputTextFieldPaddingLoading = EdgeInsets.only(
right: WidgetToolkitDesignSystem.light().spacings.s),
Expand Down Expand Up @@ -370,30 +370,30 @@ class TextFieldDialogTheme extends ThemeExtension<TextFieldDialogTheme>
loadingIcon = WidgetToolkitDesignSystem.light().icons.loadingIcon,
tickCircleSuccessIcon =
WidgetToolkitDesignSystem.light().icons.tickCircleSuccessIcon,
textFieldDialog2 = EdgeInsets.zero,
textFieldDialog4 = EdgeInsets.only(
textFieldDialogPadding = EdgeInsets.zero,
textFieldDialogButtonPadding = EdgeInsets.only(
top: WidgetToolkitDesignSystem.light().spacings.xl,
bottom: WidgetToolkitDesignSystem.light().spacings.xxxxs,
),
textFieldDialog3 = EdgeInsets.only(
textFieldDialogHeaderPadding = EdgeInsets.only(
left: WidgetToolkitDesignSystem.dark().spacings.xs,
bottom: WidgetToolkitDesignSystem.dark().spacings.m,
),
labeledBoxWidgetPadding1 = EdgeInsets.symmetric(
labeledBoxWidgetContentPadding = EdgeInsets.symmetric(
vertical: WidgetToolkitDesignSystem.dark().spacings.m,
horizontal: WidgetToolkitDesignSystem.dark().spacings.s,
),
labeledBoxWidgetPadding2 = EdgeInsets.only(
labeledBoxWidgetIconPadding = EdgeInsets.only(
right: WidgetToolkitDesignSystem.dark().spacings.xs),
labeledBoxWidgetPadding3 =
labeledBoxWidgetOptionalTextPadding =
EdgeInsets.only(right: WidgetToolkitDesignSystem.dark().spacings.m),
inputTextFieldPadding1 = EdgeInsets.only(
inputTextFieldErrorPadding = EdgeInsets.only(
left: WidgetToolkitDesignSystem.dark().spacings.m,
top: WidgetToolkitDesignSystem.dark().spacings.xxxs,
),
inputTextFieldPadding2 = EdgeInsets.only(
inputTextFieldIconPadding = EdgeInsets.only(
right: WidgetToolkitDesignSystem.dark().spacings.xs),
inputTextFieldPadding3 = EdgeInsets.only(
inputTextFieldIconDisabledPadding = EdgeInsets.only(
right: WidgetToolkitDesignSystem.dark().spacings.xs),
inputTextFieldPaddingLoading =
EdgeInsets.only(right: WidgetToolkitDesignSystem.dark().spacings.s),
Expand Down Expand Up @@ -558,23 +558,23 @@ class TextFieldDialogTheme extends ThemeExtension<TextFieldDialogTheme>
final SvgFile tickCircleSuccessIcon;

@override
final EdgeInsets textFieldDialog2;
final EdgeInsets textFieldDialogPadding;
@override
final EdgeInsets textFieldDialog4;
final EdgeInsets textFieldDialogButtonPadding;
@override
final EdgeInsets textFieldDialog3;
final EdgeInsets textFieldDialogHeaderPadding;
@override
final EdgeInsets labeledBoxWidgetPadding1;
final EdgeInsets labeledBoxWidgetContentPadding;
@override
final EdgeInsets labeledBoxWidgetPadding2;
final EdgeInsets labeledBoxWidgetIconPadding;
@override
final EdgeInsets labeledBoxWidgetPadding3;
final EdgeInsets labeledBoxWidgetOptionalTextPadding;
@override
final EdgeInsets inputTextFieldPadding1;
final EdgeInsets inputTextFieldErrorPadding;
@override
final EdgeInsets inputTextFieldPadding2;
final EdgeInsets inputTextFieldIconPadding;
@override
final EdgeInsets inputTextFieldPadding3;
final EdgeInsets inputTextFieldIconDisabledPadding;
@override
final EdgeInsets inputTextFieldPaddingLoading;
@override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,15 +80,15 @@ mixin _$TextFieldDialogThemeTailorMixin
SvgFile get infoCircleIcon;
SvgFile get loadingIcon;
SvgFile get tickCircleSuccessIcon;
EdgeInsets get textFieldDialog2;
EdgeInsets get textFieldDialog4;
EdgeInsets get textFieldDialog3;
EdgeInsets get labeledBoxWidgetPadding1;
EdgeInsets get labeledBoxWidgetPadding2;
EdgeInsets get labeledBoxWidgetPadding3;
EdgeInsets get inputTextFieldPadding1;
EdgeInsets get inputTextFieldPadding2;
EdgeInsets get inputTextFieldPadding3;
EdgeInsets get textFieldDialogPadding;
EdgeInsets get textFieldDialogButtonPadding;
EdgeInsets get textFieldDialogHeaderPadding;
EdgeInsets get labeledBoxWidgetContentPadding;
EdgeInsets get labeledBoxWidgetIconPadding;
EdgeInsets get labeledBoxWidgetOptionalTextPadding;
EdgeInsets get inputTextFieldErrorPadding;
EdgeInsets get inputTextFieldIconPadding;
EdgeInsets get inputTextFieldIconDisabledPadding;
EdgeInsets get inputTextFieldPaddingLoading;
EdgeInsets get inputTextFieldPaddingSuccess;
EdgeInsets get inputTextFieldPaddingWarning;
Expand Down Expand Up @@ -166,15 +166,15 @@ mixin _$TextFieldDialogThemeTailorMixin
SvgFile? infoCircleIcon,
SvgFile? loadingIcon,
SvgFile? tickCircleSuccessIcon,
EdgeInsets? textFieldDialog2,
EdgeInsets? textFieldDialog4,
EdgeInsets? textFieldDialog3,
EdgeInsets? labeledBoxWidgetPadding1,
EdgeInsets? labeledBoxWidgetPadding2,
EdgeInsets? labeledBoxWidgetPadding3,
EdgeInsets? inputTextFieldPadding1,
EdgeInsets? inputTextFieldPadding2,
EdgeInsets? inputTextFieldPadding3,
EdgeInsets? textFieldDialogPadding,
EdgeInsets? textFieldDialogButtonPadding,
EdgeInsets? textFieldDialogHeaderPadding,
EdgeInsets? labeledBoxWidgetContentPadding,
EdgeInsets? labeledBoxWidgetIconPadding,
EdgeInsets? labeledBoxWidgetOptionalTextPadding,
EdgeInsets? inputTextFieldErrorPadding,
EdgeInsets? inputTextFieldIconPadding,
EdgeInsets? inputTextFieldIconDisabledPadding,
EdgeInsets? inputTextFieldPaddingLoading,
EdgeInsets? inputTextFieldPaddingSuccess,
EdgeInsets? inputTextFieldPaddingWarning,
Expand Down Expand Up @@ -302,21 +302,25 @@ mixin _$TextFieldDialogThemeTailorMixin
loadingIcon: loadingIcon ?? this.loadingIcon,
tickCircleSuccessIcon:
tickCircleSuccessIcon ?? this.tickCircleSuccessIcon,
textFieldDialog2: textFieldDialog2 ?? this.textFieldDialog2,
textFieldDialog4: textFieldDialog4 ?? this.textFieldDialog4,
textFieldDialog3: textFieldDialog3 ?? this.textFieldDialog3,
labeledBoxWidgetPadding1:
labeledBoxWidgetPadding1 ?? this.labeledBoxWidgetPadding1,
labeledBoxWidgetPadding2:
labeledBoxWidgetPadding2 ?? this.labeledBoxWidgetPadding2,
labeledBoxWidgetPadding3:
labeledBoxWidgetPadding3 ?? this.labeledBoxWidgetPadding3,
inputTextFieldPadding1:
inputTextFieldPadding1 ?? this.inputTextFieldPadding1,
inputTextFieldPadding2:
inputTextFieldPadding2 ?? this.inputTextFieldPadding2,
inputTextFieldPadding3:
inputTextFieldPadding3 ?? this.inputTextFieldPadding3,
textFieldDialogPadding:
textFieldDialogPadding ?? this.textFieldDialogPadding,
textFieldDialogButtonPadding:
textFieldDialogButtonPadding ?? this.textFieldDialogButtonPadding,
textFieldDialogHeaderPadding:
textFieldDialogHeaderPadding ?? this.textFieldDialogHeaderPadding,
labeledBoxWidgetContentPadding:
labeledBoxWidgetContentPadding ?? this.labeledBoxWidgetContentPadding,
labeledBoxWidgetIconPadding:
labeledBoxWidgetIconPadding ?? this.labeledBoxWidgetIconPadding,
labeledBoxWidgetOptionalTextPadding:
labeledBoxWidgetOptionalTextPadding ??
this.labeledBoxWidgetOptionalTextPadding,
inputTextFieldErrorPadding:
inputTextFieldErrorPadding ?? this.inputTextFieldErrorPadding,
inputTextFieldIconPadding:
inputTextFieldIconPadding ?? this.inputTextFieldIconPadding,
inputTextFieldIconDisabledPadding: inputTextFieldIconDisabledPadding ??
this.inputTextFieldIconDisabledPadding,
inputTextFieldPaddingLoading:
inputTextFieldPaddingLoading ?? this.inputTextFieldPaddingLoading,
inputTextFieldPaddingSuccess:
Expand Down Expand Up @@ -479,21 +483,31 @@ mixin _$TextFieldDialogThemeTailorMixin
loadingIcon: t < 0.5 ? loadingIcon : other.loadingIcon,
tickCircleSuccessIcon:
t < 0.5 ? tickCircleSuccessIcon : other.tickCircleSuccessIcon,
textFieldDialog2: t < 0.5 ? textFieldDialog2 : other.textFieldDialog2,
textFieldDialog4: t < 0.5 ? textFieldDialog4 : other.textFieldDialog4,
textFieldDialog3: t < 0.5 ? textFieldDialog3 : other.textFieldDialog3,
labeledBoxWidgetPadding1:
t < 0.5 ? labeledBoxWidgetPadding1 : other.labeledBoxWidgetPadding1,
labeledBoxWidgetPadding2:
t < 0.5 ? labeledBoxWidgetPadding2 : other.labeledBoxWidgetPadding2,
labeledBoxWidgetPadding3:
t < 0.5 ? labeledBoxWidgetPadding3 : other.labeledBoxWidgetPadding3,
inputTextFieldPadding1:
t < 0.5 ? inputTextFieldPadding1 : other.inputTextFieldPadding1,
inputTextFieldPadding2:
t < 0.5 ? inputTextFieldPadding2 : other.inputTextFieldPadding2,
inputTextFieldPadding3:
t < 0.5 ? inputTextFieldPadding3 : other.inputTextFieldPadding3,
textFieldDialogPadding:
t < 0.5 ? textFieldDialogPadding : other.textFieldDialogPadding,
textFieldDialogButtonPadding: t < 0.5
? textFieldDialogButtonPadding
: other.textFieldDialogButtonPadding,
textFieldDialogHeaderPadding: t < 0.5
? textFieldDialogHeaderPadding
: other.textFieldDialogHeaderPadding,
labeledBoxWidgetContentPadding: t < 0.5
? labeledBoxWidgetContentPadding
: other.labeledBoxWidgetContentPadding,
labeledBoxWidgetIconPadding: t < 0.5
? labeledBoxWidgetIconPadding
: other.labeledBoxWidgetIconPadding,
labeledBoxWidgetOptionalTextPadding: t < 0.5
? labeledBoxWidgetOptionalTextPadding
: other.labeledBoxWidgetOptionalTextPadding,
inputTextFieldErrorPadding: t < 0.5
? inputTextFieldErrorPadding
: other.inputTextFieldErrorPadding,
inputTextFieldIconPadding:
t < 0.5 ? inputTextFieldIconPadding : other.inputTextFieldIconPadding,
inputTextFieldIconDisabledPadding: t < 0.5
? inputTextFieldIconDisabledPadding
: other.inputTextFieldIconDisabledPadding,
inputTextFieldPaddingLoading: t < 0.5
? inputTextFieldPaddingLoading
: other.inputTextFieldPaddingLoading,
Expand Down Expand Up @@ -607,15 +621,15 @@ mixin _$TextFieldDialogThemeTailorMixin
const DeepCollectionEquality().equals(infoCircleIcon, other.infoCircleIcon) &&
const DeepCollectionEquality().equals(loadingIcon, other.loadingIcon) &&
const DeepCollectionEquality().equals(tickCircleSuccessIcon, other.tickCircleSuccessIcon) &&
const DeepCollectionEquality().equals(textFieldDialog2, other.textFieldDialog2) &&
const DeepCollectionEquality().equals(textFieldDialog4, other.textFieldDialog4) &&
const DeepCollectionEquality().equals(textFieldDialog3, other.textFieldDialog3) &&
const DeepCollectionEquality().equals(labeledBoxWidgetPadding1, other.labeledBoxWidgetPadding1) &&
const DeepCollectionEquality().equals(labeledBoxWidgetPadding2, other.labeledBoxWidgetPadding2) &&
const DeepCollectionEquality().equals(labeledBoxWidgetPadding3, other.labeledBoxWidgetPadding3) &&
const DeepCollectionEquality().equals(inputTextFieldPadding1, other.inputTextFieldPadding1) &&
const DeepCollectionEquality().equals(inputTextFieldPadding2, other.inputTextFieldPadding2) &&
const DeepCollectionEquality().equals(inputTextFieldPadding3, other.inputTextFieldPadding3) &&
const DeepCollectionEquality().equals(textFieldDialogPadding, other.textFieldDialogPadding) &&
const DeepCollectionEquality().equals(textFieldDialogButtonPadding, other.textFieldDialogButtonPadding) &&
const DeepCollectionEquality().equals(textFieldDialogHeaderPadding, other.textFieldDialogHeaderPadding) &&
const DeepCollectionEquality().equals(labeledBoxWidgetContentPadding, other.labeledBoxWidgetContentPadding) &&
const DeepCollectionEquality().equals(labeledBoxWidgetIconPadding, other.labeledBoxWidgetIconPadding) &&
const DeepCollectionEquality().equals(labeledBoxWidgetOptionalTextPadding, other.labeledBoxWidgetOptionalTextPadding) &&
const DeepCollectionEquality().equals(inputTextFieldErrorPadding, other.inputTextFieldErrorPadding) &&
const DeepCollectionEquality().equals(inputTextFieldIconPadding, other.inputTextFieldIconPadding) &&
const DeepCollectionEquality().equals(inputTextFieldIconDisabledPadding, other.inputTextFieldIconDisabledPadding) &&
const DeepCollectionEquality().equals(inputTextFieldPaddingLoading, other.inputTextFieldPaddingLoading) &&
const DeepCollectionEquality().equals(inputTextFieldPaddingSuccess, other.inputTextFieldPaddingSuccess) &&
const DeepCollectionEquality().equals(inputTextFieldPaddingWarning, other.inputTextFieldPaddingWarning) &&
Expand Down Expand Up @@ -698,15 +712,15 @@ mixin _$TextFieldDialogThemeTailorMixin
const DeepCollectionEquality().hash(infoCircleIcon),
const DeepCollectionEquality().hash(loadingIcon),
const DeepCollectionEquality().hash(tickCircleSuccessIcon),
const DeepCollectionEquality().hash(textFieldDialog2),
const DeepCollectionEquality().hash(textFieldDialog4),
const DeepCollectionEquality().hash(textFieldDialog3),
const DeepCollectionEquality().hash(labeledBoxWidgetPadding1),
const DeepCollectionEquality().hash(labeledBoxWidgetPadding2),
const DeepCollectionEquality().hash(labeledBoxWidgetPadding3),
const DeepCollectionEquality().hash(inputTextFieldPadding1),
const DeepCollectionEquality().hash(inputTextFieldPadding2),
const DeepCollectionEquality().hash(inputTextFieldPadding3),
const DeepCollectionEquality().hash(textFieldDialogPadding),
const DeepCollectionEquality().hash(textFieldDialogButtonPadding),
const DeepCollectionEquality().hash(textFieldDialogHeaderPadding),
const DeepCollectionEquality().hash(labeledBoxWidgetContentPadding),
const DeepCollectionEquality().hash(labeledBoxWidgetIconPadding),
const DeepCollectionEquality().hash(labeledBoxWidgetOptionalTextPadding),
const DeepCollectionEquality().hash(inputTextFieldErrorPadding),
const DeepCollectionEquality().hash(inputTextFieldIconPadding),
const DeepCollectionEquality().hash(inputTextFieldIconDisabledPadding),
const DeepCollectionEquality().hash(inputTextFieldPaddingLoading),
const DeepCollectionEquality().hash(inputTextFieldPaddingSuccess),
const DeepCollectionEquality().hash(inputTextFieldPaddingWarning),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,8 @@ class InputTextFieldState extends State<InputTextField> {
if (currentState == InputTextFieldStateModel.error &&
widget.errorMessage != null)
Padding(
padding: context.textFieldDialogTheme.inputTextFieldPadding1,
padding:
context.textFieldDialogTheme.inputTextFieldErrorPadding,
child: Text(
widget.errorMessage ?? '',
textAlign: TextAlign.start,
Expand Down Expand Up @@ -371,12 +372,13 @@ class _PrefixIconWidget extends StatelessWidget {
switch (state) {
case InputTextFieldStateModel.defaultField:
return Padding(
padding: context.textFieldDialogTheme.inputTextFieldPadding2,
padding: context.textFieldDialogTheme.inputTextFieldIconPadding,
child: context.textFieldDialogTheme.addIcon,
);
case InputTextFieldStateModel.defaultDisabled:
return Padding(
padding: context.textFieldDialogTheme.inputTextFieldPadding3,
padding:
context.textFieldDialogTheme.inputTextFieldIconDisabledPadding,
child: context.textFieldDialogTheme.addDisabledIcon,
);
default:
Expand Down
Loading

0 comments on commit 8b3da6f

Please sign in to comment.