added splash screen

This commit is contained in:
amirrezaghabeli
2025-09-22 16:04:49 +03:30
parent 197ad18618
commit f1214d8a28
14 changed files with 253 additions and 12 deletions
@@ -47,4 +47,8 @@ class AuthRepository {
}) async {
return _authService.verifyOtp(code: code, email: email);
}
Future<Result<bool>> checkIsLoggedIn() async {
return _authService.checkIsLoggedIn();
}
}
+9
View File
@@ -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);
}
}