Files
2026-05-11 17:12:05 +02:00

32 lines
956 B
Dart

import 'package:hl_lieferservice/model/car.dart';
abstract class CarSelectEvent {}
/// Fired at app startup to check if a car has already been selected for today
/// for the given user.
class CarSelectLoad extends CarSelectEvent {
final String userId;
CarSelectLoad({required this.userId});
}
/// Fired when the driver confirms their car choice for the day.
class CarSelectConfirm extends CarSelectEvent {
final String userId;
final Car car;
CarSelectConfirm({required this.userId, required this.car});
}
/// Fired when the driver wants to switch to a different car.
/// Resets the selection so the enforcer shows the picker again.
class CarSelectChange extends CarSelectEvent {}
/// Fired when the driver cancels the change and wants to keep the previous car.
/// Restores [CarSelectComplete] without writing to SharedPreferences.
class CarSelectCancel extends CarSelectEvent {
final Car car;
CarSelectCancel({required this.car});
}