getServiceFactorySyncOrNullT method

Service<Object?>? getServiceFactorySyncOrNullT(
  1. Type type, {
  2. Object? params,
  3. Entity<Object>? groupEntity,
  4. bool traverse = true,
  5. 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;
}