anyway/frontend/lib/utils/get_landmarks.dart
Remy Moll c1d74ab227
Some checks failed
Build and push docker image / Build (pull_request) Failing after 2m10s
Build and release APK / Build APK (pull_request) Successful in 5m22s
Build web / Build Web (pull_request) Successful in 1m14s
use structs to draw custom map pointers
2024-06-01 19:58:25 +02:00

25 lines
1.1 KiB
Dart

import "package:fast_network_navigation/structs/landmark.dart";
import 'package:http/http.dart' as http;
Future<List<Landmark>> fetchLandmarks() async {
// final response = await http
// .get(Uri.parse('https://nav.kluster.moll.re/v1/destination/1'));
// if (response.statusCode == 200) {
// If the server did return a 200 OK response,
// then parse the JSON.
List<Landmark> landmarks = [
Landmark(name: "Landmark 1", location: [48.85, 2.35], type: LandmarkType(name: "Type 1")),
Landmark(name: "Landmark 2", location: [48.86, 2.36], type: LandmarkType(name: "Type 2")),
Landmark(name: "Landmark 3", location: [48.75, 2.3], type: LandmarkType(name: "Type 3")),
Landmark(name: "Landmark 4", location: [48.9, 2.4], type: LandmarkType(name: "Type 4")),
Landmark(name: "Landmark 5", location: [48.91, 2.45], type: LandmarkType(name: "Type 5")),
];
return landmarks;
// } else {
// // If the server did not return a 200 OK response,
// // then throw an exception.
// throw Exception('Failed to load destination');
// }
}