toJson method

Map<String, dynamic> toJson()

Implementation

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