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