copyWith method

FieldCubitState<T> copyWith({
  1. T? value,
  2. String? error,
  3. bool? isErrorShown,
})

Implementation

FieldCubitState<T> copyWith({
  T? value,
  String? error,
  bool? isErrorShown,
}) {
  return FieldCubitState(
    error: error,
    value: value ?? this.value,
    isErrorShown: isErrorShown ?? this.isErrorShown,
    initialValue: initialValue,
  );
}