bytesToImage static method

Future<Image> bytesToImage(
  1. Uint8List imgBytes
)

Implementation

static Future<Image> bytesToImage(Uint8List imgBytes) async {
  Codec codec = await instantiateImageCodec(imgBytes);
  FrameInfo frame;
  try {
    frame = await codec.getNextFrame();
  } finally {
    codec.dispose();
  }
  return frame.image;
}