DeferredJsonWidgetData class

A JsonWidgetData subclass that does not parse the JSON until the values are needed. This is used internally by the library for when widgets are requested through a variable reference because the variable often won't exist until after the first pass of the widget tree processing is completed.

Implemented types

Constructors

DeferredJsonWidgetData({required String key, required JsonWidgetRegistry registry})

Properties

args JsonWidgetBuilder?
no setteroverride
builder JsonWidgetBuilder Function()
no setteroverride
children List<JsonWidgetData>?
no setteroverride
data JsonWidgetData
no setter
hashCode int
The hash code for this object.
no setterinherited
id String
no setteroverride
listenVariables Set<String>
no setteroverride
originalChild → dynamic
no setteroverride
originalChildren → dynamic
no setteroverride
registry JsonWidgetRegistry
no setteroverride
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
type String
no setteroverride

Methods

build({ChildWidgetBuilder? childBuilder, required BuildContext context}) Widget
Convenience method that can build the widget this data object represents. This is the equilivant of calling: builder.build and padding this in as the data parameter.
override
copyWith({dynamic args, JsonWidgetBuilder? builder, List<JsonWidgetData>? children, Set<String>? listenVariables, String? id, dynamic originalChild, dynamic originalChildren, JsonWidgetRegistry? registry, String? type}) JsonWidgetData
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
recreate([JsonWidgetRegistry? newRegistry]) JsonWidgetData
Recreates the data object based on the updated values and function responces from the registry. This should only be called within the framework itself, external code should not need to call this.
override
toJson() Map<String, dynamic>
Abstract function that concrete classes must implement. This must encode the internal data model to a JSON compatible representation.
override
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited