defaultCachedProviderFactory function

ImageProvider<Object> defaultCachedProviderFactory(
  1. Uri uri,
  2. ImageProviderParams params
)

default ImageProviderFactory implementation of ImageType.cached

Implementation

ImageProvider defaultCachedProviderFactory(
    Uri uri, ImageProviderParams params) {
  return KrakenResizeImage.resizeIfNeeded(
    params.cachedWidth,
    params.cachedHeight,
    params.objectFit,
    CachedNetworkImage(uri.toString(),
        contextId: (params as CachedNetworkImageProviderParams).contextId)
  );
}