From de66cba4862bd06abf66283390adfa68eeeb532b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E0=B9=96=DB=A3=DB=9CMartinus?= Date: Wed, 18 Aug 2021 06:20:48 +0200 Subject: [PATCH] Fix null ref error when useCurrentLocation is null --- lib/src/place_picker.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/src/place_picker.dart b/lib/src/place_picker.dart index 318d8f3b..7751c310 100644 --- a/lib/src/place_picker.dart +++ b/lib/src/place_picker.dart @@ -360,7 +360,7 @@ class _PlacePickerState extends State { } Widget _buildMapWithLocation() { - if (widget.useCurrentLocation!) { + if (widget.useCurrentLocation != null && widget.useCurrentLocation!) { return FutureBuilder( future: provider!.updateCurrentLocation(widget.forceAndroidLocationManager), builder: (context, snap) {