loadImageFromFile function

Future<Image> loadImageFromFile(
  1. String path
)

从文件系统加载图片(不支持 Web 平台)

Implementation

Future<ui.Image> loadImageFromFile(String path) async {
  final Uint8List bytes = await readFileAsBytes(path);
  return decodeImageFromBytes(bytes);
}