YaruPageIndicator constructor
YaruPageIndicator({
- Key? key,
- required int length,
- required int page,
- ValueChanged<
int> ? onTap, - MouseCursor? mouseCursor,
- YaruPageIndicatorTextBuilder? textBuilder,
- TextStyle? textStyle,
- double? dotSize,
- double? dotSpacing,
- Duration? animationDuration,
- 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;
}