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

Back button request #82

Open
Tpow99 opened this issue Dec 5, 2022 · 4 comments
Open

Back button request #82

Tpow99 opened this issue Dec 5, 2022 · 4 comments

Comments

@Tpow99
Copy link

Tpow99 commented Dec 5, 2022

Hey! Super minor and hopefully trivial request, but a back or cancel button would be amazing!

@rajesh-h
Copy link

rajesh-h commented Dec 8, 2022

I am here for the same request.
if you edit the package you can get the back button, but when you update the package it is lost so I wish if this was provided as boolean option.

Below line will decide on back button

automaticallyImplyLeading: false,

@blewis-1
Copy link

I am here for the same request. Kindly have a look at it, users are stuck on the location_picker screen and there's no way to go back on iOS. Thanks.

@dharambudh1
Copy link

I am here for the same request. if you edit the package you can get the back button, but when you update the package it is lost so I wish if this was provided as boolean option.

Below line will decide on back button

automaticallyImplyLeading: false,

Working, thanks!

@mutairibassam
Copy link

mutairibassam commented Sep 3, 2023

Maybe some of you still wondering how to implement Back Button. Above answer is still not obvious how it should be implemented. Below are the path you should follow to get it.

  1. You need to get the package from github not pub.dev. I used pull request feat: add optional configuration #85 to be my reference.

Note: one of the bad things is whenever the pull request get updated, will be immediately reflected in you application so you might create fork it and modify the changes and refer to your repo.

  1. Refer to github repo instead of pub.dev in your pubspec.yml file
  place_picker:
    git:
      url: https://github.com/Lzyct/locationpicker.git
      # ref: branch_name # if branch not the master
      # rev: commit_hash # if you want to get specific commit
  1. In your code
LocationResult? result = await Navigator.of(context).push(MaterialPageRoute(
    builder: (context) => PlacePicker(
        "API_KEY",
        // important to be added
        appBarOptions: AppBarOptions(showBackButton: true),
        ),
    ),
);

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

5 participants