EntityStyles.fromJson constructor
EntityStyles.fromJson(
- dynamic jsonObject
Implementation
EntityStyles.fromJson(dynamic jsonObject) {
var map = credentialToMap(jsonObject);
if (map.containsKey('thumbnail')) {
thumbnail = EntityStylesImage.fromJson(map['thumbnail']);
}
if (map.containsKey('hero')) {
hero = EntityStylesImage.fromJson(map['hero']);
}
if (map.containsKey('background')) {
backgroundColor = map['background']['color'];
}
if (map.containsKey('text')) {
textColor = map['text']['color'];
}
}