toOptionsJSON method

  1. @override
void toOptionsJSON(
  1. StringBuffer buffer
)
override

Implementation

@override
void toOptionsJSON(StringBuffer buffer) {
  super.toOptionsJSON(buffer);

  if (attributes != null) {
    buffer.writeAll(['"attributes":', attributes?.toJSON(), ','], '');
  }
  if (children != null) {
    buffer.write('"children":[');
    for (var item in children!) {
      buffer.writeAll([jsonEncode(item), ','], '');
    }
    buffer.write('],');
  }
  if (tagName != null) {
    buffer.writeAll(['"tagName":', jsonEncode(tagName), ','], '');
  }
}