decodeImageFile function

Image? decodeImageFile(
  1. String filePath
)

Decode image file

Implementation

Image? decodeImageFile(String filePath) {
  final image = decodeImage(File(filePath).readAsBytesSync());
  if (image == null) {
    throw NoDecoderForImageFormatException(filePath);
  }
  return image;
}