mohesu / map_location_picker

Map location picker for flutter Based on google_maps_flutter
Apache License 2.0
46 stars 68 forks source link

Uanble to go back from map screen #48

Open SatyaMirthipati opened 2 months ago

SatyaMirthipati commented 2 months ago

I am using version map_location_picker: ^1.3.0 after I update the version I am unable to go back in the screen it is struck in the same screen I have tried using the backbutton widget in code as MaterialPageRoute( builder: (context) { return MapLocationPicker( popOnNextButtonTaped: true, hideSuggestionsOnKeyboardHide: true, apiKey: 'Your Api Key', currentLatLng: locationBloc.currentPosition, backButton: BackButton( onPressed: () => Navigator.maybePop(context), ), onNext: (GeocodingResult? result) { if (result != null) { addressCtrl.text = '${result.formattedAddress}'; latitude = '${result.geometry.location.lat}'; longitude = '${result.geometry.location.lng}'; setState(() {}); } }, onSuggestionSelected: (PlacesDetailsResponse? result) { if (result != null) { addressCtrl.text = '${result.result.formattedAddress}'; latitude = '${result.result.geometry?.location.lat}'; longitude = '${result.result.geometry?.location.lng}'; setState(() {}); } }, ); }, ),

One more thing when I click on the location button which navigates to the current location When I am at the same location & try to hit the same screen it is navigated to the settings of my app.