toJson method

  1. @override
Map<String, Object> toJson()

Returns a JSON presentation of the object.

Implementation

@override
Map<String, Object> toJson() {
  var result = <String, Object>{};
  var documentation = this.documentation;
  if (documentation != null) {
    result['documentation'] = documentation;
  }
  var expression = this.expression;
  if (expression != null) {
    result['expression'] = expression;
  }
  result['id'] = id;
  result['isRequired'] = isRequired;
  result['isSafeToUpdate'] = isSafeToUpdate;
  result['name'] = name;
  var children = this.children;
  if (children != null) {
    result['children'] = children
        .map((FlutterWidgetProperty value) => value.toJson())
        .toList();
  }
  var editor = this.editor;
  if (editor != null) {
    result['editor'] = editor.toJson();
  }
  var value = this.value;
  if (value != null) {
    result['value'] = value.toJson();
  }
  return result;
}