Handle invalid login

This commit is contained in:
Hillel Coren 2020-06-14 11:02:02 +03:00
parent ffaef5d5aa
commit cd92f927a7
2 changed files with 9 additions and 6 deletions

View File

@ -177,11 +177,14 @@ void _checkResponse(http.Response response) {
final version = response.headers['X-APP-VERSION']; final version = response.headers['X-APP-VERSION'];
/*
if (version == null) { if (version == null) {
//throw 'Invalid version, please check v5 is installed on the server'; throw 'Invalid version, please check v5 is installed on the server';
} else if (!_isVersionSupported(version)) { } else if (version != null && !_isVersionSupported(version)) {
throw 'The minimum web app version is v$kMinMajorAppVersion.$kMinMinorAppVersion.$kMinPatchAppVersion'; throw 'The minimum web app version is v$kMinMajorAppVersion.$kMinMinorAppVersion.$kMinPatchAppVersion';
} else if (response.statusCode >= 400) { } else */
if (response.statusCode >= 400) {
print('==== FAILED ===='); print('==== FAILED ====');
throw _parseError(response.statusCode, response.body); throw _parseError(response.statusCode, response.body);
} }

View File

@ -17,11 +17,11 @@
"platform": "itunes", "platform": "itunes",
"url": "https://testflight.apple.com/join/MJ6WpaXh" "url": "https://testflight.apple.com/join/MJ6WpaXh"
} }
] ],
"icons": [ "icons": [
{ {
"src": "images/logo.png", "src": "images/logo.png",
"sizes": "397x397", "sizes": "512x512",
"type": "image/png" "type": "image/png"
} }
] ]