class StarChartRegisterNodeEntity { StarChartRegisterNodeEntity({ this.msg, this.peer, }); StarChartRegisterNodeEntity.fromJson(dynamic json) { msg = json['msg']; peer = json['peer'] != null ? PeerData.fromJson(json['peer']) : null; } String? msg; PeerData? peer; Map toJson() { final map = {}; map['msg'] = msg; if (peer != null) { map['peer'] = peer!.toJson(); } return map; } @override String toString() { return 'StarChartRegisterNodeEntity{msg: $msg, peer: $peer}'; } } class PeerData { PeerData({ this.id, this.publicKey, this.privateKey, }); PeerData.fromJson(dynamic json) { id = json['id']; publicKey = json['publicKey']; privateKey = json['privateKey']; } String? id; String? publicKey; String? privateKey; Map toJson() { final map = {}; map['id'] = id; map['publicKey'] = publicKey; map['privateKey'] = privateKey; return map; } @override String toString() { return 'PeerData{id: $id, publicKey: $publicKey, privateKey: $privateKey}'; } }