pixelsInUint8 method
Helper method to retrieve the pixel data of the image as a Uint8List.
Pixel order used the ImageByteFormat.rawRgba meaning it is: R G B A.
Implementation
Future<Uint8List> pixelsInUint8() async {
return (await toByteData())!.buffer.asUint8List();
}