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

Get current route (entire route object or just name) #42

Open
b-asaf opened this issue Apr 19, 2020 · 0 comments
Open

Get current route (entire route object or just name) #42

b-asaf opened this issue Apr 19, 2020 · 0 comments

Comments

@b-asaf
Copy link

b-asaf commented Apr 19, 2020

Hi,
First let me say that this is a great package.

I am trying to get the current route in order to perform a specific action.
Is there a way to get the current route - something like Routes.sailor.currentRouteName or Routes.sailor.currentRoute.

I came up with 2 possible options, if there is another way please let me know:

  1. Maybe use the 'SailorLoggingObserver` (like its suggested in issue Custom navigatorObserver #32 ) but I am not sure this is the correct approach?
  2. The option I am using now is ModalRoute.of(context).isCurrent but I am guessing navigation package like Sailor should have something build in, no?

Thanks

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