getServiceFactorySyncOrNullT method
Service<Object?> ?
getServiceFactorySyncOrNullT(
- Type type, {
- Object? params,
- Entity<
Object> ? groupEntity, - bool traverse = true,
- bool throwIfAsync = false,
inherited
Implementation
Service? getServiceFactorySyncOrNullT(
Type type, {
Object? params,
Entity? groupEntity,
bool traverse = true,
bool throwIfAsync = false,
}) {
final value = getServiceFactoryOrNullT(
type,
params: params,
groupEntity: groupEntity,
traverse: traverse,
);
if (throwIfAsync && value is Future) {
throw DependencyIsFutureException(
type: type,
groupEntity: groupEntity,
);
}
return value?.asSyncOrNull;
}