BottomNavScaffold constructor

const BottomNavScaffold({
  1. Key? key,
  2. required List<NavBarScreenModel> pages,
  3. List<NavBarItem>? navBarItems,
  4. Widget? bottomNavigationBar,
  5. Color? selectedItemColor,
  6. Color? unselectedItemColor,
  7. Color? backgroundColor,
  8. BottomNavigationBarType navBarType = BottomNavigationBarType.fixed,
  9. PreferredSizeWidget? appBar,
  10. Widget? floatingActionButton,
  11. FloatingActionButtonLocation? floatingActionButtonLocation,
  12. Widget? drawer,
  13. Future<bool> onWillPop()?,
  14. bool switchToFirstTabOnBack = true,
  15. bool doubleBackToExit = false,
  16. Duration exitTimeout = const Duration(seconds: 2),
  17. String? exitMessage,
  18. TextStyle? selectedLabelStyle,
  19. TextStyle? unselectedLabelStyle,
  20. bool? showSelectedLabels,
  21. bool? showUnselectedLabels,
  22. 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',
      );