Upgrade to support new version
This commit is contained in:
@@ -120,7 +120,7 @@ class _SplashScreenState extends BaseState<SplashScreen> {
|
||||
showNextScreen(new RegistrationScreen(helper, app));
|
||||
});
|
||||
} else {
|
||||
Map status = JSON.decode(statusResponse.body);
|
||||
Map status = json.decode(statusResponse.body);
|
||||
bool active = status['active'] == null ? false : status['active'];
|
||||
|
||||
if (active) {
|
||||
@@ -161,7 +161,7 @@ class _SplashScreenState extends BaseState<SplashScreen> {
|
||||
/// Очищаем бд, делаем запрос на удаление токена.
|
||||
Future clearToken(Response response, SqliteHelper helper) async {
|
||||
helper.clear().then((_) {
|
||||
Map parsedMap = JSON.decode(response.body);
|
||||
Map parsedMap = json.decode(response.body);
|
||||
getDeleteTokenRequest(parsedMap['token']).then((_) {
|
||||
showNextScreen(new RegistrationScreen(helper, app));
|
||||
}).catchError((error) {
|
||||
@@ -201,7 +201,7 @@ class _SplashScreenState extends BaseState<SplashScreen> {
|
||||
|
||||
if (userResponse != null) {
|
||||
print('I have user in method handler!');
|
||||
List<dynamic> users = JSON.decode(userResponse.body);
|
||||
List<dynamic> users = json.decode(userResponse.body);
|
||||
if (users.length > 0) {
|
||||
return users[0];
|
||||
} else {
|
||||
@@ -238,7 +238,7 @@ class _SplashScreenState extends BaseState<SplashScreen> {
|
||||
} else {
|
||||
String userString = call.arguments[0] is String
|
||||
? call.arguments[0]
|
||||
: JSON.encode(call.arguments[0]);
|
||||
: json.encode(call.arguments[0]);
|
||||
print(userString);
|
||||
String card = call.arguments[1];
|
||||
showNextScreen(new PurchaseScreen(helper, app, userString, card));
|
||||
|
||||
Reference in New Issue
Block a user