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