toOptionsJSON method

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

Implementation

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

  if (point != null) {
    buffer.write('"point":{');
    for (var item in point!.entries) {
      buffer.writeAll(['"', item.key, '":', jsonEncode(item.value), ','], '');
    }
    buffer.write('},');
  }
  if (accessibility != null) {
    buffer.writeAll(['"accessibility":', accessibility?.toJSON(), ','], '');
  }
  if (align != null) {
    buffer.writeAll(['"align":', jsonEncode(align), ','], '');
  }
  if (allowOverlap != null) {
    buffer.writeAll(['"allowOverlap":', allowOverlap, ','], '');
  }
  if (backgroundColor != null) {
    buffer.writeAll(
        ['"backgroundColor":', jsonEncode(backgroundColor), ','], '');
  }
  if (borderColor != null) {
    buffer.writeAll(['"borderColor":', jsonEncode(borderColor), ','], '');
  }
  if (borderRadius != null) {
    buffer.writeAll(['"borderRadius":', borderRadius, ','], '');
  }
  if (borderWidth != null) {
    buffer.writeAll(['"borderWidth":', borderWidth, ','], '');
  }
  if (className != null) {
    buffer.writeAll(['"className":', jsonEncode(className), ','], '');
  }
  if (crop != null) {
    buffer.writeAll(['"crop":', crop, ','], '');
  }
  if (distance != null) {
    buffer.writeAll(['"distance":', distance, ','], '');
  }
  if (format != null) {
    buffer.writeAll(['"format":', jsonEncode(format), ','], '');
  }
  if (formatter != null) {
    buffer.writeAll(['"formatter":', jsonEncode(formatter), ','], '');
  }
  if (includeInDataExport != null) {
    buffer.writeAll(['"includeInDataExport":', includeInDataExport, ','], '');
  }
  if (overflow != null) {
    buffer.writeAll(['"overflow":', jsonEncode(overflow), ','], '');
  }
  if (padding != null) {
    buffer.writeAll(['"padding":', padding, ','], '');
  }
  if (shadow != null) {
    buffer.write('"shadow":{');
    for (var item in shadow!.entries) {
      buffer.writeAll(['"', item.key, '":', jsonEncode(item.value), ','], '');
    }
    buffer.write('},');
  }
  if (shape != null) {
    buffer.writeAll(['"shape":', jsonEncode(shape), ','], '');
  }
  if (style != null) {
    buffer.write('"style":{');
    for (var item in style!.entries) {
      buffer.writeAll(['"', item.key, '":', jsonEncode(item.value), ','], '');
    }
    buffer.write('},');
  }
  if (text != null) {
    buffer.writeAll(['"text":', jsonEncode(text), ','], '');
  }
  if (useHTML != null) {
    buffer.writeAll(['"useHTML":', useHTML, ','], '');
  }
  if (verticalAlign != null) {
    buffer.writeAll(['"verticalAlign":', jsonEncode(verticalAlign), ','], '');
  }
  if (x != null) {
    buffer.writeAll(['"x":', x, ','], '');
  }
  if (y != null) {
    buffer.writeAll(['"y":', y, ','], '');
  }
}