getFactorySync<T extends Object> method

T getFactorySync<T extends Object>({
  1. Entity<Object>? groupEntity,
  2. bool traverse = true,
})
inherited

Implementation

T getFactorySync<T extends Object>({
  Entity? groupEntity,
  bool traverse = true,
}) {
  final value = getFactory<T>(
    groupEntity: groupEntity,
    traverse: traverse,
  );
  if (value is Future) {
    throw DependencyIsFutureException(
      type: T,
      groupEntity: groupEntity,
    );
  } else {
    return value;
  }
}