of static method

Implementation

static ContextMenuOverlayState of(BuildContext context) {
  final state = (context.dependOnInheritedWidgetOfExactType<_InheritedContextMenuOverlay>())?.state;
  if (state == null) {
    throw ('No ContextMenuOverlay was found. Check that you have inserted a ContextMenuOverlay above your ContextMenuRegion in the widget tree.');
  }
  return state;
}