fromBytes method
bytes
- the loaded bytes of the file
Implementation
@override
Future<ImageElement?> fromBytes(Uint8List bytes) async{
String cacheName = String.fromCharCodes(bytes).toString().substring(0,50);
final cached = Cache.get(cacheName);
if (cached != null) {
manager.itemStart(cacheName);
manager.itemEnd(cacheName);
return cached;
}
final resp = await processImage(bytes,null,flipY);
Cache.add(cacheName,resp);
return resp;
}