18 lines
534 B
Dart
18 lines
534 B
Dart
part of 'customer_loader_bloc.dart';
|
|
|
|
@freezed
|
|
class CustomerLoaderState with _$CustomerLoaderState {
|
|
const factory CustomerLoaderState({
|
|
required List<Customer> customers,
|
|
required Option<CustomerFailure> failureOptionCustomer,
|
|
String? categoryId,
|
|
String? search,
|
|
@Default(false) bool isFetching,
|
|
@Default(false) bool hasReachedMax,
|
|
@Default(1) int page,
|
|
}) = _CustomerLoaderState;
|
|
|
|
factory CustomerLoaderState.initial() =>
|
|
CustomerLoaderState(customers: [], failureOptionCustomer: none());
|
|
}
|