diff --git a/CHANGELOG.md b/CHANGELOG.md index 9738980..64a7698 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -29,4 +29,10 @@ * Add ability to listen to neighbour locations ## 0.4.0 -* Add ability to listen (and stop listening) to significant location updates \ No newline at end of file +* Add ability to listen (and stop listening) to significant location updates + +## 0.4.1 +* null safety +* Add result calls to iOS platform code (#36) - Thanks @geisterfurz007 +* Added documentation regarding geofence constraints (#34) - Thanks @rodrigonso +* Add comment indicating unit of measure for radius (#33) - Thanks @turing-tech diff --git a/example/lib/main.dart b/example/lib/main.dart index 83c6c45..7889ed6 100644 --- a/example/lib/main.dart +++ b/example/lib/main.dart @@ -29,8 +29,8 @@ class _MyAppState extends State { new AndroidInitializationSettings('app_icon'); var initializationSettingsIOS = IOSInitializationSettings(onDidReceiveLocalNotification: null); - var initializationSettings = InitializationSettings(android: - initializationSettingsAndroid, iOS: initializationSettingsIOS); + var initializationSettings = InitializationSettings( + android: initializationSettingsAndroid, iOS: initializationSettingsIOS); flutterLocalNotificationsPlugin.initialize(initializationSettings, onSelectNotification: null); } @@ -149,8 +149,9 @@ class _MyAppState extends State { priority: Priority.high, ticker: 'ticker'); var iOSPlatformChannelSpecifics = IOSNotificationDetails(); - var platformChannelSpecifics = NotificationDetails(android: - androidPlatformChannelSpecifics, iOS: iOSPlatformChannelSpecifics); + var platformChannelSpecifics = NotificationDetails( + android: androidPlatformChannelSpecifics, + iOS: iOSPlatformChannelSpecifics); await flutterLocalNotificationsPlugin.show( rng.nextInt(100000), title, subtitle, platformChannelSpecifics, payload: 'item x'); diff --git a/example/pubspec.lock b/example/pubspec.lock index 5364419..f1a3f8a 100644 --- a/example/pubspec.lock +++ b/example/pubspec.lock @@ -68,7 +68,7 @@ packages: path: ".." relative: true source: path - version: "0.4.0" + version: "0.4.1" flutter_local_notifications: dependency: "direct main" description: @@ -193,4 +193,4 @@ packages: version: "2.1.0" sdks: dart: ">=2.12.0-0.0 <3.0.0" - flutter: ">=1.12.13+hotfix.5" + flutter: ">=1.22.0" diff --git a/lib/Geolocation.dart b/lib/Geolocation.dart index a958d50..2a9b365 100644 --- a/lib/Geolocation.dart +++ b/lib/Geolocation.dart @@ -4,7 +4,11 @@ class Geolocation { final double radius; // in meters final String id; - const Geolocation({required this.latitude, required this.longitude, required this.radius, required this.id}); + const Geolocation( + {required this.latitude, + required this.longitude, + required this.radius, + required this.id}); } enum GeolocationEvent { entry, exit } diff --git a/lib/geofence.dart b/lib/geofence.dart index 5d02dcd..243101c 100644 --- a/lib/geofence.dart +++ b/lib/geofence.dart @@ -17,8 +17,8 @@ class Coordinate { class Geofence { static const MethodChannel _channel = const MethodChannel('geofence'); - static GeofenceCallback _entryCallback = (location){}; - static GeofenceCallback _exitCallback = (location){}; + static GeofenceCallback _entryCallback = (location) {}; + static GeofenceCallback _exitCallback = (location) {}; //ignore: close_sinks static StreamController _userLocationUpdated = @@ -86,7 +86,7 @@ class Geofence { longitude: call.arguments["longitude"] as double, radius: call.arguments["radius"] as double, id: call.arguments["id"] as String); - _entryCallback(location); + _entryCallback(location); } else if (call.method == "exit") { Geolocation location = Geolocation( latitude: call.arguments["latitude"] as double, diff --git a/pubspec.lock b/pubspec.lock index 52ed0ad..178922e 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -144,4 +144,4 @@ packages: version: "2.1.0" sdks: dart: ">=2.12.0-0.0 <3.0.0" - flutter: ">=1.12.0" + flutter: ">=1.22.0" diff --git a/pubspec.yaml b/pubspec.yaml index 1a06dbf..a04fa60 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,11 +1,11 @@ name: flutter_geofence description: Plugin to interact with geofences, and get the user's current/latest location. -version: 0.4.0 +version: 0.4.1 homepage: https://github.com/DwayneCoussement/geofence environment: - sdk: ">=2.12.0-0 <3.0.0" - flutter: ">=1.12.0 <2.0.0" + sdk: ">=2.12.0 <3.0.0" + flutter: ">=1.22.0" dependencies: flutter: