copyWithNullable method

  1. @override
AsyncHiddenFieldState<T> copyWithNullable({
  1. T? value,
})
override

A null-tolerant version of copyWith, allowing you to explicitly set fields to null.

This is useful for form reset behaviors like clearing a field's value or removing its error.

Implementation

@override
AsyncHiddenFieldState<T> copyWithNullable({
  T? value,
}) {
  return AsyncHiddenFieldState<T>(
    value as T,
    pendingValue: pendingValue,
    error: error,
  );
}