toJson method

Map<String, Object?> toJson()

Implementation

Map<String, Object?> toJson() {
  var children = this.children;
  var label = this.label;
  var value = this.value;

  final json = <String, Object?>{};
  json[r'children'] = children.map((i) => i.toJson()).toList();
  if (label != null) {
    json[r'label'] = label;
  }
  if (value != null) {
    json[r'value'] = value;
  }
  return json;
}