toOptionsJSON method

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

Implementation

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

  if (boxesToAvoid != null) {
    buffer.write('"boxesToAvoid":[');
    for (var item in boxesToAvoid!) {
      buffer.writeAll([jsonEncode(item), ','], '');
    }
    buffer.write('],');
  }
  if (connectorAllowed != null) {
    buffer.writeAll(['"connectorAllowed":', connectorAllowed, ','], '');
  }
  if (connectorNeighbourDistance != null) {
    buffer.writeAll(
        ['"connectorNeighbourDistance":', connectorNeighbourDistance, ','],
        '');
  }
  if (enabled != null) {
    buffer.writeAll(['"enabled":', enabled, ','], '');
  }
  if (format != null) {
    buffer.writeAll(['"format":', jsonEncode(format), ','], '');
  }
  if (formatter != null) {
    buffer.writeAll(['"formatter":', formatter?.toJSON(), ','], '');
  }
  if (maxFontSize != null) {
    buffer.writeAll(['"maxFontSize":', maxFontSize, ','], '');
  }
  if (minFontSize != null) {
    buffer.writeAll(['"minFontSize":', minFontSize, ','], '');
  }
  if (onArea != null) {
    buffer.writeAll(['"onArea":', onArea, ','], '');
  }
  if (style != null) {
    buffer.writeAll(['"style":', style?.toJSON(), ','], '');
  }
  if (useHTML != null) {
    buffer.writeAll(['"useHTML":', useHTML, ','], '');
  }
}