currentScope property
Scope
currentScope
Return the current scope of the StatefulWidget
widget instance.
Scope
instance created and related to the StatefulWidget
instance in the widget tree.
Implementation
Scope get currentScope {
if (_scope != null && !_scope!.closed) return _scope!;
_scope = widget.scope;
FlutterKoinScopeObserver.scopeWidgetObserver
.onCreateScope(ScopeWidgetContext(
widget,
_scope!,
));
return _scope!;
}