fix: black screen

This commit is contained in:
Alex
2025-01-10 11:32:19 +03:00
parent 7f2e4df309
commit 9ccb1d08c3
11 changed files with 71 additions and 50 deletions

View File

@@ -1,4 +1,5 @@
String baseUrl = 'https://dev2.eatvio.com';
String baseUrl = 'https://eatvio.ru';
// String baseUrl = 'https://dev2.eatvio.com';
const List<int> durationValues = [7, 14, 21];

View File

@@ -8,11 +8,15 @@ abstract class TokenStorage {
}
static haveTokenInStorage() async {
if (await FlutterSecureStorage().read(key: 'token') == null) {
try {
if (await FlutterSecureStorage().read(key: 'token') == null) {
return false;
} else {
_addTokenToDioHeader((await FlutterSecureStorage().read(key: 'token'))!);
return true;
}
} catch (e) {
return false;
} else {
_addTokenToDioHeader((await FlutterSecureStorage().read(key: 'token'))!);
return true;
}
}