Removed unused imports and moved tour bloc to delivery to be shared by overview and detailed view

This commit is contained in:
Dennis Nemec
2026-01-09 12:24:31 +01:00
parent ecf8745762
commit 1d6c62a392
43 changed files with 53 additions and 75 deletions

View File

@ -0,0 +1,56 @@
import 'package:hl_lieferservice/feature/delivery/overview/model/sorting_information.dart';
import '../../../../model/tour.dart';
abstract class TourState {}
class TourInitial extends TourState {}
class TourLoading extends TourState {}
class TourRequestingDistances extends TourState {
Tour tour;
List<Payment> payments;
TourRequestingDistances({required this.tour, required this.payments});
}
class TourRequestingSortingInformation extends TourState {
Tour tour;
Map<String, double>? distances;
List<Payment> paymentOptions;
TourRequestingSortingInformation({
required this.tour,
this.distances,
required this.paymentOptions,
});
}
class TourLoaded extends TourState {
Tour tour;
Map<String, double>? distances;
List<Payment> paymentOptions;
SortingInformationContainer sortingInformation;
TourLoaded({
required this.tour,
this.distances,
required this.paymentOptions,
required this.sortingInformation
});
TourLoaded copyWith({
Tour? tour,
Map<String, double>? distances,
List<Payment>? paymentOptions,
SortingInformationContainer? sortingInformation
}) {
return TourLoaded(
tour: tour ?? this.tour,
distances: distances ?? this.distances,
paymentOptions: paymentOptions ?? this.paymentOptions,
sortingInformation: sortingInformation ?? this.sortingInformation
);
}
}