contains method

bool contains(
  1. String scopeId,
  2. String id,
  3. int? index
)

Checks if container contains object for type in given scope

Implementation

bool contains(String scopeId, String id, int? index) {
  if (index == null) {
    return _instances[scopeId] != null &&
        (_instances[scopeId]![id]?.isNotEmpty ?? false);
  } else {
    return _instances[scopeId] != null &&
        ((_instances[scopeId]![id]?.length ?? 0) > index);
  }
}