fromJson static method
Implementation
static Embed fromJson(Map<String, dynamic> json) {
return Embed(
title: json['title'],
type: EmbedType.forValue(json['type']),
description: json['description'],
url: json['url'],
timestamp: json['timestamp'],
color: json['color'],
footer: ifNotNull(EmbedFooter.fromJson, json['footer']),
image: ifNotNull(EmbedImage.fromJson, json['image']),
thumbnail: ifNotNull(EmbedThumbnail.fromJson, json['thumbnail']),
video: ifNotNull(EmbedVideo.fromJson, json['video']),
provider: ifNotNull(EmbedProvider.fromJson, json['provider']),
author: ifNotNull(EmbedAuthor.fromJson, json['author']),
fields: fromArray(EmbedField.fromJson, json['fields']),
);
}