copyWith method
Implementation
JarFieldState<T> copyWith({
Object? value = const Undefined(),
String? error,
bool? isDirty,
bool? isTouched,
bool? isValidating,
bool? isDisabled,
}) {
return JarFieldState<T>(
value: value is Undefined ? this.value : (value as T?),
error: error,
isDirty: isDirty ?? this.isDirty,
isTouched: isTouched ?? this.isTouched,
isValidating: isValidating ?? this.isValidating,
isDisabled: isDisabled ?? this.isDisabled,
name: name,
onChange: onChange,
markAsTouched: markAsTouched,
);
}