toJson method

Map<String, Object?> toJson()

Implementation

Map<String, Object?> toJson() {
  var href = this.href;
  var iconClass = this.iconClass;
  var id = this.id;
  var label = this.label;
  var styleClass = this.styleClass;
  var title = this.title;
  var weight = this.weight;

  final json = <String, Object?>{};
  if (href != null) {
    json[r'href'] = href;
  }
  if (iconClass != null) {
    json[r'iconClass'] = iconClass;
  }
  if (id != null) {
    json[r'id'] = id;
  }
  if (label != null) {
    json[r'label'] = label;
  }
  if (styleClass != null) {
    json[r'styleClass'] = styleClass;
  }
  if (title != null) {
    json[r'title'] = title;
  }
  if (weight != null) {
    json[r'weight'] = weight;
  }
  return json;
}