RelayInfo.fromJson constructor

RelayInfo.fromJson(
  1. Map json
)

Implementation

factory RelayInfo.fromJson(Map<dynamic, dynamic> json) {
  final String name = json["name"] ?? '';
  final String description = json["description"] ?? "";
  final String pubKey = json["pubkey"] ?? "";
  final String contact = json["contact"] ?? "";
  final List<dynamic> nips = json["supported_nips"] ?? [];
  final String software = json["software"] ?? "";
  final String version = json["version"] ?? "";
  return RelayInfo._(
      name, description, pubKey, contact, nips, software, version);
}