updateError method

  1. @override
AsyncDropDownFieldState<T> updateError(
  1. String? error
)
override

Updates the error field for the FormFieldState.

This method is used to explicitly set or clear the error message associated with the form field. It accepts a nullable string, allowing you to either set an error message or clear any existing message.

error The new error message string. Pass null to clear any existing error.

Returns a new FormFieldState object with an updated error field.

Implementation

@override
AsyncDropDownFieldState<T> updateError(String? error) {
  return AsyncDropDownFieldState<T>(
    value,
    items: items,
    label: label,
    rules: rules,
    error: error,
  );
}