ImageDecoderCallback typedef

ImageDecoderCallback = Future<Codec> Function(ImmutableBuffer buffer, {TargetImageSizeCallback? getTargetSize})

Performs the decode process for use in ImageProvider.loadImage.

This callback allows decoupling of the getTargetSize parameter from implementations of ImageProvider that do not expose it.

See also:

  • ResizeImage, which uses this to load images at specific sizes.


typedef ImageDecoderCallback = Future<ui.Codec> Function(
  ui.ImmutableBuffer buffer, {
  ui.TargetImageSizeCallback? getTargetSize,