Initial draft
This commit is contained in:
@ -0,0 +1,19 @@
|
||||
import 'package:hl_lieferservice/feature/delivery/overview/service/delivery_info_service.dart';
|
||||
import 'package:hl_lieferservice/model/tour.dart';
|
||||
|
||||
class TourRepository {
|
||||
DeliveryInfoService service;
|
||||
|
||||
TourRepository({required this.service});
|
||||
|
||||
Future<Tour> loadAll(String userId) async {
|
||||
Tour? tour = await service.getTourOfToday(userId);
|
||||
return tour!;
|
||||
}
|
||||
|
||||
Future<List<Payment>> loadPaymentOptions() async {
|
||||
return (await service.getPaymentMethods())
|
||||
.map((option) => Payment.fromDTO(option))
|
||||
.toList();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user