TranslucentNavigationBar constructor

TranslucentNavigationBar({
  1. Key? key,
  2. required List<TranslucentNavigationBarItem> items,
  3. Color selectedColor = Colors.black,
  4. Color unselectedColor = Colors.black26,
  5. required int selectedIndex,
  6. Color mainIconBackgroundColor = Colors.blue,
  7. Color mainIconColor = Colors.white,
  8. required dynamic onTap(
    1. int
    )?,
  9. dynamic onMainIconTap()?,
  10. double height = 75.0,
  11. double borderRadius = 40.0,
  12. double blur = 20.0,
  13. TranslucentNavigationBarItem? mainTranslucentNavigationBarItem,
  14. double verticalPadding = 25.0,
  15. double horizontalPadding = 20.0,
})

Implementation

TranslucentNavigationBar({
  Key? key,
  required this.items,
  this.selectedColor = Colors.black,
  this.unselectedColor = Colors.black26,
  required this.selectedIndex,
  this.mainIconBackgroundColor = Colors.blue,
  this.mainIconColor = Colors.white,
  required this.onTap,
  this.onMainIconTap,
  this.height = 75.0,
  this.borderRadius = 40.0,
  this.blur = 20.0,
  this.mainTranslucentNavigationBarItem,
  this.verticalPadding = 25.0,
  this.horizontalPadding = 20.0,
})  : assert(items.length >= 2),
      assert(items.length <= 6),
      assert(mainTranslucentNavigationBarItem != null
          ? items.length.isEven
          : items.isNotEmpty);