runWithComponent<T> static method
Implementation
static T runWithComponent<T>(Component component, T Function() fn) {
final previous = _currentComponent;
_currentComponent = component;
try {
return fn();
} finally {
_currentComponent = previous;
}
// NOTE: NO tocamos _runtime, se mantiene del contexto parent
}