YaruPageIndicator constructor

YaruPageIndicator({
  1. Key? key,
  2. required int length,
  3. required int page,
  4. ValueChanged<int>? onTap,
  5. MouseCursor? mouseCursor,
  6. YaruPageIndicatorTextBuilder? textBuilder,
  7. TextStyle? textStyle,
  8. double? dotSize,
  9. double? dotSpacing,
  10. Duration? animationDuration,
  11. Curve? animationCurve,
})

Create a YaruPageIndicator.

Implementation

YaruPageIndicator({
  super.key,
  required this.length,
  required this.page,
  this.onTap,
  this.mouseCursor,
  this.textBuilder,
  this.textStyle,
  double? dotSize,
  double? dotSpacing,
  this.animationDuration,
  this.animationCurve,
})  : assert(page >= 0 && page <= length - 1),
      itemBuilder = null {
  itemSizeBuilder =
      dotSize != null ? (_, __, ___) => Size.square(dotSize) : null;
  layoutDelegate = dotSpacing != null
      ? YaruPageIndicatorSteppedDelegate(baseItemSpacing: dotSpacing)
      : null;
}