isPermanent method

bool isPermanent({
  1. required Type type,
  2. String? tag,
})

Check if a dependency is permanent

Implementation

bool isPermanent({required Type type, String? tag}) {
  if (_disposed) {
    return false;
  }

  final key = _getDependencyKey(type, tag);
  return _useCount.containsKey(key) && _useCount[key] == -1;
}