Added custom tour ordering
This commit is contained in:
@ -56,7 +56,7 @@ class _CarManagementPageState extends State<CarManagementPage> {
|
||||
return Scaffold(
|
||||
body: BlocConsumer<CarsBloc, CarsState>(
|
||||
listener: (context, state) {
|
||||
if (state is CarsLoaded) {
|
||||
if (state is CarsLoaded && context.read<TourBloc>().state is TourLoaded) {
|
||||
var tour = (context.read<TourBloc>().state as TourLoaded).tour.copyWith();
|
||||
tour.driver.cars = state.cars;
|
||||
context.read<TourBloc>().add(UpdateTour(tour: tour));
|
||||
|
||||
Reference in New Issue
Block a user