toOptionsJSON method

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

Implementation

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

  if (dashStyle != null) {
    buffer.writeAll(['"dashStyle":', jsonEncode(dashStyle), ','], '');
  }
  if (fill != null) {
    buffer.write('"fill":{');
    for (var item in fill!.entries) {
      buffer.writeAll(['"', item.key, '":', jsonEncode(item.value), ','], '');
    }
    buffer.write('},');
  }
  if (height != null) {
    buffer.writeAll(['"height":', height, ','], '');
  }
  if (r != null) {
    buffer.writeAll(['"r":', r, ','], '');
  }
  if (ry != null) {
    buffer.writeAll(['"ry":', ry, ','], '');
  }
  if (snap != null) {
    buffer.writeAll(['"snap":', snap, ','], '');
  }
  if (src != null) {
    buffer.writeAll(['"src":', jsonEncode(src), ','], '');
  }
  if (stroke != null) {
    buffer.writeAll(['"stroke":', jsonEncode(stroke), ','], '');
  }
  if (strokeWidth != null) {
    buffer.writeAll(['"strokeWidth":', strokeWidth, ','], '');
  }
  if (type != null) {
    buffer.writeAll(['"type":', jsonEncode(type), ','], '');
  }
  if (width != null) {
    buffer.writeAll(['"width":', width, ','], '');
  }
  if (xAxis != null) {
    buffer.writeAll(['"xAxis":', xAxis, ','], '');
  }
  if (yAxis != null) {
    buffer.writeAll(['"yAxis":', yAxis, ','], '');
  }
}