draw method

  1. @override
void draw(
  1. Canvas canvas,
  2. double space,
  3. double size,
  4. double radius,
)
override

Implementation

@override
void draw(Canvas canvas, double space, double size, double radius) {
  double progress = page - index;
  double dropHeight = widget.dropHeight;
  double rate = (0.5 - progress).abs() * 2;
  double scale = widget.scale;

  //lerp(begin, end, progress)

  canvas.drawCircle(
      new Offset(radius + ((page) * (size + space)),
          radius - dropHeight * (1 - rate)),
      radius * (scale + rate * (1.0 - scale)),
      _paint);
}