Merge pull request 'splash_scren' (#156) from splash_scren into main
Reviewed-on: https://repo.ravanertebat.com/TM/tm_app/pulls/156
This commit is contained in:
@@ -113,4 +113,13 @@ class AuthService {
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
Future<Result<bool>> checkIsLoggedIn() async {
|
||||
final prefs = await SharedPreferences.getInstance();
|
||||
final token = prefs.getString('bearer');
|
||||
if (token == null) {
|
||||
return const Result.ok(false);
|
||||
}
|
||||
return const Result.ok(true);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user