copyWith method
FieldInfo
copyWith({
- TextEditingController? controller,
- String? initialValue,
- bool? required,
- String? requiredString,
- IconData? prefixIcon,
- String? label,
- String? hint,
- String? innerLabel,
- TextInputType? inputType,
- bool? multiLine,
- bool? isObscure,
- VoidCallback? onTap,
- void onTapOutside(
- PointerDownEvent pointerDownEvent
- bool? readOnly,
- IconData? suffixIcon,
- int? minLines,
- int? maxLines,
- FormFieldValidator<
String> ? validator, - List<
TextInputFormatter> ? inputFormatters, - void onChanged(
- String input
This method creates a new instance with the specified attributes as the only difference between the previous instance and the new one
Implementation
FieldInfo copyWith({
TextEditingController? controller,
String? initialValue,
bool? required,
String? requiredString,
IconData? prefixIcon,
String? label,
String? hint,
String? innerLabel,
TextInputType? inputType,
bool? multiLine,
bool? isObscure,
VoidCallback? onTap,
void Function(PointerDownEvent pointerDownEvent)? onTapOutside,
bool? readOnly,
IconData? suffixIcon,
int? minLines,
int? maxLines,
FormFieldValidator<String>? validator,
List<TextInputFormatter>? inputFormatters,
void Function(String input)? onChanged,
}) =>
FieldInfo(
controller: controller ?? this.controller,
required: required ?? this.required,
requiredString: requiredString ?? this.requiredString,
prefixIcon: prefixIcon ?? this.prefixIcon,
label: label ?? this.label,
innerLabel: innerLabel ?? this.innerLabel,
hint: hint ?? this.hint,
inputType: inputType ?? this.inputType,
multiLine: multiLine ?? this.multiLine,
onTap: onTap ?? this.onTap,
onTapOutside: onTapOutside ?? this.onTapOutside,
isObscure: isObscure ?? this.isObscure,
readOnly: readOnly ?? this.readOnly,
suffixIcon: suffixIcon ?? this.suffixIcon,
minLines: minLines ?? this.minLines,
maxLines: maxLines ?? this.maxLines,
onChanged: onChanged ?? this.onChanged,
validator: validator ?? this.validator,
inputFormatters: inputFormatters ?? this.inputFormatters,
initialValue: initialValue,
);