toOptionsJSON method
Implementation
@override
void toOptionsJSON(StringBuffer buffer) {
super.toOptionsJSON(buffer);
if (accessibility != null) {
buffer.writeAll(['"accessibility":', accessibility?.toJSON(), ','], '');
}
if (color != null) {
buffer.writeAll(['"color":', jsonEncode(color), ','], '');
}
if (custom != null) {
buffer.write('"custom":{');
for (var item in custom!.entries) {
buffer.writeAll(['"', item.key, '":', jsonEncode(item.value), ','], '');
}
buffer.write('},');
}
if (description != null) {
buffer.writeAll(['"description":', jsonEncode(description), ','], '');
}
if (dragDrop != null) {
buffer.writeAll(['"dragDrop":', dragDrop?.toJSON(), ','], '');
}
if (events != null) {
buffer.writeAll(['"events":', events?.toJSON(), ','], '');
}
if (fillColor != null) {
buffer.writeAll(['"fillColor":', jsonEncode(fillColor), ','], '');
}
if (id != null) {
buffer.writeAll(['"id":', jsonEncode(id), ','], '');
}
if (labelrank != null) {
buffer.writeAll(['"labelrank":', labelrank, ','], '');
}
if (selected != null) {
buffer.writeAll(['"selected":', selected, ','], '');
}
if (text != null) {
buffer.writeAll(['"text":', jsonEncode(text), ','], '');
}
if (title != null) {
buffer.writeAll(['"title":', jsonEncode(title), ','], '');
}
if (x != null) {
buffer.writeAll(['"x":', jsonEncode(x), ','], '');
}
}