build method
Returns a widget that wraps a content of navigator's destinations.
Implementation
@override
Widget build(BuildContext context, NavigationController navigator) {
final currentDestination = navigator.currentDestination;
return _TabsNavigationWrapper(
tabs: tabs,
// TODO: This implementation doesn't respect the possible parameters of destinations (excluding current destination).
// How this could be resolved?
tabDestination: (tabIndex) => navigator.destinations[tabIndex],
onTabSelected: (index) => navigator.goTo(navigator.destinations[index]),
selectedIndex: navigator.destinations.indexOf(currentDestination),
parameters: parameters,
appBarParameters:
appBarParametersBuilder?.call(context, currentDestination),
wrapInScaffold: wrapInScaffold,
);
}