UIProBottomNav.fluid constructor

UIProBottomNav.fluid({
  1. Key? key,
  2. required List<UIProBottomNavItem> items,
  3. required int currentIndex,
  4. required ValueChanged<int> onChanged,
  5. Color? backgroundColor,
  6. Color? selectedColor,
  7. Color? unselectedColor,
  8. double animationFactor = 1.0,
  9. double scaleFactor = 1.2,
})

Creates a fluid bottom navigation bar with wave animation.

Example:

UIProBottomNav.fluid(
  items: [
    UIProBottomNavItem(icon: Icons.home, label: "Home"),
    UIProBottomNavItem(icon: Icons.search, label: "Search"),
    UIProBottomNavItem(icon: Icons.person, label: "Profile"),
  ],
  currentIndex: selectedIndex,
  onChanged: (index) => setState(() => selectedIndex = index),
)

Implementation

factory UIProBottomNav.fluid({
  Key? key,
  required List<UIProBottomNavItem> items,
  required int currentIndex,
  required ValueChanged<int> onChanged,
  Color? backgroundColor,
  Color? selectedColor,
  Color? unselectedColor,
  double animationFactor = 1.0,
  double scaleFactor = 1.2,
}) {
  return _UIProFluidBottomNavWrapper(
    key: key,
    items: items,
    currentIndex: currentIndex,
    onChanged: onChanged,
    backgroundColor: backgroundColor,
    selectedColor: selectedColor,
    unselectedColor: unselectedColor,
    animationFactor: animationFactor,
    scaleFactor: scaleFactor,
  );
}