Refactor customer management: migrate from Bloc to Cubit, update state handling, and implement customer search functionality

This commit is contained in:
2026-04-17 21:51:37 +02:00
parent a06be4bf7a
commit 762a7530d5
9 changed files with 435 additions and 170 deletions

View File

@@ -1,12 +1,11 @@
part of 'customer_bloc.dart';
part of 'customer_cubit.dart';
enum CustomerStatus { initial, loading, success, failure }
class CustomerState extends Equatable {
final CustomerStatus status;
final List<CustomerModel> customers; // Per la lista generale
final CustomerModel?
lastCreatedCustomer; // <--- Fondamentale per la Dialog "al volo"
final List<CustomerModel> customers;
final CustomerModel? lastCreatedCustomer;
final String? errorMessage;
const CustomerState({