of static method

Implementation

static OverlayController of(BuildContext context) =>
    maybeOf(context) ??
    (throw StateError(
      '`OverlayController.of()` should not be called outside a provider/scope.',
    ));