added invalid token chicking

This commit is contained in:
Username1548
2025-03-05 14:26:16 +07:00
parent ae6b2612d7
commit 96dc456ff4
8 changed files with 111 additions and 74 deletions

View File

@@ -20,7 +20,7 @@ abstract class TokenStorage {
}
}
static Future<String> getTokenFromStorage() async => (await FlutterSecureStorage().read(key: 'token'))!;
static Future<String?> getTokenFromStorage() async => await FlutterSecureStorage().read(key: 'token');
static saveTokenInStorage(String token) async {
await FlutterSecureStorage().write(key: 'token', value: token);