call method

  1. @override
Map<K, V> call({
  1. bool updateCache = false,
})
override

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;
}