WidgetbookState constructor

WidgetbookState({
  1. String? path,
  2. String? query,
  3. bool previewMode = false,
  4. Map<String, String> queryParams = const {},
  5. AppBuilder appBuilder = widgetsAppBuilder,
  6. List<WidgetbookAddon>? addons,
  7. List<WidgetbookIntegration>? integrations,
  8. required WidgetbookRoot root,
})

Implementation

WidgetbookState({
  this.path,
  this.query,
  this.previewMode = false,
  this.queryParams = const {},
  this.appBuilder = widgetsAppBuilder,
  this.addons,
  this.integrations,
  required this.root,
}) {
  this.knobs = KnobsRegistry(
    onLock: () {
      integrations?.forEach(
        (integration) => integration.onKnobsRegistered(this),
      );
    },
  );

  knobs.addListener(
    notifyListeners,
  );
}