createPainter method
Method to create custom painter
Implementation
@override
CustomPainter createPainter({
required Color color,
required double animationValue,
required double strokeWidth,
}) {
// Rocking: -angle -> +angle -> -angle
// sin wave
final angle =
math.sin(animationValue * math.pi * 2) * 0.05; // Small rotation
return BusFrontPainter(
color: color,
angle: angle,
strokeWidth: strokeWidth,
);
}