Files
food_delivery_mobile/lib/feature/basket/presentation/blocs/basket_bloc.dart
jahongireshonqulov 7e9fbd2cf3 feat:Order item created
2025-10-24 20:43:05 +05:00

21 lines
540 B
Dart

import 'package:food_delivery_client/food_delivery_client.dart';
part 'basket_event.dart';
part 'basket_state.dart';
part 'basket_bloc.freezed.dart';
@injectable
class BasketBloc extends Bloc<BasketEvent, BasketState> {
BasketBloc() : super(const BasketState()) {
on<_Started>(_onStarted);
}
_onStarted(_Started event, Emitter<BasketState> emit) async {
emit(state.copyWith(status: RequestStatus.loading));
await Future.delayed(TimeDelayConst.duration3);
emit(state.copyWith(status: RequestStatus.loaded));
}
}