getServiceSingletonSyncT method

Service<Object?> getServiceSingletonSyncT(
  1. Type type, {
  2. Object? params,
  3. Entity<Object>? groupEntity,
  4. bool traverse = true,
  5. bool throwIfAsync = false,
})
inherited

Implementation

Service getServiceSingletonSyncT(
  Type type, {
  Object? params,
  Entity? groupEntity,
  bool traverse = true,
  bool throwIfAsync = false,
}) {
  final value = getServiceSingletonT(
    type,
    params: params,
    groupEntity: groupEntity,
    traverse: traverse,
  );
  if (value is Future) {
    throw DependencyIsFutureException(
      type: type,
      groupEntity: groupEntity,
    );
  }
  return value;
}