JsonWidgetBuilder class abstract

Builder that builds dynamic widgets from JSON or other Map-like structures. Applications can register their own types and builders through the JsonWidgetRegistry.

Implementers
Annotations

Constructors

JsonWidgetBuilder({required dynamic args, bool preferredSizeWidget = false})
Constructs the builder by stating whether the widget being built is a PreferredSizeWidget or not.
const

Properties

args → dynamic
final
hashCode int
The hash code for this object.
no setterinherited
preferredSizeWidget bool
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
type String
Returns the type of widget this widget contains.
no setter

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.
buildCustom({ChildWidgetBuilder? childBuilder, required BuildContext context, required JsonWidgetData data, Key? key}) Widget
Custom builder that subclasses must override and implement to return the actual Widget to be placed on the tree.
createModel({ChildWidgetBuilder? childBuilder, required JsonWidgetData data}) JsonWidgetBuilderModel
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 Properties

kDefaultChild JsonWidgetData
final