KnobsBuilder constructor
const
KnobsBuilder()
Provides helper methods for creating knobs: control elements that can be used in stories to dynamically update its properties.
It's injected into a story builder, so you can use it there:
Story(
name: 'Flat button',
builder: (_, k) => MaterialButton(
onPressed: k.boolean('Enabled', initial: true) ? () {} : null,
child: Text(k.text('Text', initial: 'Flat button')),
),
)
Implementation
const KnobsBuilder();