Flutter qrImage convert to Image
问题 I'm using qr_flutter to create QrImage. It's ok but I would like to convert QrImage into image in order to create a PDF file to print on the printer. Please kindly help! QrImage( data: qrString, size: 300.0, version: 10, backgroundColor: Colors.white, ), 回答1: Use a RepaintBoundary widget with a key to export the widget to a a b64 string which then you can export as an image. Example: Future<Uint8List> _getWidgetImage() async { try { RenderRepaintBoundary boundary = _renderObjectKey