copyWith method

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

Creates a copy of this BondFormState with optional parameter overrides.

Implementation

BondFormState<Success, Failure> copyWith({
  Map<String, FormFieldState>? fields,
  BondFormStateStatus? status,
  Success? success,
  Failure? failure,
}) {
  return BondFormState<Success, Failure>(
    fields: fields ?? this.fields,
    status: status ?? this.status,
    success: success ?? this._success,
    failure: failure ?? this._failure,
  );
}