copyWith method

FormCubitState copyWith({
  1. bool? isInitial,
  2. bool? isErrorShown,
  3. bool? isFormValid,
  4. bool? isSubmitting,
  5. bool? isSubmitted,
})

Implementation

FormCubitState copyWith({
  bool? isInitial,
  bool? isErrorShown,
  bool? isFormValid,
  bool? isSubmitting,
  bool? isSubmitted,
}) {
  assert(isSubmitting != true || this.isFormDataValid);
  return FormCubitState(
    isInitial: isInitial ?? this.isInitial,
    isErrorShown: isErrorShown ?? this.isErrorShown,
    isFormDataValid: isFormValid ?? this.isFormDataValid,
    isSubmitting: isSubmitting ?? this.isSubmitting,
    isSubmitted: isSubmitted ?? this.isSubmitted,
  );
}