copyWith method
FormTheme
copyWith({
- FormTheme? theme,
- Widget layoutBuilder({})?,
- FormFieldBuilder? fieldBuilder,
- FormFieldBuilder? nonTextFieldBuilder,
- FieldColorScheme? colorScheme,
- FieldColorScheme? errorColorScheme,
- FieldColorScheme? activeColorScheme,
- FieldColorScheme? disabledColorScheme,
- FieldColorScheme? selectedColorScheme,
- InputDecoration? inputDecoration,
- TextStyle? titleStyle,
- TextStyle? descriptionStyle,
- TextStyle? hintTextStyle,
- TextStyle? chipTextStyle,
Implementation
FormTheme copyWith({
FormTheme? theme,
Widget Function({
Widget? title,
Widget? description,
Widget? errors,
Widget? icon,
bool? expanded,
FormTheme theme,
Widget layout,
Widget field,
})? layoutBuilder,
FormFieldBuilder? fieldBuilder,
FormFieldBuilder? nonTextFieldBuilder,
FieldColorScheme? colorScheme,
FieldColorScheme? errorColorScheme,
FieldColorScheme? activeColorScheme,
FieldColorScheme? disabledColorScheme,
FieldColorScheme? selectedColorScheme,
InputDecoration? inputDecoration,
TextStyle? titleStyle,
TextStyle? descriptionStyle,
TextStyle? hintTextStyle,
TextStyle? chipTextStyle,
}) {
final source = theme ?? this;
return FormTheme(
layoutBuilder:
layoutBuilder ?? source.layoutBuilder ?? this.layoutBuilder,
fieldBuilder: fieldBuilder ?? source.fieldBuilder ?? this.fieldBuilder,
nonTextFieldBuilder: nonTextFieldBuilder ??
source.nonTextFieldBuilder ??
this.nonTextFieldBuilder,
colorScheme: colorScheme ?? source.colorScheme ?? this.colorScheme,
errorColorScheme:
errorColorScheme ?? source.errorColorScheme ?? this.errorColorScheme,
activeColorScheme: activeColorScheme ??
source.activeColorScheme ??
this.activeColorScheme,
disabledColorScheme: disabledColorScheme ??
source.disabledColorScheme ??
this.disabledColorScheme,
selectedColorScheme: selectedColorScheme ??
source.selectedColorScheme ??
this.selectedColorScheme,
inputDecoration:
inputDecoration ?? source.inputDecoration ?? this.inputDecoration,
titleStyle: titleStyle ?? source.titleStyle ?? this.titleStyle,
descriptionStyle:
descriptionStyle ?? source.descriptionStyle ?? this.descriptionStyle,
hintTextStyle:
hintTextStyle ?? source.hintTextStyle ?? this.hintTextStyle,
chipTextStyle:
chipTextStyle ?? source.chipTextStyle ?? this.chipTextStyle,
);
}