of static method
Implementation
static ReadyImageDefaults of(BuildContext context, ReadyImage widget) {
var config = ReadyImageConfig.of(context);
return ReadyImageDefaults(
resolveUrl:
widget.resolveUrl ?? config?.resolveUrl ?? _defaultUrlResolver,
imageRenderMethodForWeb: widget.imageRenderMethodForWeb ??
config?.imageRenderMethodForWeb?.call(context) ??
ImageRenderMethodForWeb.HtmlImage,
errorPlaceholder: widget.errorPlaceholder ??
config?.errorPlaceholder ??
_defaultErrorBuilder,
color: widget.color ?? config?.color?.call(context),
loadingPlaceholder: widget.loadingPlaceholder ??
config?.loadingPlaceholder ??
_defaultLoadingBuilder,
foregroundDecoration: widget.foregroundDecoration ??
config?.foregroundDecoration?.call(context),
decoration: widget.decoration ?? config?.decoration?.call(context),
outerDecoration:
widget.outerDecoration ?? config?.outerDecoration?.call(context),
outerPadding: widget.outerPadding ?? config?.outerPadding?.call(context),
innerPadding: widget.innerPadding ?? config?.innerPadding?.call(context),
fit: widget.fit ?? config?.fit?.call(context) ?? BoxFit.contain,
headers: widget.headers ?? config?.headers ?? _defaultHeaders,
cacheManager: widget.cacheManager ?? config?.cacheManager?.call(context),
disableHero: config?.disableHero?.call(context) ?? false,
);
}