Skip to content
This repository has been archived by the owner on Oct 14, 2022. It is now read-only.

Commit

Permalink
Release 0.4.1
Browse files Browse the repository at this point in the history
  • Loading branch information
DwayneCoussement committed Mar 27, 2021
1 parent ab0567a commit 9032dad
Show file tree
Hide file tree
Showing 7 changed files with 26 additions and 15 deletions.
8 changes: 7 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
* 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
9 changes: 5 additions & 4 deletions example/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ class _MyAppState extends State<MyApp> {
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);
}
Expand Down Expand Up @@ -149,8 +149,9 @@ class _MyAppState extends State<MyApp> {
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');
Expand Down
4 changes: 2 additions & 2 deletions example/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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"
6 changes: 5 additions & 1 deletion lib/Geolocation.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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 }
6 changes: 3 additions & 3 deletions lib/geofence.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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<Coordinate> _userLocationUpdated =
Expand Down Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -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"
6 changes: 3 additions & 3 deletions pubspec.yaml
Original file line number Diff line number Diff line change
@@ -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:
Expand Down

0 comments on commit 9032dad

Please sign in to comment.