HypertextApplicationLanguageLink.fromMap constructor

HypertextApplicationLanguageLink.fromMap(
  1. Map<String, dynamic> map
)

Provides a Link object from a JSON-like map.

Implementation

HypertextApplicationLanguageLink.fromMap(Map<String, dynamic> map)
    : type = map['type'] ?? null,
      href = map['href'],
      templated = map['templated'] ?? false,
      title = map['title'] ?? 'Sem título',
      deprecation = map['deprecation'] ?? null,
      name = map['name'] ?? null,
      profile = map['profile'] ?? null,
      hreflang = map['hreflang'] ?? null {
  if (href == null) {
    throw Exception('Link não possui href');
  }
}