decodeImageFile function

Future<Image?> decodeImageFile(
  1. String filePath
)

Implementation

Future<Image?> decodeImageFile(String filePath) async {
  final image = decodeImage(await File(filePath).readAsBytes());
  if (image == null) {
    throw NoDecoderForImageFormatException(filePath);
  }
  return image;
}