BondFormState<Success, Failure extends Error> constructor
BondFormState<Success, Failure extends Error> ({
- required Map<
String, FormFieldState> fields, - BondFormStateStatus status = BondFormStateStatus.pristine,
- Success? success,
- 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;