KnobDescriptor class
Constructors
KnobDescriptor ({required String name , required KnobKind kind , required Object ? value , required Object ? defaultValue , num ? min , num ? max , num ? step , String ? description , List <String > options = const [] , PickerStyle style = PickerStyle.dropdown })
const
KnobDescriptor.fromJson (Map <String , Object ? > json )
factory
Properties
defaultValue
→ Object ?
What it renders with when nothing has been set — the value written in the
demo, which is also what it shows outside the catalog.
final
description
→ String ?
What this knob is for, when the producer said. Shown beside the control.
final
hashCode
→ int
The hash code for this object.
no setter inherited
isDefault
→ bool
no setter
kind
→ KnobKind
final
max
→ num ?
final
min
→ num ?
Bounds for KnobKind.integer and KnobKind.number , when the demo gave
any. A knob with both is a slider; a knob with neither is a field.
final
name
→ String
Unique within an entry, and how a value is addressed.
final
options
→ List <String >
The labels of a KnobKind.picker , in the order the demo declared them.
final
runtimeType
→ Type
A representation of the runtime type of the object.
no setter inherited
step
→ num ?
The granularity a slider moves in, when the producer declared one. Absent
means continuous — a devbar variable declares this, a catalog demo does
not.
final
style
→ PickerStyle
How a KnobKind.picker asked to be drawn. Written to JSON only when it
is not the default, so a report from a guest that predates it reads the
same as one from a picker that never asked.
final
value
→ Object ?
What the entry is currently being rendered with.
final