load method

Future<Image> load(
  1. String fileName, {
  2. String? key,
})

Loads the specified image with fileName into the cache. By default the key in the cache is the fileName, if another key is desired, specify the optional key argument.

Implementation

Future<Image> load(String fileName, {String? key}) {
  return (_assets[key ?? fileName] ??=
          _ImageAsset.future(_fetchToMemory(fileName)))
      .retrieveAsync();
}