fromJson static method
Implementation
static EmbeddableObject fromJson(Map<String, dynamic> json) {
final type = json[kTypeKey] as String?;
final inline = json[kInlineKey] as bool;
final data = Map<String, dynamic>.from(json);
data.remove(kTypeKey);
data.remove(kInlineKey);
if (inline) {
return SpanEmbed(type!, data: data);
}
return BlockEmbed(type!, data: data);
}