load method

Future<void> load(
  1. List<String> asins, {
  2. ImageSize imageSize = ImageSize.Middle,
})

Implementation

Future<void> load(List<String> asins,
    {ImageSize imageSize = ImageSize.Middle}) async {
  List<Future<void>> futures = [];
  for (String asin in asins) {
    AmazonImage image = AmazonImage(
      asin,
      imageSize: imageSize,
    );
    NetworkImage networkImage = NetworkImage(image.getImageUrl());
    var future = precacheImage(networkImage, context);
    futures.add(future);
    _holder[asin] = networkImage;
  }

  await Future.wait(futures);
}