rifatta operation form e diverse migliorie generali

This commit is contained in:
2026-05-19 10:32:01 +02:00
parent ecb161bc07
commit 00d5890a37
17 changed files with 484 additions and 494 deletions

View File

@@ -0,0 +1,46 @@
part of 'customers_list_cubit.dart';
enum CustomersListStatus {
initial,
loading,
filesLoading,
filesUploading,
success,
failure,
}
class CustomersListState extends Equatable {
final CustomersListStatus status;
final List<CustomerModel> customers;
final CustomerModel? lastCreatedCustomer;
final String? errorMessage;
const CustomersListState({
this.status = CustomersListStatus.initial,
this.customers = const [],
this.lastCreatedCustomer,
this.errorMessage,
});
CustomersListState copyWith({
CustomersListStatus? status,
List<CustomerModel>? customers,
CustomerModel? lastCreatedCustomer,
String? errorMessage,
}) {
return CustomersListState(
status: status ?? this.status,
customers: customers ?? this.customers,
lastCreatedCustomer: lastCreatedCustomer ?? this.lastCreatedCustomer,
errorMessage: errorMessage ?? this.errorMessage,
);
}
@override
List<Object?> get props => [
status,
customers,
lastCreatedCustomer,
errorMessage,
];
}