MaterialPageRoute( builder: (context) { return MapLocationPicker( // liteModeEnabled: true,
compassEnabled: true,
mapType: MapType.terrain,
apiKey: "AIzaSyD09LtDBfDoKPUn468fSUrBlSBrdDLDtIc",
canPopOnNextButtonTaped: true,
currentLatLng: const LatLng(29.121599, 76.396698),
desiredAccuracy: LocationAccuracy.best,
onNext: (GeocodingResult? result) {
if (result != null) {
setState(() {
// result.geometry.location.
_locationController.text = result.formattedAddress ?? "";
_location = result.formattedAddress ?? "";
_lat = result.geometry.location.lat.toString();
_long = result.geometry.location.lng.toString();
});
}
},
onSuggestionSelected: (PlacesDetailsResponse? result) {
if (result != null) {
setState(() {
autocompletePlace =
result.result.formattedAddress ?? "";
_locationController.text = result.result.formattedAddress ?? "";
_location = result.result.formattedAddress ?? "";
_lat = result.result.geometry!.location.lat.toString();
_long = result.result.geometry!.location.lng.toString();
});
}
},
);
},
),
This is my code , I am stuck here , please help
I am trying to pick the current location and change map type , but it’s not working , I also could not find a way to customise these button show I can handle on click action on this.I am running this on iOS Simulator