paintIcon method
void
paintIcon(
- Canvas canvas
)
Implementation
void paintIcon(Canvas canvas) {
var step = innerRect.height / 3;
var topLine = RRect.fromLTRBR(innerRect.left, innerRect.top,
innerRect.right, innerRect.top + step, Radius.circular(step / 2));
var bottomLine = RRect.fromLTRBR(innerRect.left, innerRect.top + step * 2,
innerRect.right, innerRect.bottom, const Radius.circular(4));
var topIconPath = Path()..addRRect(topLine);
var bottomIconPath = Path()..addRRect(bottomLine);
canvas.translate(-5, outerRect.height / 2);
canvas.rotate(-maxRotationRadians * animationStep);
canvas.drawPath(topIconPath, paintObject);
canvas.rotate(maxRotationRadians * 2 * animationStep);
canvas.translate(0, -outerRect.height);
canvas.drawPath(bottomIconPath, paintObject);
}