toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() {
  final address = this.address;
  final port = this.port;
  return {
    if (address != null) 'Address': address,
    if (port != null) 'Port': port,
  };
}