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:intl/date_symbol_data_local.dart';
import '../variable/globals.dart' as globals;
import '../classes/MyDrawer.dart';
import '../classes/auth_service.dart';
// app starting point
void main() {
@@ -41,6 +42,8 @@ class ListItemOrganizers extends StatefulWidget {
// homepage state
class _MyHomePageState extends State<ListItemOrganizers> {
final AuthService _authService = AuthService();
// variable to call and store future list of posts
// function to fetch data from api and return future list of posts
@@ -60,6 +63,12 @@ class _MyHomePageState extends State<ListItemOrganizers> {
return body;
}
@override
void initState() {
super.initState();
_authService.checkTokenStatus(context);
}
// build function
@override
Widget build(BuildContext context) {