class SavedConnection { final String name; final String supernode; final String community; final String communityKey; final String selfAddress; SavedConnection(this.name, this.supernode, this.community, this.communityKey, this.selfAddress); factory SavedConnection.fromJson(Map json) => SavedConnection( json['name'] as String, json['supernode'] as String, json['community'] as String, json['communityKey'] as String, json['selfAddress'] as String, ); Map toJson() => { 'name': name, 'supernode': supernode, 'community': community, 'communityKey': communityKey, 'selfAddress': selfAddress, }; }