From e352b227af995104f905ac9e8434b039daeea939 Mon Sep 17 00:00:00 2001 From: Timothy Sealy Date: Fri, 3 Apr 2020 00:00:29 +0200 Subject: [PATCH] Updated location package and code to cope with a breaking change. (#239) --- example/lib/main.dart | 2 +- example/pubspec.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/example/lib/main.dart b/example/lib/main.dart index 4fec3b987..694b8fbdb 100644 --- a/example/lib/main.dart +++ b/example/lib/main.dart @@ -31,7 +31,7 @@ class MapsDemo extends StatelessWidget { void _pushPage(BuildContext context, Page page) async { final location = Location(); final hasPermissions = await location.hasPermission(); - if (!hasPermissions) { + if (hasPermissions != PermissionStatus.GRANTED) { await location.requestPermission(); } diff --git a/example/pubspec.yaml b/example/pubspec.yaml index 95c648eb6..d96b60d78 100644 --- a/example/pubspec.yaml +++ b/example/pubspec.yaml @@ -12,7 +12,7 @@ dependencies: # The following adds the Cupertino Icons font to your application. # Use with the CupertinoIcons class for iOS style icons. cupertino_icons: ^0.1.2 - location: ^2.3.5 + location: ^2.5.3 dev_dependencies: flutter_test: