of static method
- BuildContext context
The nearest scope above context; asserts when absent.
Implementation
static MorphScopeState of(BuildContext context) {
final MorphScopeState? state = maybeOf(context);
assert(
state != null,
'No MorphScope found above this context. Wrap the app once, above '
'the Navigator: MaterialApp(builder: (context, child) => '
'MorphScope(child: child!)).',
);
return state!;
}