OEmbed.fromJson constructor

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

Creates a new instance of OEmbed from a JSON map.

Implementation

factory OEmbed.fromJson(Map<String, dynamic> json) => OEmbed(json['provider_name'] ?? "", json['provider_url'] ?? "", [
      for (var v in json['endpoints'] ?? [])
        if (v != null) OEmbedEndpoint.fromJson(v)
    ]);