Comments (5)
AutoRoute(
path: '/dashboard',
page: DashboardRoute.page,
children: [
AutoRoute(path: '', page: UsersRoute.page),
AutoRoute(
path: 'profile',
page: ProfileRouter.page,
children: [
AutoRoute(
initial: true,
path: '',
page: SettingsRoute.page,
),
],
),
],
),
How do you deal with this, where SettingsRoute is a child of ProfileRoute, but it is not nested and can only be accessed from profile on the UI
from auto_route_library.
Hey @davidnwaneri I think the problem here is the location of your ProfileRouter in the hierarchy,
your setup should look like this
[
AutoRoute(
path: '/dashboard',
guards: [AuthGuard(_context)],
page: DashBoardRoute.page,
children: [
AutoRoute(
path: 'home',
page: HomeRoute.page,
),
AutoRoute(
page: ListRoute.page,
),
],
),
/// this should be in the root scope or any scope other than the tabsRouter scope
AutoRoute(
path: '/profile',
page: ProfileRouter.page,
children: [
AutoRoute(
initial: true,
path: '',
page: ProfileRoute.page,
),
],
),
]
from auto_route_library.
@Milad-Akarie Thank you for taking out time to respond. This worked.
I had the wrong idea about declaring my routes. I've always thought dey should be declared the way they are accessed on the UI
from auto_route_library.
For more context - no pun intended - say I also had:
AutoRoute(
path: '/profile',
page: ProfileRouter.page,
children: [
AutoRoute(
initial: true,
path: '',
page: ProfileRoute.page,
),
...
AutoRoute(
path: 'settings',
page: SettingsRoute.page,
),
],
),
Settings route could have children route. Will this be valid or SettingsRoute
should be in the root scope?
from auto_route_library.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions
from auto_route_library.
Related Issues (20)
- AutoRouteAware can no longer be used as a mixin
- Source <> Destination Aware Transitions HOT 1
- No imports are generated inside app_router.gr.dart HOT 8
- Build Runner Efficiency Warning HOT 10
- Demo image in Nested navigation is not found (404) in Documentation HOT 2
- Feature request HOT 1
- revaluateListenable does not cause reevaluation for nested routes in AutoTabRouter tabs HOT 1
- Custom Route Navigation Overlapping Bottom Bar HOT 2
- Default global route transition HOT 2
- Custom Route Builder Example?
- When resizing the window, the interface is not re-rendered. HOT 2
- Route classes not generated HOT 1
- AutoRoute Helper not available with Android Studio Giraffe | 2022.3.1 Patch 2 HOT 6
- system "back" button close app in nested navigation HOT 4
- [Question] Shouldn't usesPathAsKey work in this case ? HOT 8
- AutoTabsRouter caches the pages. HOT 3
- Widget Inspector Error with Wildcard RedirectRoute HOT 2
- resolver.next(true) in Guard, on browser refresh pushes to initial route
- Route Arguments are always null inside AutoRouterObserver when using navigateNamed HOT 1
- AppBar back button disappears when pressing F5 on a web page
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from auto_route_library.