defaultNetworkProviderFactory function
default ImageProviderFactory implementation of ImageType.network
Implementation
ImageProvider defaultNetworkProviderFactory(
Uri uri, ImageProviderParams params) {
NetworkImage networkImage = NetworkImage(uri.toString(), headers: {
HttpHeaders.userAgentHeader: NavigatorModule.getUserAgent(),
HttpHeaderContext:
(params as CachedNetworkImageProviderParams).contextId.toString(),
});
return KrakenResizeImage.resizeIfNeeded(
params.cachedWidth,
params.cachedHeight,
params.objectFit,
networkImage
);
}