load method

  1. @override
ImageStreamCompleter load(
  1. BoxFitImageKey key,
  2. dynamic decode
)

Implementation

@override
ImageStreamCompleter load(BoxFitImageKey key, DecoderCallback decode) {
  return MultiFrameImageStreamCompleter(
    codec: _instantiateImageCodec(key.descriptor,
      boxFit: boxFit,
      preferredWidth: key.configuration?.size?.width.toInt(),
      preferredHeight: key.configuration?.size?.height.toInt(),
    ),
    scale: key.scale,
    informationCollector: () {
      return <DiagnosticsNode>[
        DiagnosticsProperty<ImageProvider>('Image provider', this),
        DiagnosticsProperty<BoxFitImageKey>('Image key', key),
      ];
    },
  );
}