renderToRawImageData method
Implementation
Future<RawImageData> renderToRawImageData(double width, double height) async {
final recorder = renderToPictureRecorder(width, height);
var rawImageData = (await (await recorder.endRecording().toImage(width.toInt(), height.toInt())).toByteData(format: ImageByteFormat.rawRgba))!.buffer.asUint8List();
return RawImageData(rawImageData, width.toInt(), height.toInt());
}