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
List<T> call({
bool updateCache = false,
}) {
if (updateCache || !_isUpToDate) {
_isUpToDate = true;
_cache = UnmodifiableListView(objectFactory());
}
return _cache;
}