getDependencyK method
Returns any dependency with the exact typeEntity
under the specified
groupEntity
. Unlike getDependency, this will not include subtypes.
Implementation
@protected
@pragma('vm:prefer-inline')
Option<Dependency> getDependencyK(
Entity typeEntity, {
Entity groupEntity = const DefaultEntity(),
}) {
final a = TypeEntity(Sync, [typeEntity]);
final b = TypeEntity(Async, [typeEntity]);
return Option.from(
_state[groupEntity]?.values.firstWhereOrNull(
(e) => e.typeEntity == a || e.typeEntity == b,
),
);
}