fromDynamic static method
Builds the builder from a Map-like dynamic structure. This expects the JSON format to be of the following structure:
{
"color": <Color>,
"icon": <String>,
"semanticLabel": <String>,
"size": <double>,
"textDirection": <TextDirection>
}
See also:
ThemeDecoder.decodeColor
ThemeDecoder.decodeIconData
ThemeDecoder.decodeTextDirection
Implementation
static JsonIoniconBuilder? fromDynamic(
dynamic map, {
JsonWidgetRegistry? registry,
}) {
JsonIoniconBuilder? result;
if (map != null) {
result = JsonIoniconBuilder(
color: ThemeDecoder.decodeColor(
map['color'],
validate: false,
),
icon: ionicons[map['icon']],
semanticLabel: map['semanticLabel'],
size: JsonClass.parseDouble(map['size']),
textDirection: ThemeDecoder.decodeTextDirection(
map['textDirection'],
validate: false,
),
);
}
return result;
}