DiscoveryInformation.fromJson constructor

DiscoveryInformation.fromJson(
  1. Map<String, Object?> json
)

Implementation

DiscoveryInformation.fromJson(Map<String, Object?> json)
    : mNode =
          NodeInformation.fromJson(json['m.node'] as Map<String, Object?>),
      mIdentityServer = ((v) => v != null
          ? IdentityServerInformation.fromJson(v as Map<String, Object?>)
          : null)(json['m.identity_server']),
      additionalProperties = Map.fromEntries(json.entries
          .where((e) => !['m.node', 'm.identity_server'].contains(e.key))
          .map((e) => MapEntry(e.key, e.value as Map<String, Object?>)));