fromDynamic static method
Builds the builder from a Map-like dynamic structure. This expects the JSON format to be of the following structure:
{
"alignment": <AlignmentGeometry>,
"heightFactor": <double>,
"widthFactor": <double>
}
See also:
ThemeDecoder.decodeAlignment
Implementation
static JsonAlignBuilder? fromDynamic(
dynamic map, {
JsonWidgetRegistry? registry,
}) {
JsonAlignBuilder? result;
if (map != null) {
result = JsonAlignBuilder(
alignment: ThemeDecoder.decodeAlignment(
map['alignment'],
validate: false,
),
heightFactor: JsonClass.parseDouble(map['heightFactor']),
widthFactor: JsonClass.parseDouble(map['widthFactor']),
);
}
return result;
}