instantiateImageCodec method
Override this method, so that you can handle raw image data, for example, compress
Implementation
Future<ui.Codec> instantiateImageCodec(
Uint8List data,
ImageDecoderCallback decode,
) async {
if (cacheRawData) {
rawImageDataMap[this] = data;
}
final ui.ImmutableBuffer buffer =
await ui.ImmutableBuffer.fromUint8List(data);
return await decode(buffer);
}