copyWith method
GTextFieldConfig
copyWith({
- String? name,
- TextEditingController? controller,
- String? initialValue,
- String? label,
- String? hint,
- TextInputType? keyboardType,
- TextInputAction? textInputAction,
- List<
TextInputFormatter> ? inputFormatters, - GFormValidator? validator,
- void onChanged()?,
- void onFieldSubmitted()?,
- void onSaved()?,
- IconData? prefixIcon,
- Widget? prefix,
- Widget? suffix,
- Widget? suffixIcon,
- FocusNode? focusNode,
- AutovalidateMode? autovalidateMode,
- bool? enabled,
- bool? readOnly,
- bool? obscureText,
- String? obscuringCharacter,
- bool? autocorrect,
- bool? enableSuggestions,
- int? minLines,
- int? maxLines,
- int? maxLength,
- TextCapitalization? textCapitalization,
- TextAlign? textAlign,
- TextStyle? style,
- Iterable<
String> ? autofillHints, - InputDecoration? decoration,
Implementation
GTextFieldConfig copyWith({
String? name,
TextEditingController? controller,
String? initialValue,
String? label,
String? hint,
TextInputType? keyboardType,
TextInputAction? textInputAction,
List<TextInputFormatter>? inputFormatters,
GFormValidator? validator,
void Function(String)? onChanged,
void Function(String)? onFieldSubmitted,
void Function(String?)? onSaved,
IconData? prefixIcon,
Widget? prefix,
Widget? suffix,
Widget? suffixIcon,
FocusNode? focusNode,
AutovalidateMode? autovalidateMode,
bool? enabled,
bool? readOnly,
bool? obscureText,
String? obscuringCharacter,
bool? autocorrect,
bool? enableSuggestions,
int? minLines,
int? maxLines,
int? maxLength,
TextCapitalization? textCapitalization,
TextAlign? textAlign,
TextStyle? style,
Iterable<String>? autofillHints,
InputDecoration? decoration,
}) {
return GTextFieldConfig(
name: name ?? this.name,
controller: controller ?? this.controller,
initialValue: initialValue ?? this.initialValue,
label: label ?? this.label,
hint: hint ?? this.hint,
keyboardType: keyboardType ?? this.keyboardType,
textInputAction: textInputAction ?? this.textInputAction,
inputFormatters: inputFormatters ?? this.inputFormatters,
validator: validator ?? this.validator,
onChanged: onChanged ?? this.onChanged,
onFieldSubmitted: onFieldSubmitted ?? this.onFieldSubmitted,
onSaved: onSaved ?? this.onSaved,
prefixIcon: prefixIcon ?? this.prefixIcon,
prefix: prefix ?? this.prefix,
suffix: suffix ?? this.suffix,
suffixIcon: suffixIcon ?? this.suffixIcon,
focusNode: focusNode ?? this.focusNode,
autovalidateMode: autovalidateMode ?? this.autovalidateMode,
enabled: enabled ?? this.enabled,
readOnly: readOnly ?? this.readOnly,
obscureText: obscureText ?? this.obscureText,
obscuringCharacter: obscuringCharacter ?? this.obscuringCharacter,
autocorrect: autocorrect ?? this.autocorrect,
enableSuggestions: enableSuggestions ?? this.enableSuggestions,
minLines: minLines ?? this.minLines,
maxLines: maxLines ?? this.maxLines,
maxLength: maxLength ?? this.maxLength,
textCapitalization: textCapitalization ?? this.textCapitalization,
textAlign: textAlign ?? this.textAlign,
style: style ?? this.style,
autofillHints: autofillHints ?? this.autofillHints,
decoration: decoration ?? this.decoration,
);
}