Skip to content
This repository was archived by the owner on Apr 10, 2024. It is now read-only.

Commit 1fc7326

Browse files
author
Martin Braun
committed
chore: remove unused forceAndroidLocationManager property
1 parent a3441bb commit 1fc7326

File tree

3 files changed

+2
-10
lines changed

3 files changed

+2
-10
lines changed

README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,6 @@ selectInitialPosition | bool | Whether to display selected place on initial map
267267
resizeToAvoidBottomInset | bool | Resize map when keyboard is shown and can only be disabled when using a full screen map. Defaults to true.
268268
initialSearchString | String | Sets initial search string for auto complete search
269269
searchForInitialValue | bool | Wether to automatically search for initial value on start
270-
forceAndroidLocationManager | bool | On Android devices you can set this to true to force the geolocator plugin to use the 'LocationManager' to determine the position instead of the 'FusedLocationProviderClient'. On iOS this is ignored.
271270
myLocationButtonCooldown | int | Cooldown time in seconds for the 'myLocationButton'. Defaults to 10 seconds.
272271
forceSearchOnZoomChanged | bool | Wether to allow place search even when the zoom has changed. Defaults to false.
273272
automaticallyImplyAppBarLeading | bool | By default, there is a back button on the top. Setting false will remove the back button.

example/lib/main.dart

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -320,7 +320,6 @@ class _HomePageState extends State<HomePage> {
320320
width: MediaQuery.of(context).size.width * 0.75,
321321
height: MediaQuery.of(context).size.height * 0.35,
322322
child: PlacePicker(
323-
forceAndroidLocationManager: true,
324323
apiKey: Platform.isAndroid
325324
? APIKeys.androidApiKey
326325
: APIKeys.iosApiKey,

lib/src/place_picker.dart

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,6 @@ class PlacePicker extends StatefulWidget {
6565
this.resizeToAvoidBottomInset = true,
6666
this.initialSearchString,
6767
this.searchForInitialValue = false,
68-
this.forceAndroidLocationManager = false,
6968
this.forceSearchOnZoomChanged = false,
7069
this.automaticallyImplyAppBarLeading = true,
7170
this.autocompleteOnTrailingWhitespace = false,
@@ -169,11 +168,6 @@ class PlacePicker extends StatefulWidget {
169168
/// Whether to search for the initial value or not
170169
final bool searchForInitialValue;
171170

172-
/// On Android devices you can set [forceAndroidLocationManager]
173-
/// to true to force the plugin to use the [LocationManager] to determine the
174-
/// position instead of the [FusedLocationProviderClient]. On iOS this is ignored.
175-
final bool forceAndroidLocationManager;
176-
177171
/// Allow searching place when zoom has changed. By default searching is disabled when zoom has changed in order to prevent unwilling API usage.
178172
final bool forceSearchOnZoomChanged;
179173

@@ -267,7 +261,7 @@ class _PlacePickerState extends State<PlacePicker> {
267261
provider.desiredAccuracy = widget.desiredLocationAccuracy;
268262
provider.setMapType(widget.initialMapType);
269263
if (widget.useCurrentLocation != null && widget.useCurrentLocation!) {
270-
await provider.updateCurrentLocation(widget.forceAndroidLocationManager);
264+
await provider.updateCurrentLocation();
271265
}
272266
return provider;
273267
}
@@ -488,7 +482,7 @@ class _PlacePickerState extends State<PlacePicker> {
488482
provider!.isOnUpdateLocationCooldown = false;
489483
});
490484
await provider!
491-
.updateCurrentLocation(widget.forceAndroidLocationManager);
485+
.updateCurrentLocation();
492486
await _moveToCurrentPosition();
493487
}
494488
},

0 commit comments

Comments
 (0)