toOptionsJSON method

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

Implementation

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

  if (enabled != null) {
    buffer.writeAll(['"enabled":', enabled, ','], '');
  }
  if (height != null) {
    buffer.writeAll(['"height":', height, ','], '');
  }
  if (lineWidth != null) {
    buffer.writeAll(['"lineWidth":', lineWidth, ','], '');
  }
  if (onlyOnHover != null) {
    buffer.writeAll(['"onlyOnHover":', onlyOnHover, ','], '');
  }
  if (shape != null) {
    buffer.writeAll(['"shape":', jsonEncode(shape), ','], '');
  }
  if (style != null) {
    buffer.writeAll(['"style":', style?.toJSON(), ','], '');
  }
  if (width != null) {
    buffer.writeAll(['"width":', width, ','], '');
  }
  if (x != null) {
    buffer.writeAll(['"x":', x, ','], '');
  }
  if (y != null) {
    buffer.writeAll(['"y":', y, ','], '');
  }
}