contains method
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);
}
}