decodeImageFile method

Future<Image> decodeImageFile(
  1. File file
)

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;
}