runScopedGuarded<R> function
R?
runScopedGuarded<R>(
- R body(), {
- required void onError(
- Object error,
- StackTrace stack
- Set<
ScopedRef> values = const {},
Runs body
within a scope which has access to the set of refs in values
.
Implementation
R? runScopedGuarded<R>(
R Function() body, {
required void Function(Object error, StackTrace stack) onError,
Set<ScopedRef<dynamic>> values = const {},
}) {
return runZonedGuarded(
body,
onError,
zoneValues: {for (final value in values) value._key: value},
);
}