FloatyNavyBar constructor

FloatyNavyBar({
  1. Key? key,
  2. required List<NavyBarItem> items,
  3. required ValueChanged<int> onChanged,
  4. required double barHeight,
  5. required bool opacityAnimation,
  6. bool? offstage,
  7. Color? iconColor,
  8. double? iconSize,
  9. TextStyle? textStyle,
  10. Color? backgroundColor,
  11. Color indicatorColor = Colors.black,
  12. double indicatorHeight = 5.0,
  13. double indicatorWidth = 8.0,
  14. double itemWidth = 70,
})

Implementation

FloatyNavyBar({
  Key? key,
  required this.items,
  required this.onChanged,
  required this.barHeight,
  required this.opacityAnimation,
  this.offstage,
  this.iconColor,
  this.iconSize,
  this.textStyle,
  this.backgroundColor,
  this.indicatorColor = Colors.black,
  this.indicatorHeight = 5.0,
  this.indicatorWidth = 8.0,
  this.itemWidth = 70,
})  : assert(items.length > 1 && items.length < 5,
          "\n******\n NavBarItems can't contain only 1 item and can't exceed 4 items \n******\n"),
      assert(
        indicatorWidth <= 15 || indicatorHeight <= 15,
        "\n******\n Too much height given to tab indicator \n******\n",
      ),
      super(key: key);