FloatingBottomNavigationBar constructor

const FloatingBottomNavigationBar({
  1. Key? key,
  2. NavigationBarStyle style = NavigationBarStyle.classic,
  3. double? height = 90,
  4. required List<Widget> pages,
  5. required ValueNotifier<int> currentPage,
  6. List<Color>? color,
  7. Color? backgroundColor,
  8. List<String>? labels,
  9. List<IconData>? icons,
  10. bool withAppBar = true,
  11. List<IconData>? selectedIcons,
})

Creates a FloatingBottomNavigationBar widget.

The pages and currentPage parameters are required.

Implementation

const FloatingBottomNavigationBar({
  super.key,
  this.style = NavigationBarStyle.classic,
  this.height = 90,
  required this.pages,
  required this.currentPage,
  this.color,
  this.backgroundColor,
  this.labels,
  this.icons,
  this.withAppBar = true,
  this.selectedIcons,
}) : assert(pages.length > 1 &&
          (style == NavigationBarStyle.classic
              ? icons != null && labels != null
              : (style == NavigationBarStyle.icons
                  ? icons != null
                  : (style == NavigationBarStyle.texts
                      ? labels != null
                      : false))));