of static method

VariableScope of(
  1. BuildContext context
)

Read (without subscribing) the scope in effect, or VariableScope.empty when no provider is above context.

Implementation

static VariableScope of(BuildContext context) =>
    context.getInheritedWidgetOfExactType<VariableScopeProvider>()?.scope ??
    VariableScope.empty;