DecoderCallback typedef

Future<Codec> DecoderCallback (
  1. Uint8List bytes,
  2. {int cacheWidth,
  3. int cacheHeight}

Performs the decode process for use in ImageProvider.load.

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

See also:

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


typedef DecoderCallback = Future<ui.Codec> Function(Uint8List bytes, {int cacheWidth, int cacheHeight});