decodeImageFile method
Implementation
Future<Image> decodeImageFile(File file) async {
final bytes = await file.readAsBytes();
final image = decodeImage(bytes);
if (image == null) {
throw 'Could not decode image ${file.path}';
}
return image;
}