fromDynamic static method
Builds the builder from a Map-like dynamic structure. This expects the JSON format to be of the following structure:
{
"<key>": "<dynamic>"
}
Where the key
is any arbitrary String. That key
will be used as the
key
on JsonWidgetRegistry.setValue and the dynamic
value will be
used as the value
.
Implementation
static JsonSetDefaultValueBuilder? fromDynamic(
dynamic map, {
JsonWidgetRegistry? registry,
}) {
JsonSetDefaultValueBuilder? result;
if (map != null) {
result = JsonSetDefaultValueBuilder(values: map);
registry ??= JsonWidgetRegistry.instance;
// result.values?.forEach((key, value) => registry.setValue(key, value));
}
return result;
}