Skip to content

Commit 508e9e4

Browse files
authored
Merge pull request #31 from BaseflowIT/release/1.1.2
Release/1.1.2
2 parents d25b81d + 5cbd063 commit 508e9e4

File tree

5 files changed

+25
-12
lines changed

5 files changed

+25
-12
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## [1.1.2]
2+
3+
* Fixed reported formatting issues
4+
15
## [1.1.1]
26

37
* Fixed a warning generated by xCode when compiling the example project (see [issue #28](https://github.com/BaseflowIT/flutter-geolocator/issues/28))

ios/geolocator.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
#
44
Pod::Spec.new do |s|
55
s.name = 'geolocator'
6-
s.version = '1.1.1'
6+
s.version = '1.1.2'
77
s.summary = 'Geolocation plugin for Flutter. This plugin provides a cross-platform API for generic location (GPS etc.) functions.'
88
s.description = <<-DESC
99
Geolocation plugin for Flutter.

lib/geolocator.dart

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,13 @@ class Geolocator {
3030
Stream<Position> _onPositionChanged;
3131

3232
/// Returns the current location taking the supplied [desiredAccuracy] into account.
33-
///
33+
///
3434
/// When the [desiredAccuracy] is not supplied, it defaults to best.
35-
Future<Position> getPosition([LocationAccuracy desiredAccuracy = LocationAccuracy.best]) async {
36-
var position = await _methodChannel.invokeMethod('getPosition', desiredAccuracy.index);
37-
return Position.fromMap(position);
35+
Future<Position> getPosition(
36+
[LocationAccuracy desiredAccuracy = LocationAccuracy.best]) async {
37+
var position =
38+
await _methodChannel.invokeMethod('getPosition', desiredAccuracy.index);
39+
return Position.fromMap(position);
3840
}
3941

4042
/// Fires whenever the location changes outside the bounds of the [desiredAccuracy].
@@ -52,12 +54,15 @@ class Geolocator {
5254
/// // When no longer needed cancel the subscription
5355
/// positionStream.cancel();
5456
/// ```
55-
///
57+
///
5658
/// When the [desiredAccuracy] is not supplied, it defaults to best.
57-
Stream<Position> getPositionStream([LocationAccuracy desiredAccuracy = LocationAccuracy.best]) {
59+
Stream<Position> getPositionStream(
60+
[LocationAccuracy desiredAccuracy = LocationAccuracy.best]) {
5861
if (_onPositionChanged == null) {
59-
_onPositionChanged = _eventChannel.receiveBroadcastStream(desiredAccuracy.index).map<Position>(
60-
(element) => Position.fromMap(element.cast<String, double>()));
62+
_onPositionChanged = _eventChannel
63+
.receiveBroadcastStream(desiredAccuracy.index)
64+
.map<Position>(
65+
(element) => Position.fromMap(element.cast<String, double>()));
6166
}
6267

6368
return _onPositionChanged;

lib/models/location_accuracy.dart

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,19 @@
11
/// Defines the accuracy used to determine the location data.
2-
///
2+
///
33
/// The accuracy is measured in meters (distance) and differs per platform.
44
enum LocationAccuracy {
55
/// Location is accurate within a distance of 3000m on iOS and 500m on Android
66
lowest,
7+
78
/// Location is accurate within a distance of 1000m on iOS and 500m on Android
89
low,
10+
911
/// Location is accurate within a distance of 100m on iOS and between 100m and 500m on Android
1012
medium,
13+
1114
/// Location is accurate within a distance of 10m on iOS and between 0m and 100m on Android
1215
high,
16+
1317
/// Location is accurate within a distance of ~0m on iOS and between 0m and 100m on Android
1418
best
15-
}
19+
}

pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: geolocator
22
description: Geolocation plugin for Flutter. This plugin provides a cross-platform API for generic location (GPS etc.) functions.
3-
version: 1.1.1
3+
version: 1.1.2
44
author: Baseflow <hello@baseflow.com>
55
homepage: https://github.com/baseflowit/flutter-geolocator
66

0 commit comments

Comments
 (0)