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