RollingNavBar.builder constructor

RollingNavBar.builder(
  1. {@required RollingNavBarChildBuilder builder,
  2. @required int numChildren,
  3. List<Color> activeBadgeColors,
  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> indicatorColors = const <Color>[Colors.black],
  10. double indicatorCornerRadius = 10,
  11. double indicatorRadius = 25,
  12. int indicatorSides = 6,
  13. BoxDecoration navBarDecoration,
  14. dynamic onAnimate(
    1. AnimationUpdate
    ),
  15. dynamic onTap(
    1. int
    ),
  16. double sidesPerListItem}
)

Implementation

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