capturePng2List method
Implementation
Future<Uint8List?> capturePng2List(RenderRepaintBoundary boundary) async {
ui.Image image = await boundary.toImage(pixelRatio: 3.0);
ByteData? byteData = await image.toByteData(format: ui.ImageByteFormat.png);
Uint8List? pngBytes = byteData?.buffer.asUint8List();
return pngBytes;
}