boolean method
Creates bool knob.
Implementation
bool boolean({
/// Knob node key.
required String key,
/// Knob node description.
String? description,
/// Knob node initial value.
required bool initial,
}) {
final knobProvider = KnobsProvider.of(this);
final storyProvider = StoryProvider.of(this);
final knobNode = knobProvider.knobStore.addStoryKnob(
storyProvider.story.key,
knobKey: key,
knobNode: KnobNodeBool(
key: key,
description: description,
value: initial,
),
);
return knobNode.value;
}