FeedElement.fromJson constructor

FeedElement.fromJson(
  1. Map<String, dynamic> json
)

Implementation

factory FeedElement.fromJson(Map<String, dynamic> json) {
  final actionsJson = json['actions'] as List<dynamic>;
  final actions =
      actionsJson.map((actionJson) => Action.fromJson(actionJson)).toList();
  return FeedElement(
    id: json['id'] as String,
    name: json['name'] as String,
    devName: json['devName'] as String?,
    link: json['link'] as String,
    icon: json['icon'] as String?,
    smallDescription: json['smallDescription'] as String?,
    smallDescriptionHTML: json['smallDescriptionHTML'] as String?,
    actions: actions,
  );
}