Skip to content

Commit

Permalink
Merge pull request #142 from martin-braun/patch-2
Browse files Browse the repository at this point in the history
Fix null ref error when useCurrentLocation is null
  • Loading branch information
Terry Kwon authored Sep 8, 2021
2 parents 575f0e9 + de66cba commit a64933a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/src/place_picker.dart
Original file line number Diff line number Diff line change
Expand Up @@ -360,7 +360,7 @@ class _PlacePickerState extends State<PlacePicker> {
}

Widget _buildMapWithLocation() {
if (widget.useCurrentLocation!) {
if (widget.useCurrentLocation != null && widget.useCurrentLocation!) {
return FutureBuilder(
future: provider!.updateCurrentLocation(widget.forceAndroidLocationManager),
builder: (context, snap) {
Expand Down

0 comments on commit a64933a

Please sign in to comment.