runWithScope<R> method
Runs body while capturing all dependency keys registered during its
execution. Used by GetDependencyScope to bind lifecycles to the tree.
Implementation
R runWithScope<R>(Set<String> keys, R Function() body) {
final previousKeys = _currentScopeKeys;
_currentScopeKeys = keys;
try {
return body();
} finally {
_currentScopeKeys = previousKeys;
}
}