toJson method

Map<String, Object?> toJson()

Implementation

Map<String, Object?> toJson() {
  var id = this.id;
  var styleClass = this.styleClass;
  var header = this.header;
  var weight = this.weight;
  var links = this.links;
  var groups = this.groups;

  final json = <String, Object?>{};
  if (id != null) {
    json[r'id'] = id;
  }
  if (styleClass != null) {
    json[r'styleClass'] = styleClass;
  }
  if (header != null) {
    json[r'header'] = header.toJson();
  }
  if (weight != null) {
    json[r'weight'] = weight;
  }
  json[r'links'] = links.map((i) => i.toJson()).toList();
  json[r'groups'] = groups.map((i) => i.toJson()).toList();
  return json;
}