check token 100%

This commit is contained in:
2025-03-06 21:38:47 +01:00
parent e7afe8fddb
commit 9df499d198
8 changed files with 41 additions and 3 deletions

View File

@@ -11,6 +11,7 @@ import 'package:geolocator/geolocator.dart'; // For getting the user's location
import '../classes/alert.dart'; // Assuming this contains your error dialog code.
import '../variable/globals.dart' as globals;
import '../classes/MyDrawer.dart';
import '../classes/auth_service.dart';
void main() async {
await dotenv.load(fileName: ".env"); // Load .env file
@@ -44,6 +45,8 @@ class MapboxPages extends StatefulWidget {
}
class _MapboxPagesState extends State<MapboxPages> with ShowAlertDialog {
final AuthService _authService = AuthService();
late MapboxMapController mapController;
late String mapboxAccessToken;
List<LatLng> routeCoordinates = [];
@@ -58,6 +61,8 @@ class _MapboxPagesState extends State<MapboxPages> with ShowAlertDialog {
@override
void initState() {
super.initState();
_authService.checkTokenStatus(context);
_getUserLocation();
}