drawLensFrame method

void drawLensFrame(
  1. Canvas canvas,
  2. Size viewportSize
)

Draws the circular lens frame for VR headset simulation.

Implementation

void drawLensFrame(Canvas canvas, Size viewportSize) {
  final center = Offset(viewportSize.width / 2, viewportSize.height / 2);
  final radius = min(viewportSize.width, viewportSize.height) * 0.48;

  canvas.drawCircle(
    center,
    radius,
    Paint()
      ..color = const Color(0xCC000000)
      ..style = PaintingStyle.stroke
      ..strokeWidth = 3,
  );
}