fromFile static method

Future<Image> fromFile(
  1. String path, {
  2. String? reference,
})

Reads the PNG or JPEG file at path.

Implementation

static Future<Image> fromFile(String path, {String? reference}) async =>
    Image(await File(path).readAsBytes(), reference: reference);