defaultFileProviderFactory function

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

default ImageProviderFactory implementation of ImageType.file

Implementation

ImageProvider? defaultFileProviderFactory(Uri uri, ImageProviderParams params) {
  return KrakenResizeImage.resizeIfNeeded(
    params.cachedWidth,
    params.cachedHeight,
    params.objectFit,
    FileImage((params as FileImageProviderParams).file)
  );
}