feature/routing-map #15

Merged
v4l3n71n merged 6 commits from feature/routing-map into main 2024-11-17 11:56:20 +00:00
Showing only changes of commit af65dc1cb0 - Show all commits

View File

@ -56,8 +56,7 @@ class _MapboxPagesState extends State<MapboxPages> with ShowErrorDialog {
@override
void initState() {
super.initState();
_initToken();
_getEventInfo();
_getUserLocation();
}
void _initToken() {
@ -80,7 +79,7 @@ class _MapboxPagesState extends State<MapboxPages> with ShowErrorDialog {
var events = jsonDecode(utf8.decode(responseGet.bodyBytes));
latitude = events["latitude"];
longitude = events["longitude"];
_getUserLocation();
setState(() {
isLoading = false;
});
@ -154,6 +153,8 @@ class _MapboxPagesState extends State<MapboxPages> with ShowErrorDialog {
userPosition = LatLng(position.latitude, position.longitude);
isUserPositionInitialized = true;
});
_initToken();
_getEventInfo();
} catch (e) {
showErrorDialog(context, "Failed to get user location: $e");
}