fromDynamic static method
Builds the builder from a Map-like dynamic structure. This expects the JSON format to be of the following structure:
{
"backgroundColor": <Color>,
"color": <Color>,
"semanticsLabel": <String>,
"semanticsValue": <String>,
"strokeWidth": <double>,
"value": <double>,
"valueColor": <Animation<Color> | Color>
}
See also:
ThemeDecoder.decodeTextBaseline
Implementation
static JsonCircularProgressIndicatorBuilder? fromDynamic(
dynamic map, {
JsonWidgetRegistry? registry,
}) {
JsonCircularProgressIndicatorBuilder? result;
if (map != null) {
result = JsonCircularProgressIndicatorBuilder(
backgroundColor: ThemeDecoder.decodeColor(map['backgroundColor']),
color: ThemeDecoder.decodeColor(map['color']),
semanticsLabel: map['semanticsLabel'],
semanticsValue: map['semanticsValue'],
strokeWidth: JsonClass.parseDouble(map['strokeWidth'], 4.0)!,
value: JsonClass.parseDouble(map['value']),
valueColor: map['valueColor'] == null
? null
: map['valueColor'] is Animation
? map['valueColor']
: AlwaysStoppedAnimation(
ThemeDecoder.decodeColor(map['valueColor'])!,
),
);
}
return result;
}