Comments (5)
Hey @agonzalezpuerta I just tested this and it seems to be working just fine, what navigation operation are you doing that don't trigger a rebuild?
from auto_route_library.
Dear @Milad-Akarie,
Thanks for the quick reply. Let me try to give you the full context. Any idea of what could be going wrong?
BTW, we reached you via Twitter. Will send you an email shortly.
The navigation is done using the push method on the nearest router, which in this example should be ProfileRouter
. The method is triggered from a page in such router (ProfileLandingRoute
)
context.router.push( const PersonalInfoRoute());
The nested routers are passed in the routes
parameter of the AutoTabsScaffold
:
return AutoTabsScaffold(
appBarBuilder: (context, tabsRouter) => AppBar(
leading: const AutoLeadingButton(
ignorePagelessRoutes: true,
),
routes: const [
OneRouter(),
AnotherRouter(),
ProfileRouter(),
],
All this uses the following tree structure:
AutoRoute(
page: HomeRoute.page,
children: [
AutoRoute(
page: OneRouter.page,
children: [
AutoRoute(
page: FooRoute.page,
initial: true,
),
],
),
AutoRoute(
page: AnotherRouter.page,
children: [
AutoRoute(
page: FooFooRoute.page,
initial: true,
),
],
),
AutoRoute(
page: ProfileRouter.page,
maintainState: false,
children: [
AutoRoute(
page: ProfileLandingRoute.page,
initial: true,
),
AutoRoute(
page: PersonalInfoRoute.page,
),
],
),
],
),
// ............
@RoutePage(name: 'OneRouter')
class OneRouterPage extends AutoRouter {
const OneRouterPage({super.key});
}
@RoutePage(name: 'AnotherRouter')
class AnotherRouterPage extends AutoRouter {
const AnotherRouterPage({super.key});
}
@RoutePage(name: 'ProfileRouter')
class ProfileRouterPage extends AutoRouter {
const ProfileRouterPage({super.key});
}
from auto_route_library.
@agonzalezpuerta your setup looks seems fine to me, not sure what's happening, could you try using appBar property instead of appBarBuilder?
from auto_route_library.
Dear Milad,
Thanks for the reply and your time. We found it was a bug on our end while setting up the top-most routes. Our app has an "entry point" that is intended to replace all routes depending on login status. We were using context.router.replace
instead of context.router.replaceAll
.
By the way, as per your last answer, how do you access the appBar
property in AutoTabsScaffold
? We noticed it is not available. Not sure what you meant exactly.
Thanks again.
from auto_route_library.
@agonzalezpuerta My bad, I thought appBar was exposed, now I'm thinking it should be exposed!
from auto_route_library.
Related Issues (20)
- 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
- Can't register AutoRoute v6 with GetIt HOT 2
- TabsRouter: updating `homeIndex` has no effect
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.