runScoped<R> function

R runScoped<R>(
  1. R body(), {
  2. Set<ScopedRef> values = const {},
})

Runs body within a scope which has access to the set of refs in values.

Implementation

R runScoped<R>(
  R Function() body, {
  Set<ScopedRef<dynamic>> values = const {},
}) {
  return runZoned(
    body,
    zoneValues: {for (final value in values) value._key: value},
  );
}