toOptionsJSON method

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

Implementation

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

  if (curveFactor != null) {
    buffer.writeAll(['"curveFactor":', curveFactor, ','], '');
  }
  if (fillColor != null) {
    buffer.writeAll(['"fillColor":', jsonEncode(fillColor), ','], '');
  }
  if (fillOpacity != null) {
    buffer.writeAll(['"fillOpacity":', fillOpacity, ','], '');
  }
  if (from != null) {
    buffer.write('"from":{');
    for (var item in from!.entries) {
      buffer.writeAll(['"', item.key, '":', jsonEncode(item.value), ','], '');
    }
    buffer.write('},');
  }
  if (growTowards != null) {
    buffer.writeAll(['"growTowards":', growTowards, ','], '');
  }
  if (lineWidth != null) {
    buffer.writeAll(['"lineWidth":', lineWidth, ','], '');
  }
  if (markerEnd != null) {
    buffer.writeAll(['"markerEnd":', markerEnd?.toJSON(), ','], '');
  }
  if (opacity != null) {
    buffer.writeAll(['"opacity":', opacity, ','], '');
  }
  if (to != null) {
    buffer.write('"to":{');
    for (var item in to!.entries) {
      buffer.writeAll(['"', item.key, '":', jsonEncode(item.value), ','], '');
    }
    buffer.write('},');
  }
  if (weight != null) {
    buffer.writeAll(['"weight":', weight, ','], '');
  }
}