Added components to article
This commit is contained in:
@ -24,7 +24,7 @@ class CarSelectBloc extends Bloc<CarSelectEvent, CarSelectState> {
|
||||
try {
|
||||
emit(CarSelectLoading());
|
||||
|
||||
final CarSelection? stored = await repository.getSelection();
|
||||
final CarSelection? stored = await repository.getSelection(event.userId);
|
||||
final today = DateTime.now();
|
||||
|
||||
final bool validForToday =
|
||||
@ -72,6 +72,7 @@ class CarSelectBloc extends Bloc<CarSelectEvent, CarSelectState> {
|
||||
try {
|
||||
final today = DateTime.now();
|
||||
await repository.saveSelection(
|
||||
event.userId,
|
||||
CarSelection(
|
||||
date: today,
|
||||
selectedCarId: event.car.id,
|
||||
|
||||
Reference in New Issue
Block a user