JsonDropdownButtonFormFieldBuilder class
Builder that can build an DropdownButtonFormField widget. See the fromDynamic for the format.
- Inheritance
-
- Object
- JsonWidgetBuilder
- JsonDropdownButtonFormFieldBuilder
Constructors
- JsonDropdownButtonFormFieldBuilder({required dynamic args})
-
const
- JsonDropdownButtonFormFieldBuilder.fromModel(JsonDropdownButtonFormFieldBuilderModel model)
-
Constructor to build the widget via code rather than JSON. This is used
to be able to encode widgets into JSON to help with the JSON generation.
It can also be used to more easily debug widgets that are not working as
expected.
factory
Properties
- args → dynamic
-
finalinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- preferredSizeWidget → bool
-
finalinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- type → String
-
Returns the type of widget this widget contains.
no setteroverride
Methods
-
build(
{required ChildWidgetBuilder? childBuilder, required BuildContext context, required JsonWidgetData data}) → Widget -
Builds the widget. If there are dynamic keys on the
data
object, and the widget is not a PreferredSizeWidget, then the returned widget will be wrapped by a stateful widget that will rebuild if any of the dynamic args change in value.inherited -
buildCustom(
{ChildWidgetBuilder? childBuilder, required BuildContext context, required JsonWidgetData data, Key? key}) → Widget -
Builds the widget to render to the tree. If the
data
object has a non-emptyid
associated with it and theenabled
property istrue
then this will attach the selected value to the JsonWidgetRegistry using theid
as the key any time the selected value is changed.override -
createModel(
{ChildWidgetBuilder? childBuilder, required JsonWidgetData data}) → JsonDropdownButtonFormFieldBuilderModel -
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
fromDynamic(
dynamic map, {JsonWidgetRegistry? registry}) → JsonDropdownButtonFormFieldBuilder