BottomNavScaffold constructor
const
BottomNavScaffold({
- Key? key,
- required List<
NavBarScreenModel> pages, - Color? selectedItemColor,
- Color? unselectedItemColor,
- Color? backgroundColor,
- PreferredSizeWidget? appBar,
- Widget? floatingActionButton,
- FloatingActionButtonLocation? floatingActionButtonLocation,
- Widget? drawer,
- Future<
bool> onWillPop()?, - bool switchToFirstTabOnBack = true,
- bool doubleBackToExit = false,
- Duration exitTimeout = const Duration(seconds: 2),
- String? exitMessage,
- TextStyle? selectedLabelStyle,
- TextStyle? unselectedLabelStyle,
- bool? showSelectedLabels,
- bool? showUnselectedLabels,
- bool preservePageState = true,
Implementation
const BottomNavScaffold({
super.key,
required this.pages,
this.navBarItems,
this.bottomNavigationBar,
this.selectedItemColor,
this.unselectedItemColor,
this.backgroundColor,
this.navBarType = BottomNavigationBarType.fixed,
this.appBar,
this.floatingActionButton,
this.floatingActionButtonLocation,
this.drawer,
this.onWillPop,
this.switchToFirstTabOnBack = true,
this.doubleBackToExit = false,
this.exitTimeout = const Duration(seconds: 2),
this.exitMessage,
this.selectedLabelStyle,
this.unselectedLabelStyle,
this.showSelectedLabels,
this.showUnselectedLabels,
this.preservePageState = true,
}) : assert(
bottomNavigationBar != null || navBarItems != null,
'Either navBarItems or bottomNavigationBar must be provided',
);