This commit is contained in:
2026-05-18 19:20:38 +02:00
parent 1ee4a3bf45
commit ecb161bc07
9 changed files with 317 additions and 105 deletions

View File

@@ -0,0 +1,30 @@
part of 'customer_form_cubit.dart';
enum CustomerFormStatus { initial, loading, ready, saving, success, failure }
class CustomerFormState extends Equatable {
final CustomerFormStatus status;
final CustomerModel customer;
final String? errorMessage;
const CustomerFormState({
this.status = CustomerFormStatus.initial,
required this.customer,
this.errorMessage,
});
CustomerFormState copyWith({
CustomerFormStatus? status,
CustomerModel? customer,
String? errorMessage,
}) {
return CustomerFormState(
status: status ?? this.status,
customer: customer ?? this.customer,
errorMessage: errorMessage,
);
}
@override
List<Object?> get props => [status, customer, errorMessage];
}