RollingNavBar.iconData constructor

RollingNavBar.iconData(
  1. {@required List<IconData> iconData,
  2. List<Color> activeBadgeColors,
  3. List<Color> activeIconColors,
  4. int activeIndex = 0,
  5. Curve animationCurve = Curves.linear,
  6. AnimationType animationType = AnimationType.roll,
  7. List<Widget> badges,
  8. int baseAnimationSpeed = 200,
  9. List<Color> iconColors = const <Color>[Colors.black],
  10. double iconSize,
  11. List<Widget> iconText,
  12. List<Color> indicatorColors = const <Color>[Colors.pink],
  13. double indicatorCornerRadius = 10,
  14. double indicatorRadius = 25,
  15. int indicatorSides = 6,
  16. BoxDecoration navBarDecoration,
  17. dynamic onAnimate(
    1. AnimationUpdate
    ),
  18. dynamic onTap(
    1. int
    ),
  19. double sidesPerListItem}
)

Implementation

RollingNavBar.iconData({
  @required this.iconData,
  this.activeBadgeColors,
  this.activeIconColors,
  this.activeIndex = 0,
  this.animationCurve = Curves.linear,
  this.animationType = AnimationType.roll,
  this.badges,
  this.baseAnimationSpeed = 200,
  this.iconColors = const <Color>[Colors.black],
  this.iconSize,
  this.iconText,
  this.indicatorColors = const <Color>[Colors.pink],
  this.indicatorCornerRadius = 10,
  this.indicatorRadius = 25,
  this.indicatorSides = 6,
  this.navBarDecoration,
  this.onAnimate,
  this.onTap,
  this.sidesPerListItem,
})  : numChildren = iconData.length,
      builder = null,
      assert(iconText == null || iconText.length == iconData.length),
      assert(indicatorSides > 2),
      assert(activeBadgeColors == null ||
          activeBadgeColors.length == 1 ||
          activeBadgeColors.length == iconData.length),
      assert(activeIconColors == null ||
          activeIconColors.length == 1 ||
          activeIconColors.length == iconData.length),
      assert(badges == null || badges.length == iconData.length),
      assert(iconColors.length == 1 || iconColors.length == iconData.length),
      assert(indicatorColors.length == 1 ||
          indicatorColors.length == iconData.length);