-
Notifications
You must be signed in to change notification settings - Fork 802
Closed
Description
Sorry in advance if this is not the place to ask questions.
I was just looking at your Router code to learn more about how you do things with navigator 2.0.
class TabbedRouterController extends RouterController<NavState1> {
TabbedRouterController(NavState1 state) : super(state);
void showTopPage(String value) => state = state.copyWith(topPage: value);
void changeTab(int value) => state = state.copyWith(selectedTab: value);
@override
List<Page> buildPages() {
return [
// The main view that handles switching tabs based on the .selectedTab (using Provider to bind)
_AppPage("main", ExampleTabScaffold()),
// Add full screen page on top of our main tab view?
if (state.topPage == NavState1.settingsPageLink) ...[
_AppPage(NavState1.settingsPageLink, FullScreenView("SETTINGS")),
] else if (state.topPage == NavState1.profilePageLink) ...[
_AppPage(NavState1.profilePageLink, FullScreenView("SIGNUP")),
]
];
}
I was just wondering, if the only way to present a full screen view is within the top level navigator?
E.g. if i had a nested navigator, and wanted that nested navigator to present a full screen view it wouldn't work right?
Metadata
Metadata
Assignees
Labels
No labels