currentScope property

LevitScope get currentScope

Retrieves the current active LevitScope.

Returns the scope associated with the current Zone, or the root scope if no explicit scope is active.

Implementation

static LevitScope get currentScope {
  final implicit = Zone.current[Ls.zoneScopeKey];
  if (implicit is LevitScope) return implicit;
  return _root;
}