drawRotatedSquare method
void
drawRotatedSquare({})
Draws a Square Image rotated at offset around it's axis
Implementation
void drawRotatedSquare(
{required Canvas canvas,
required double size,
required Offset offset,
required double rotation,
required Paint paint,
bool flip = false}) {
canvas
..save()
..translate(offset.dx, offset.dy);
if (flip) {
canvas.scale(-1, 1);
}
canvas
..rotate(flip ? -rotation : rotation)
..scale(size)
..drawImageRect(this, bounds(), kTargetRect, paint)
..restore();
}