AnimatedBottomNavigationBar constructor

AnimatedBottomNavigationBar({
  1. Key? key,
  2. double elevation = 3,
  3. int height = 75,
  4. Color? backGroundColor,
  5. Color shadowColor = Colors.black12,
  6. dynamic inactiveColor,
  7. required List<AnimatedNavBarItem> items,
  8. required OnItemSelected onItemSelected,
  9. int currentIndex = 0,
})

Implementation

AnimatedBottomNavigationBar({
  Key? key,
  this.elevation = 3,
  this.height = 75,
  this.backGroundColor,
  this.shadowColor = Colors.black12,
  inactiveColor,
  required this.items,
  required this.onItemSelected,
  this.currentIndex = 0,
})  : inactiveColor = Colors.grey[400]!,
      assert(
        height <= 100,
        "Height can't be greater 100",
      ),
      assert(
        items.isNotEmpty,
        "Items inside AnimatedBottomNavigationBar can't be empty",
      ),
      assert(
        items.length > 1,
        "Items length must be > 1 for AnimatedBottomNavigationBar",
      ),
      assert(
        items.toSet().length == items.length,
        "Navigation bar can't have duplicate items",
      ),
      super(key: key);