ImageDescriptor

raw

await

ui

ImmutableBuffer

fromUint8List

correctedImage

),

width:

width

height:

height

pixelFormat:

ui

PixelFormat

rgba8888

);

return

await

await

descriptor

instantiateCodec

())

getNextFrame

())

image

A trickier situation is when you’re writing a library,
and you want this library to work on both the most recent Flutter
and a pre-patch one.
In that case, you can decide whether the behavior has been changed
by letting it decode a single pixel first.