readScope<T extends Object> function

T? readScope<T extends Object>(
  1. BuildContext context
)

Framework plumbing: the nearest Scope<T> value without subscribing context — for a render object registering with a service, or an action fired from a handler, where a rebuild dependency would be wrong.

Implementation

T? readScope<T extends Object>(BuildContext context) =>
    (context as Element)._findScopeElementByKey(T)?.value as T?;