DecoderBufferCallback typedef

  1. @Deprecated('Use ImageDecoderCallback with ImageProvider.loadImage instead. ' 'This feature was deprecated after v3.7.0-1.4.pre.')
DecoderBufferCallback = Future<Codec> Function(ImmutableBuffer buffer, {bool allowUpscaling, int? cacheHeight, int? cacheWidth})

Performs the decode process for use in ImageProvider.loadBuffer.

This callback allows decoupling of the cacheWidth, cacheHeight, and allowUpscaling parameters from implementations of ImageProvider that do not expose them.

See also:

  • ResizeImage, which uses this to override the cacheWidth, cacheHeight, and allowUpscaling parameters.

Implementation

@Deprecated(
  'Use ImageDecoderCallback with ImageProvider.loadImage instead. '
  'This feature was deprecated after v3.7.0-1.4.pre.',
)
typedef DecoderBufferCallback = Future<ui.Codec> Function(ui.ImmutableBuffer buffer, {int? cacheWidth, int? cacheHeight, bool allowUpscaling});