remove method

ResourceContent? remove(
  1. Object? resource
)

Remove a ResourceContent associated with resource. See get for resource description.

Implementation

ResourceContent? remove(Object? resource) {
  if (resource == null) return null;

  var resourceContent = ResourceContent.from(resource)!;

  var cacheKey = _cacheKey(resourceContent);
  if (cacheKey == null) return resourceContent;

  var cached = _resources.remove(cacheKey);
  return cached;
}