updateError method

  1. @override
RadioGroupFieldState<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
RadioGroupFieldState<T> updateError(String? error) {
  return RadioGroupFieldState<T>(
    radioButtons,
    value: value,
    error: error,
    label: label,
    rules: rules,
  );
}