1import 'package:bloc/bloc.dart';
2import 'package:equatable/equatable.dart';
4import '../../../../../core/error/failures.dart';
5import '../../../../../core/services/service_locator.dart';
6import '../../../domain/entities/req/req_create_driver_collection_entity.dart';
7import '../../../domain/entities/res/res_collection_to_schedule_entity.dart';
8import '../../../domain/usecases/create_driver_collection_usecase.dart';
9import '../../../domain/usecases/get_collections_to_schedule_usecase.dart';
11part
'collections_to_schedule_event.dart';
12part
'collections_to_schedule_state.dart';
15 extends Bloc<CollectionsToScheduleEvent, CollectionsToScheduleState> {
26 Emitter<CollectionsToScheduleState> emit,
28 emit(CollectionsToScheduleLoading());
36 add(GetCollectionsToScheduleEvent(
46 GetCollectionsToScheduleEvent event,
47 Emitter<CollectionsToScheduleState> emit,
49 if (state is! CollectionsToScheduleLoading) {
50 emit(CollectionsToScheduleLoading());
sealed class AuthenticationState extends Equatable failure
Future< void > _onGetCollectionsToSchedule(GetCollectionsToScheduleEvent event, Emitter< CollectionsToScheduleState > emit,) async
final CreateDriverCollectionUseCase createDriverCollectionUseCase
CollectionsToScheduleBloc()
Future< void > _onCreateDriverCollection(CreateDriverCollectionEvent event, Emitter< CollectionsToScheduleState > emit,) async
final GetCollectionsToScheduleUseCase getCollectionsToScheduleUseCase
sealed class CollectionsState extends Equatable collections
const CreateDriverCollectionEvent({ required this.request, required this.startDate, required this.endDate, required this.driverId, })
const CollectionsToScheduleLoaded({required this.collections})