Knob<T> class
abstract
Allows WidgetbookUseCases to have dynamically adjustable parameters.
- Inheritance
-
- Object
- FieldsComposable<
T> - Knob
- Annotations
Constructors
- Knob({required String label, String? description, @Deprecated('Use initialValue instead.') T? value, T? initialValue, bool isNullable = false, @Deprecated('This parameter is not used anymore. ' 'It defaults to [value == null] instead of [false]') bool isNull = false})
Properties
- description → String?
-
The Description of what the user can put on the knob.
final
-
fields
→ List<
Field> -
no setterinherited
- groupName → String
-
no setteroverride
- hashCode → int
-
The hash code for this object.
no setteroverride
- initialValue → T
-
The initial value the knob is set to.
final
- isNull ↔ bool
-
getter/setter pair
- isNullable → bool
-
final
- label → String
-
The label that's put above a knob.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- value ↔ T?
-
getter/setter pair
Methods
-
buildFields(
BuildContext context) → Widget -
Converts the fields into a Widget that will be rendered in the
settings side panel.
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
slugify(
String name) → String -
inherited
-
toJson(
) → Map< String, dynamic> -
override
-
toString(
) → String -
A string representation of this object.
inherited
-
valueFromQueryGroup(
Map< String, String> group) → T -
Converts a query group to a value of type
T
.inherited -
valueOf<
TField> (String name, Map< String, String> group) → TField? -
Decodes the value of the Field with
name
from the querygroup
using the FieldCodec.toValue from Field.codec.inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
override