qlevar_router
qlevar_router copied to clipboard
Some Pages Become Static and Will Never Refresh or Update With New Data
class AppRoutes {
List<QRoute> routes = [
QRoute(
pageType: const QFadePage(
transitionDuration: Duration(milliseconds: 100),
reverseTransitionDuration: Duration(milliseconds: 100)),
path: routesPath[0],
builder: () => HomePageListview(title: pages[0])),
// middleware: [DeferredLoader(page1.loadLibrary)]),
QRoute(
pageType: const QFadePage(
transitionDuration: Duration(milliseconds: 100),
reverseTransitionDuration: Duration(milliseconds: 100)),
path: routesPath[5],
builder: () => page6.DatabaseManagement(title: pages[5]),
middleware: [DeferredLoader(page6.loadLibrary)]),
QRoute(
pageType: const QFadePage(
transitionDuration: Duration(milliseconds: 100),
reverseTransitionDuration: Duration(milliseconds: 100)),
path: routesPath[9],
builder: () => page10.LoginPage(title: pages[9]),
middleware: [DeferredLoader(page10.loadLibrary)]),
];
}
the "/" root page, which is the first entry, became cache and static after using qlever_route. When clicking on the menu to go home page, it never enter into the homepage widget at all until manually refresh the browser.
what could be the caused? `
@tabletpad How do you navigate to the HomePage. If the homePage was already in the stack, the router will not rebuild it agian. To force the rebuild use
QR.to('Page Path', pageAlreadyExistAction: PageAlreadyExistAction.Remove);
// or
QR.navigator.replaceAll('Page path');