loadImageByFile method

Future<Image> loadImageByFile(
  1. File file, {
  2. int? width,
  3. int? height,
})

通过文件读取Image

Implementation

Future<ui.Image> loadImageByFile(
  File file, {
  int? width,
  int? height,
}) async {
  var list = await file.readAsBytes();
  return loadImageByUint8List(list, width: width, height: height);
}