loadUiImage static method

Future<Image> loadUiImage(
  1. String path, {
  2. required int width,
  3. required int height,
  4. bool fromAsset = true,
})

Implementation

static Future<ui.Image> loadUiImage(
  String path, {
  required int width,
  required int height,
  bool fromAsset = true,
}) async {
  final Uint8List data = fromAsset ? await _readAssetByte(path) : await _readFileByte(path);
  return toImage(data, width: width, height: height);
}