of static method
Looks up the nearest OutletScope from context.
Implementation
static OutletScope of(BuildContext context) {
final scope = context.dependOnInheritedComponentOfExactType<OutletScope>();
if (scope != null) return scope;
throw StateError('Outlet must be used inside a routed view.');
}