Comments (4)
I misunderstood homeIndex with activeIndex. so I close this issue.
from auto_route_library.
@mhbdev Yup this is common, did you figure out how to set initial tab dynamically?
from auto_route_library.
@mhbdev Yup this is common, did you figure out how to set initial tab dynamically?
Yes, I tried to setActiveIndex after the first build, but no I have no idea how to this dynamically.
from auto_route_library.
@mhbdev You need to think about tab routes as nested routes, how do you set an initial nested r route? you do it when navigating to the parent /parent/target child.
If your tab host page is the initial page you could do it like follows:
routerConfig: _rootRouter.config(
deepLinkBuilder: (deepLink){
/// You don't want to override deep-links so
/// check if the there's no deep link first
if(deepLink.path == DeepLink.defaultPath){
return DeepLink(TabHostRoute(children: [TargetTab()]));
}
return deepLink;
}
),
from auto_route_library.
Related Issues (20)
- Pass parameter List Record type support
- How to determine different instances of a page in AutoRouterObserver HOT 2
- Nested route push same page multi times but not work HOT 6
- Generated router file `.gr.dart` not consistent across multiple machines HOT 6
- QUESTION : Guards Flutter Web HOT 6
- Error split view flutter web HOT 3
- deepLinkBuilder not called on android HOT 1
- Unable to make widget tests pass with auto_route and getIt HOT 3
- Uri percent-encoded characters encoded twice HOT 1
- Undefined class 'CustomPage'. HOT 1
- Pages keep on Navigating to Top Router Page HOT 3
- Deeplinking not working with nested AutoTabsRouter HOT 2
- AutoRouteModule part builder don't recognize `part 'xxxx.gm.dart'`
- The named parameter 'onResult' isn't defined. HOT 1
- Unable to perform widget test with AutoTabsScaffold HOT 1
- Error When using Widget Inspector With AutoRouter HOT 4
- StackRouter.pushAndPopUntil does not work with nested tab-routes HOT 2
- [Question] complex example with auto_route HOT 5
- Multi package project - routes.gr.dart not generating HOT 7
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.