convertUIImageToUint8List function

Future<Uint8List?> convertUIImageToUint8List(
  1. Image image
)

Implementation

Future<Uint8List?> convertUIImageToUint8List(ui.Image image) async {
  var byteData = await image.toByteData(format: ui.ImageByteFormat.png);
  return byteData?.buffer.asUint8List();
}