BooleanField class final
Constructors
- BooleanField({required String name, bool initialValue = true, @Deprecated('Fields should not be aware of their context') void onChanged(BuildContext context, bool? value)?})
- Creates a new instance of BooleanField.
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- initialValue → bool
-
The default value when no value is specified.
finalinherited
- name → String
-
The unique identifier for this field within its group.
finalinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- toParam → String Function(bool value)
-
Encoder for converting value of type
Tto a query parameter.finalinherited - toValue → bool? Function(String param)
-
Decoders for converting a query parameter to a value of type
T. Can returnnullif the parameter is invalid.finalinherited
Methods
-
build(
BuildContext context, String groupName) → Widget -
Builds the current field into a Widget using toWidget.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
toWidget(
BuildContext context, String groupName, bool value) → Widget -
Converts this field into a Widget that can be used in the
settings panel.
override
-
updateField(
BuildContext context, String groupName, bool value) → void -
Updates the field value in the WidgetbookState and synchronizes it
with the URL query parameters.
inherited
-
valueFrom(
QueryGroup? group) → bool -
Extracts the value from
group, fallback to initialValue if field is not found or cannot be decoded.inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited