failure property

Failure get failure

Retrieves the failure result of the form submission.

Throws a StateError if the form is not in the BondFormStateStatus.failed state.

Implementation

Failure get failure {
  if (failureResult == null || status != BondFormStateStatus.failed) {
    throw StateError('Accessing failure while form not in failure state');
  }
  return failureResult!;
}