toOptionsJSON method

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

Implementation

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

  if (borderColor != null) {
    buffer.writeAll(['"borderColor":', jsonEncode(borderColor), ','], '');
  }
  if (borderRadius != null) {
    buffer.writeAll(['"borderRadius":', jsonEncode(borderRadius), ','], '');
  }
  if (borderWidth != null) {
    buffer.writeAll(['"borderWidth":', borderWidth, ','], '');
  }
  if (className != null) {
    buffer.writeAll(['"className":', jsonEncode(className), ','], '');
  }
  if (color != null) {
    buffer.writeAll(['"color":', jsonEncode(color), ','], '');
  }
  if (events != null) {
    buffer.writeAll(['"events":', events?.toJSON(), ','], '');
  }
  if (from != null) {
    buffer.writeAll(['"from":', jsonEncode(from), ','], '');
  }
  if (id != null) {
    buffer.writeAll(['"id":', jsonEncode(id), ','], '');
  }
  if (label != null) {
    buffer.writeAll(['"label":', label?.toJSON(), ','], '');
  }
  if (to != null) {
    buffer.writeAll(['"to":', jsonEncode(to), ','], '');
  }
  if (zIndex != null) {
    buffer.writeAll(['"zIndex":', zIndex, ','], '');
  }
}