renderToRawImageData method

Future<RawImageData> renderToRawImageData(
  1. double width,
  2. double height
)

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());
}