call method
Returns the cached object.
- The object is initialized when first accessed.
- To re-initialize the cached object use the
optional parameter
updateCache
.
Implementation
@override
Map<K, V> call({
bool updateCache = false,
}) {
if (updateCache || !_isUpToDate) {
_isUpToDate = true;
_cache = UnmodifiableMapView(objectFactory());
}
return _cache;
}