Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Uanble to go back from map screen #48

Open
SatyaMirthipati opened this issue Jul 8, 2024 · 0 comments
Open

Uanble to go back from map screen #48

SatyaMirthipati opened this issue Jul 8, 2024 · 0 comments

Comments

@SatyaMirthipati
Copy link

SatyaMirthipati commented Jul 8, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant