TabShellAppRouterDelegate constructor
TabShellAppRouterDelegate({
- required List<
TabDefinition> tabs, - required TabController tabController,
- double? appBarMaxWidth,
- Widget? logo,
Create delegate with navigation controller which contains state of current page.
Implementation
TabShellAppRouterDelegate({
required this.tabs,
required this.tabController,
this.appBarMaxWidth,
this.logo,
}) {
_navigatorKey = GlobalKey<NavigatorState>();
// Listen tab changes to update url with route information parser
tabController.addListener(() {
// Notify changes only if current tab index changed
if (tabController.index != _index) {
_index = tabController.index;
notifyListeners();
}
});
}