fromDynamic static method
Decodes a JSON object into a dynamic widget. The structure is the same
for all dynamic widgets with the exception of the args
value. The
args
depends on the specific type
.
In the given JSON object, only the child
or the children
can be passed
in; not both. From an implementation perspective, there is no difference
between passing in a child
or a children
with a single element, this
will treat both of those identically.
{ "type":
Implementation
static JsonWidgetData fromDynamic(
dynamic map, {
JsonWidgetRegistry? registry,
}) {
final result = maybeFromDynamic(map, registry: registry);
if (result == null) {
throw Exception(
'[JsonWidgetData]: requested to parse from dynamic, but the input is null.',
);
}
return result;
}