clear method

void clear()

Clears the form state and resets it to its initial pristine state.

This method resets all form fields to their initial state, clears any success or failure information, and sets the form status to 'pristine'.

Implementation

void clear() {
  state = state.copyWith(
    fields: Map.from(fields()),
    status: BondFormStateStatus.pristine,
    success: null,
    failure: null,
  );
}