Untitled
unknown
plain_text
2 years ago
789 B
11
Indexable
return WillPopScope(
onWillPop: () async {
if (widget.items[_selectedTab].navigatorkey?.currentState?.canPop() ?? false) {
widget.items[_selectedTab].navigatorkey?.currentState?.pop();
return false;
} else {
return true;
}
},
child: Scaffold(
body: IndexedStack(
key: use,
index: _selectedTab,
children: widget.items
.map((page) => Navigator(
key: page.navigatorkey,
onGenerateInitialRoutes: (navigator, initialRoute) {
return [MaterialPageRoute(builder: (context) => page.tab)];
},
))
.toList(),
),
bottomNavigationBar: SizedBox(
Editor is loading...