knobs property

KnobsBuilder get knobs

Creates adjustable parameters for the WidgetbookUseCase

Implementation

KnobsBuilder get knobs {
  final state = WidgetbookState.of(this);
  final queryGroup = FieldCodec.decodeQueryGroup(
    state.queryParams['knobs'],
  );

  T? register<T>(Knob<T?> knob) {
    return state.knobs.register(
      knob,
      queryGroup,
    );
  }

  return KnobsBuilder(register);
}