paintActiveIndicators method
dynamic
paintActiveIndicators()
override
Implementation
@override
paintActiveIndicators(Canvas canvas, Size size, Paint paint, Path path) {
final Offset offset =
Offset(netDragPercent * pagesLength * (this.width + space), 0.0);
path.moveTo(offset.dx, offset.dy);
path.lineTo(offset.dx, offset.dy + this.width);
path.lineTo(offset.dx + this.width, (offset.dy + this.width) / 2);
path.close();
canvas.drawPath(path, paint);
if (showAllActiveIndicators) {
Offset offset2 = Offset.zero;
for (int i = 0; i <= currentPageIndex; i++) {
path.moveTo(offset2.dx, offset2.dy);
path.lineTo(offset2.dx, offset2.dy + width);
path.lineTo(offset2.dx + width, (offset2.dy + width) / 2);
path.close();
offset2 = Offset(offset2.dx + width + space, 0.0);
}
canvas.drawPath(path, paint);
}
}