maybeOf static method

ZenScope? maybeOf(
  1. BuildContext context
)

Finds the nearest ZenScope above the given context.

Returns the scope or null if none is found.

Implementation

static ZenScope? maybeOf(BuildContext context) {
  return context
      .dependOnInheritedWidgetOfExactType<_ZenScopeProvider>()
      ?.scope;
}