show correct landmark types when fetching from api
All checks were successful
Build and push docker image / Build (pull_request) Successful in 1m42s
Build and release APK / Build APK (pull_request) Successful in 5m22s

This commit is contained in:
2024-08-06 14:34:12 +02:00
parent 89511f39cb
commit f71b9b19a6
5 changed files with 161 additions and 139 deletions

View File

@@ -136,12 +136,20 @@ class _BasePageState extends State<BasePage> {
// TODO: Implement this function
Trip getFirstTrip(Future<List<Trip>> trips) {
Trip t1 = Trip(uuid: '1', landmarks: LinkedList<Landmark>());
t1.landmarks.add(
Landmark(
uuid: '0',
name: "Start",
location: [48.85, 2.32],
type: start,
),
);
t1.landmarks.add(
Landmark(
uuid: '1',
name: "Eiffel Tower",
location: [48.859, 2.295],
type: monument,
type: sightseeing,
imageURL: "https://upload.wikimedia.org/wikipedia/commons/thumb/a/a8/Tour_Eiffel_Wikimedia_Commons.jpg/1037px-Tour_Eiffel_Wikimedia_Commons.jpg"
),
);
@@ -150,7 +158,7 @@ Trip getFirstTrip(Future<List<Trip>> trips) {
uuid: "2",
name: "Notre Dame Cathedral",
location: [48.8530, 2.3498],
type: monument,
type: sightseeing,
imageURL: "https://upload.wikimedia.org/wikipedia/commons/thumb/f/f7/Notre-Dame_de_Paris%2C_4_October_2017.jpg/440px-Notre-Dame_de_Paris%2C_4_October_2017.jpg"
),
);
@@ -159,7 +167,7 @@ Trip getFirstTrip(Future<List<Trip>> trips) {
uuid: "3",
name: "Louvre palace",
location: [48.8606, 2.3376],
type: museum,
type: sightseeing,
imageURL: "https://upload.wikimedia.org/wikipedia/commons/thumb/6/66/Louvre_Museum_Wikimedia_Commons.jpg/540px-Louvre_Museum_Wikimedia_Commons.jpg"
),
);
@@ -168,7 +176,7 @@ Trip getFirstTrip(Future<List<Trip>> trips) {
uuid: "4",
name: "Pont-des-arts",
location: [48.8585, 2.3376],
type: monument,
type: sightseeing,
imageURL: "https://upload.wikimedia.org/wikipedia/commons/thumb/d/d1/Pont_des_Arts%2C_6e_Arrondissement%2C_Paris_%28HDR%29_20140320_1.jpg/560px-Pont_des_Arts%2C_6e_Arrondissement%2C_Paris_%28HDR%29_20140320_1.jpg"
),
);
@@ -177,9 +185,18 @@ Trip getFirstTrip(Future<List<Trip>> trips) {
uuid: "5",
name: "Panthéon",
location: [48.847, 2.347],
type: monument,
type: sightseeing,
imageURL: "https://upload.wikimedia.org/wikipedia/commons/thumb/8/80/Pantheon_of_Paris_007.JPG/1280px-Pantheon_of_Paris_007.JPG"
),
);
t1.landmarks.add(
Landmark(
uuid: "6",
name: "Galeries Lafayette",
location: [48.87, 2.32],
type: shopping,
imageURL: "https://upload.wikimedia.org/wikipedia/commons/thumb/d/de/GaleriesLafayetteNuit.jpg/220px-GaleriesLafayetteNuit.jpg"
),
);
return t1;
}