draw method
void
draw()
override
This method will get body to class extending BasePainter and this method will draw the sliding indicator which slide over changing index.
Implementation
@override
void draw(Canvas canvas, double space, double width, double height,
double radius, double cornerRadius) {
canvas.drawRRect(
RRect.fromRectAndRadius(
Rect.fromCenter(
center: Offset(radius + (page * (width + space)), radius),
width: width,
height: height),
Radius.circular(cornerRadius)),
_paint);
}