copyWith method

FormTheme copyWith({
  1. FormTheme? theme,
  2. Widget layoutBuilder({
    1. Widget? description,
    2. Widget? errors,
    3. bool? expanded,
    4. Widget field,
    5. Widget? icon,
    6. Widget layout,
    7. FormTheme theme,
    8. Widget? title,
    })?,
  3. FormFieldBuilder? fieldBuilder,
  4. FormFieldBuilder? nonTextFieldBuilder,
  5. FieldColorScheme? colorScheme,
  6. FieldColorScheme? errorColorScheme,
  7. FieldColorScheme? activeColorScheme,
  8. FieldColorScheme? disabledColorScheme,
  9. FieldColorScheme? selectedColorScheme,
  10. InputDecoration? inputDecoration,
  11. TextStyle? titleStyle,
  12. TextStyle? descriptionStyle,
  13. TextStyle? hintTextStyle,
  14. 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,
  );
}