From 4e2b483d1d25d2edaa1c842a44204c0ab2488498 Mon Sep 17 00:00:00 2001 From: vtretyakov Date: Wed, 9 Jan 2019 00:09:41 +0700 Subject: [PATCH] child parameter has been deprecated ImagePicker.pickImage() need parameter source: null --- lib/common.dart | 2 +- lib/screens/purchase.dart | 4 ++-- lib/screens/settings.dart | 2 +- pubspec.lock | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/common.dart b/lib/common.dart index dd8b697..749be0a 100644 --- a/lib/common.dart +++ b/lib/common.dart @@ -65,5 +65,5 @@ getLocaleTitle(String code) { // Добавил вызов, что-бы AOT компилер не выкинул либу. getImage() async { - return await ImagePicker.pickImage(); + return await ImagePicker.pickImage(source: null); } diff --git a/lib/screens/purchase.dart b/lib/screens/purchase.dart index f01b3fc..5e0c20e 100644 --- a/lib/screens/purchase.dart +++ b/lib/screens/purchase.dart @@ -298,7 +298,7 @@ class PurchaseScreenState extends BaseState { print(currency.toString()); showDialog( context: context, - child: new AlertDialog( + builder: (_) => new AlertDialog( title: new Text(StringsLocalization.confirmation()), content: new Text( @@ -325,7 +325,7 @@ class PurchaseScreenState extends BaseState { apiErrorAlert(String errorText) { showDialog( context: context, - child: new AlertDialog( + builder: (_) => new AlertDialog( content: new Text(errorText), actions: [ new FlatButton( diff --git a/lib/screens/settings.dart b/lib/screens/settings.dart index 3491441..049d94b 100644 --- a/lib/screens/settings.dart +++ b/lib/screens/settings.dart @@ -170,7 +170,7 @@ class SettingsState extends BaseState { showYesNoDialog(BuildContext context, String title, String content) { showDialog( context: context, - child: new AlertDialog( + builder: (_) => new AlertDialog( title: new Text(title), content: new Text(content), actions: [ diff --git a/pubspec.lock b/pubspec.lock index 1866fdf..79befe2 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -47,7 +47,7 @@ packages: name: image_picker url: "https://pub.dartlang.org" source: hosted - version: "0.4.2" + version: "0.4.10" meta: dependency: transitive description: @@ -115,7 +115,7 @@ packages: name: synchronized url: "https://pub.dartlang.org" source: hosted - version: "1.5.3" + version: "1.5.3+2" typed_data: dependency: transitive description: