toOptionsJSON method

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

Implementation

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

  if (animation != null) {
    buffer.writeAll(['"animation":', animation?.toJSON(), ','], '');
  }
  if (controlPointOptions != null) {
    buffer.writeAll(
        ['"controlPointOptions":', controlPointOptions?.toJSON(), ','], '');
  }
  if (crop != null) {
    buffer.writeAll(['"crop":', crop, ','], '');
  }
  if (draggable != null) {
    buffer.writeAll(['"draggable":', jsonEncode(draggable), ','], '');
  }
  if (events != null) {
    buffer.writeAll(['"events":', events?.toJSON(), ','], '');
  }
  if (id != null) {
    buffer.writeAll(['"id":', jsonEncode(id), ','], '');
  }
  if (labelOptions != null) {
    buffer.writeAll(['"labelOptions":', labelOptions?.toJSON(), ','], '');
  }
  if (labels != null) {
    buffer.write('"labels":[');
    for (var item in labels!) {
      buffer.writeAll([item.toJSON(), ','], '');
    }
    buffer.write('],');
  }
  if (shapeOptions != null) {
    buffer.writeAll(['"shapeOptions":', shapeOptions?.toJSON(), ','], '');
  }
  if (shapes != null) {
    buffer.write('"shapes":[');
    for (var item in shapes!) {
      buffer.writeAll([item.toJSON(), ','], '');
    }
    buffer.write('],');
  }
  if (visible != null) {
    buffer.writeAll(['"visible":', visible, ','], '');
  }
  if (zIndex != null) {
    buffer.writeAll(['"zIndex":', zIndex, ','], '');
  }
  if (type != null) {
    buffer.writeAll(['"type":', jsonEncode(type), ','], '');
  }
  if (types != null) {
    buffer.writeAll(['"types":', types?.toJSON(), ','], '');
  }
}