readyImageProvider method
ImageProvider<Object>
readyImageProvider({
- required String path,
- Uri resolveUrl(
- String path
- ImageRenderMethodForWeb? imageRenderMethodForWeb,
- int? maxHeight,
- int? maxWidth,
- double scale = 1.0,
- String? cacheKey,
- HeadersCallBack? headers,
- BaseCacheManager? cacheManager,
create ImageProvider with respect of global config
Implementation
ImageProvider readyImageProvider({
required String path,
Uri Function(String path)? resolveUrl,
ImageRenderMethodForWeb? imageRenderMethodForWeb,
int? maxHeight,
int? maxWidth,
double scale = 1.0,
String? cacheKey,
HeadersCallBack? headers,
BaseCacheManager? cacheManager,
}) {
var config = ReadyImageConfig.of(this);
return CachedNetworkImageProvider(
(resolveUrl ?? config?.resolveUrl)?.call(path).toString() ?? path,
maxHeight: maxHeight,
maxWidth: maxWidth,
scale: scale,
headers: (headers ?? config?.headers)?.call(this),
cacheManager: cacheManager ?? config?.cacheManager?.call(this),
cacheKey: cacheKey,
imageRenderMethodForWeb: imageRenderMethodForWeb ??
config?.imageRenderMethodForWeb?.call(this) ??
ImageRenderMethodForWeb.HtmlImage,
);
}