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>",
"maxHeight": "<double>",
"maxWidth": "<double>",
"minHeight": "<double>",
"minWidth": "<double>"
}
See also:
ThemeDecoder.decodeAlignment
Implementation
static JsonOverflowBoxBuilder? fromDynamic(
dynamic map, {
JsonWidgetRegistry? registry,
}) {
JsonOverflowBoxBuilder? result;
if (map != null) {
result = JsonOverflowBoxBuilder(
alignment: ThemeDecoder.decodeAlignment(
map['alignment'],
validate: false,
) ??
Alignment.center,
maxHeight: JsonClass.maybeParseDouble(
map['maxHeight'],
),
maxWidth: JsonClass.maybeParseDouble(
map['maxWidth'],
),
minHeight: JsonClass.maybeParseDouble(
map['minHeight'],
),
minWidth: JsonClass.maybeParseDouble(
map['minWidth'],
),
);
}
return result;
}