AbstractCache.best constructor Null safety
Returns the best cache possibility: none, svg or png/jpeg
Implementation
factory AbstractCache.best({
final String? iconUrl,
final double? width,
final double? height,
final Color? color,
}) {
if (iconUrl == null) {
return NullCache(width: width, height: height);
}
if (iconUrl.endsWith('.svg')) {
return SvgCache(iconUrl, color: color, width: width, height: height);
}
return RasterCache(iconUrl, width: width, height: height);
}