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