of static method

Gets the current state using context.

Implementation

static WidgetbookState of(BuildContext context) {
  return context
      .dependOnInheritedWidgetOfExactType<WidgetbookScope>()!
      .notifier!;
}