Field Types in Widgetbook
Field types form the backbone of Addons and Knobs in Widgetbook. These types define the data that can be manipulated within the Widgetbook environment, enabling users to tweak settings and see their impact in real-time. Each field type corresponds to a different data input and is represented by a suitable user interface element.
Field Type | Description |
---|---|
BooleanField | This field type is used to manage boolean values. In the Widgetbook user interface, it is represented as a checkbox, allowing users to toggle the state between true and false. |
ColorField | This field type is dedicated to handling color values. It allows users to select a color from a color picker interface in the Widgetbook. |
DoubleSliderField | The DoubleSliderField is used to handle double data types. It appears as a slider in the Widgetbook user interface, letting users slide to select a value within a defined range. |
DoubleInputField | This is another field type for managing double data types. Unlike DoubleSliderField , this field presents a numeric input box to the user, allowing for direct entry of a numeric value. |
ListField | The ListField is designed for managing List data types. It appears as a dropdown menu in the Widgetbook user interface, where users can select a value from the given list. |
StringField | The StringField is used for managing string values. In the Widgetbook user interface, it is represented as a text box, letting users input string values directly. |
Each field type makes Widgetbook a flexible and powerful tool for Flutter developers. They allow for real-time changes and visualization of various widget properties, thus enabling interactive development and testing.