imageFromId function

FileImage? imageFromId(
  1. String storageId
)

文件图像, 从Storage ID获取图像 >>>

Implementation

FileImage? imageFromId(String storageId) {
  String destPath = FilePath().imageFilename(storageId);
  print('load image from -> $destPath');
  File file = File(destPath);
  if (file.existsSync()) {
    return FileImage(file);
  } else {
    print('image file not exists!');
    return null;
  }
}