toPicture method

Picture toPicture(
  1. double size
)

Returns a ui.Picture object containing the QR code data.

Implementation

ui.Picture toPicture(double size) {
  final recorder = ui.PictureRecorder();
  final canvas = Canvas(recorder);
  paint(canvas, Size(size, size));
  return recorder.endRecording();
}