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

It doesn't pop on desktop #17

Closed
steinmetz opened this issue Apr 11, 2021 · 2 comments
Closed

It doesn't pop on desktop #17

steinmetz opened this issue Apr 11, 2021 · 2 comments
Assignees

Comments

@steinmetz
Copy link

I have been testing your lib on a desktop app and I think it doesn't work properly when I want to pop a page using context.yeet();

Also, the back arrow is not showing by default, so I added it manually:

 appBar: AppBar(
              leading: IconButton(icon: Icon(Icons.arrow_back_ios_sharp),
              onPressed: (){
                context.yeet();
              },
     ),
 ), 

Thank you!

@HosseinYousefi
Copy link
Owner

HosseinYousefi commented Apr 11, 2021

@steinmetz can you share your yeet tree?

I'm asking this because popping works only if you have a Yeet inside the children of of another Yeet. Like:

Yeet(
  path: '/hi',
  builder: ...
  children: [
    Yeet(path: '/hi/some/completely/different/path/even', builder: ...),
  ]
),

Here if you yeet from /hi to /hi/some/completely/different/path/even and when you context.yeet() it'll go back to /hi.

If these two roots are not in subtrees of each other, and for example you want to go from /a/b/c/d to /a/b/c then you can use context.yeet('..').

@steinmetz
Copy link
Author

@HosseinYousefi Thank you for the explanation! I was not using the same root and it was the reason of my problem.

Thank you again! I will close this issue.

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

No branches or pull requests

2 participants