update flutter dependencies
This commit is contained in:
@@ -77,7 +77,7 @@ class RegistrationScreenState extends BaseState<FinishRegistrationScreen> {
|
||||
helper.getToken().then((token) {
|
||||
getCheckTokenStatusRequest(token).then((response) {
|
||||
setState(() {
|
||||
_tokenActive = JSON.decode(response.body)['active'];
|
||||
_tokenActive = json.decode(response.body)['active'];
|
||||
});
|
||||
}).catchError((error) {
|
||||
print(error.toString());
|
||||
|
||||
@@ -37,7 +37,7 @@ class PurchaseScreenState<T> extends BaseState<PurchaseScreen> {
|
||||
bool isAutomaticallyImplyLeading() => false;
|
||||
|
||||
PurchaseScreenState(SqliteHelper helper, String app, String userString, String card) : super(helper, app) {
|
||||
this.user = JSON.decode(userString);
|
||||
this.user = json.decode(userString);
|
||||
this.card = card;
|
||||
}
|
||||
|
||||
@@ -239,8 +239,8 @@ class PurchaseScreenState<T> extends BaseState<PurchaseScreen> {
|
||||
} catch(error) {
|
||||
print(error.toString());
|
||||
}
|
||||
Map loyality = JSON.decode(response.body);
|
||||
Map coupons = JSON.decode(couponResponse.body);
|
||||
Map loyality = json.decode(response.body);
|
||||
Map coupons = json.decode(couponResponse.body);
|
||||
|
||||
coupons['results'].forEach((couponItem) {
|
||||
couponItem['isSet'] = false;
|
||||
@@ -378,7 +378,7 @@ class PurchaseScreenState<T> extends BaseState<PurchaseScreen> {
|
||||
|
||||
try {
|
||||
purchaseResponse = await getPurchaseRequest(user['purchases_url'], body, token);
|
||||
purchase = JSON.decode(purchaseResponse.body);
|
||||
purchase = json.decode(purchaseResponse.body);
|
||||
} catch(error) {
|
||||
purchaseInProgress = false;
|
||||
print(error.toString());
|
||||
@@ -402,7 +402,7 @@ class PurchaseScreenState<T> extends BaseState<PurchaseScreen> {
|
||||
print(error.toString());
|
||||
}
|
||||
|
||||
Map coupons = JSON.decode(couponsResponse.body);
|
||||
Map coupons = json.decode(couponsResponse.body);
|
||||
|
||||
new Future.delayed(const Duration(milliseconds: 200), () {
|
||||
print('show purchase success!');
|
||||
|
||||
@@ -106,7 +106,7 @@ class RegistrationScreenState extends BaseState<RegistrationScreen> {
|
||||
|
||||
print(response.body);
|
||||
print(response.statusCode.toString());
|
||||
Map parsedMap = JSON.decode(response.body);
|
||||
Map parsedMap = json.decode(response.body);
|
||||
|
||||
if (response.statusCode == 201) {
|
||||
helper.createSession(merchantID, posID, parsedMap['token']).then((_) {
|
||||
|
||||
@@ -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));
|
||||
|
||||
50
pubspec.lock
50
pubspec.lock
@@ -7,21 +7,21 @@ packages:
|
||||
name: async
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "2.0.7"
|
||||
version: "2.0.8"
|
||||
charcode:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: charcode
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "1.1.1"
|
||||
version: "1.1.2"
|
||||
collection:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: collection
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "1.14.6"
|
||||
version: "1.14.11"
|
||||
flutter:
|
||||
dependency: "direct main"
|
||||
description: flutter
|
||||
@@ -33,14 +33,14 @@ packages:
|
||||
name: http
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "0.11.3+16"
|
||||
version: "0.12.0"
|
||||
http_parser:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: http_parser
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "3.1.2"
|
||||
version: "3.1.3"
|
||||
image_picker:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
@@ -48,41 +48,34 @@ packages:
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "0.4.2"
|
||||
matcher:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: matcher
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "0.12.2+1"
|
||||
meta:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: meta
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "1.1.5"
|
||||
version: "1.1.6"
|
||||
path:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: path
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "1.5.1"
|
||||
version: "1.6.2"
|
||||
path_provider:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: path_provider
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "0.2.2"
|
||||
version: "0.4.1"
|
||||
petitparser:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: petitparser
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "1.7.6"
|
||||
version: "2.0.2"
|
||||
sky_engine:
|
||||
dependency: transitive
|
||||
description: flutter
|
||||
@@ -94,63 +87,56 @@ packages:
|
||||
name: source_span
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "1.4.0"
|
||||
version: "1.4.1"
|
||||
sprintf:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: sprintf
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "3.0.2"
|
||||
version: "4.0.0"
|
||||
sqflite:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: sqflite
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "0.8.9"
|
||||
stack_trace:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: stack_trace
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "1.9.2"
|
||||
version: "0.12.2+1"
|
||||
string_scanner:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: string_scanner
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "1.0.2"
|
||||
version: "1.0.4"
|
||||
synchronized:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: synchronized
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "1.4.0"
|
||||
version: "1.5.3"
|
||||
typed_data:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: typed_data
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "1.1.5"
|
||||
version: "1.1.6"
|
||||
vector_math:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: vector_math
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "2.0.6"
|
||||
version: "2.0.8"
|
||||
xml:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: xml
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "3.0.0"
|
||||
version: "3.2.3"
|
||||
sdks:
|
||||
dart: ">=2.0.0-dev.35 <=2.0.0-dev.55.0.flutter-97b6c2e09d"
|
||||
dart: ">=2.0.0 <3.0.0"
|
||||
flutter: ">=0.1.4 <2.0.0"
|
||||
|
||||
@@ -3,9 +3,9 @@ description: A new Flutter project.
|
||||
|
||||
dependencies:
|
||||
http: '>=0.11.3+12'
|
||||
sprintf: "^3.0.2"
|
||||
path_provider: "^0.2.1+1"
|
||||
sqflite: any
|
||||
sprintf: "4.0.0"
|
||||
path_provider: "0.4.1"
|
||||
sqflite: "0.12.2+1"
|
||||
image_picker: '^0.4.1' # use for ask permissions @ iOS
|
||||
xml: "^3.0.0"
|
||||
flutter:
|
||||
|
||||
Reference in New Issue
Block a user