BottomNavPage constructor

const BottomNavPage({
  1. Key? key,
  2. required List<TabItem> tabs,
  3. required List<Widget> pages,
  4. int index = 0,
  5. ValueChanged<int>? onTap,
  6. PreferredSizeWidget? appBar,
  7. Widget? floatingActionButton,
  8. FloatingActionButtonLocation? floatingActionButtonLocation,
  9. Widget? drawer,
  10. DrawerCallback? onDrawerChanged,
  11. BottomNavigationBarThemeData? data,
})

Implementation

const BottomNavPage(
    {Key? key,
    required this.tabs,
    required this.pages,
    int index = 0,
    this.onTap,
    this.appBar,
    this.floatingActionButton,
    this.floatingActionButtonLocation,
    this.drawer,
    this.onDrawerChanged,
    BottomNavigationBarThemeData? data})
    : assert(tabs.length == pages.length),
      assert(tabs.length >= 2 && pages.length >= 2),
      assert(index < tabs.length && index >= 0),
      themeData = data ??
          const BottomNavigationBarThemeData(
              showSelectedLabels: true,
              showUnselectedLabels: true,
              selectedLabelStyle: TextStyle(fontSize: 12),
              unselectedLabelStyle: TextStyle(fontSize: 12),
              type: BottomNavigationBarType.fixed,
              elevation: 5),
      currentIndex = index,
      super(key: key);