of static method

FxShellScope of(
  1. BuildContext context
)

Returns the FxShellScope if it exists, otherwise throws an assertion. Use this to access the FxShellScope from any descendant widget. Example:

FxShellScope.of(context).openDrawer();

Implementation

static FxShellScope of(BuildContext context) {
  final scope = maybeOf(context);
  assert(
    scope != null,
    '\n\n🚨 FxShellScope not found. Wrap your app (or route) with FxShell.\n\n',
  );
  return scope!;
}