rebuildWhere method
Rebuild only the pages that are true
in test
.
Normally, you should check if you want to rebuild based on the page name.
context.rebuildWhere((page) {
return page.routeSettings?.name == "/";
});
Basically, do not use it.
Use this only if you want to force a rebuild.
Implementation
@override
void rebuildWhere(bool Function(PageState page) test) {
PageState._pageStack.where(test).forEach((element) => element.rebuild());
}