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'],
validate: false,
),
color: ThemeDecoder.decodeColor(
map['color'],
validate: false,
),
semanticsLabel: map['semanticsLabel'],
semanticsValue: map['semanticsValue'],
strokeWidth: JsonClass.maybeParseDouble(map['strokeWidth'], 4.0)!,
value: JsonClass.maybeParseDouble(map['value']),
valueColor: map['valueColor'] == null
? null
: map['valueColor'] is Animation
? map['valueColor']
: AlwaysStoppedAnimation(
ThemeDecoder.decodeColor(
map['valueColor'],
validate: false,
)!,
),
);
}
return result;
}