maybeElementOf static method
Looks up the widget tree to find the active ServiceScopeElement.
Implementation
static ServiceScopeElement? maybeElementOf(BuildContext context) {
final element = context.getElementForInheritedWidgetOfExactType<ServiceScope>();
return element is ServiceScopeElement ? element : null;
}