containsDependencyT method
Checks if any dependency with the exact type
exists under the specified
groupEntity
. Unlike containsDependency, this will not include subtypes
of type
.
Returns true
if it does and false
if it doesn't.
Implementation
@pragma('vm:prefer-inline')
bool containsDependencyT(
Type type, {
Entity groupEntity = const DefaultEntity(),
}) {
final a = TypeEntity(Sync, [type]);
final b = TypeEntity(Async, [type]);
return _state[groupEntity]?.values.any(
(e) => e.typeEntity == a || e.typeEntity == b,
) ==
true;
}