reworked operation (#12)

Reviewed-on: #12
Co-authored-by: Mark M2 Macbook <marco@catelli.it>
Co-committed-by: Mark M2 Macbook <marco@catelli.it>
This commit is contained in:
2026-05-04 15:36:42 +02:00
committed by brontomark
parent 9f57207a39
commit 94ad524bae
110 changed files with 5831 additions and 5306 deletions

View File

@@ -0,0 +1,46 @@
part of 'customers_cubit.dart';
enum CustomersStatus {
initial,
loading,
filesLoading,
filesUploading,
success,
failure,
}
class CustomersState extends Equatable {
final CustomersStatus status;
final List<CustomerModel> customers;
final CustomerModel? lastCreatedCustomer;
final String? errorMessage;
const CustomersState({
this.status = CustomersStatus.initial,
this.customers = const [],
this.lastCreatedCustomer,
this.errorMessage,
});
CustomersState copyWith({
CustomersStatus? status,
List<CustomerModel>? customers,
CustomerModel? lastCreatedCustomer,
String? errorMessage,
}) {
return CustomersState(
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,
];
}