BondFormState<Success, Failure extends Error> constructor

BondFormState<Success, Failure extends Error>({
  1. required Map<String, FormFieldState> fields,
  2. BondFormStateStatus status = BondFormStateStatus.pristine,
  3. Success? success,
  4. Failure? failure,
})

Creates a BondFormState with the provided parameters.

  • fields: A map of field names to their corresponding field state objects.
  • status: The current status of the form (default is BondFormStateStatus.pristine).
  • success: The success result of the form submission.
  • failure: The failure result of the form submission.

Implementation

BondFormState({
  required this.fields,
  this.status = BondFormStateStatus.pristine,
  Success? success,
  Failure? failure,
})  : _success = success,
      _failure = failure;