toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() {
  final host = this.host;
  final name = this.name;
  return {
    if (host != null) 'host': host,
    if (name != null) 'name': name,
  };
}