load method Null safety

  1. @protected
  2. @Deprecated('Implement loadBuffer for faster image loading. ' 'This feature was deprecated after v2.13.0-1.0.pre.')
ImageStreamCompleter load(
  1. T key,
  2. DecoderCallback decode
)
Deprecated('Implement loadBuffer for faster image loading. ' 'This feature was deprecated after v2.13.0-1.0.pre.')">@Deprecated('Implement loadBuffer for faster image loading. ' 'This feature was deprecated after v2.13.0-1.0.pre.')protected">@protected

Converts a key into an ImageStreamCompleter, and begins fetching the image.

This method is deprecated. Implement loadBuffer for faster image loading. Only one of load and loadBuffer must be implemented, and loadBuffer is preferred.

The decode callback provides the logic to obtain the codec for the image.

See also:

  • ResizeImage, for modifying the key to account for cache dimensions.

Implementation

@protected
@Deprecated(
  'Implement loadBuffer for faster image loading. '
  'This feature was deprecated after v2.13.0-1.0.pre.',
)
ImageStreamCompleter load(T key, DecoderCallback decode) {
  throw UnsupportedError('Implement loadBuffer for faster image loading');
}