Integer Arg
The integer arg renders a text field or slider in the Widgetbook UI where you can dynamically enter an int value for a widget property.
Variants
The integer arg has two style variants, each with a regular and nullable type:
- Input: A text field for entering integer values.
- Slider: A slider for selecting integer values within a range.
Usage
my_widget.stories.dart
final $Default = _Story(
args: _Args(
count: NullableIntArg(null),
),
);
Usage
my_widget.stories.dart
final $Default = _Story(
args: _Args(
count: IntArg(
5,
style: const SliderIntArgStyle(min: 0, max: 200, divisions: 20),
),
),
);

