decodeWithCheck static method
Implementation
static Image decodeWithCheck(Uint8List bytes) {
Image? image = decodeImage(bytes);
// image.set
if (image == null) {
throw StateError("No image can be decoded from input data.");
}
return image;
}