toJson method

Map<String, Object?> toJson()

Implementation

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

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