toOptionsJSON method

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

Implementation

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

  if (count != null) {
    buffer.writeAll(['"count":', count, ','], '');
  }
  if (dataGrouping != null) {
    buffer.writeAll(['"dataGrouping":', dataGrouping?.toJSON(), ','], '');
  }
  if (events != null) {
    buffer.writeAll(['"events":', events?.toJSON(), ','], '');
  }
  if (offsetMax != null) {
    buffer.writeAll(['"offsetMax":', offsetMax, ','], '');
  }
  if (offsetMin != null) {
    buffer.writeAll(['"offsetMin":', offsetMin, ','], '');
  }
  if (preserveDataGrouping != null) {
    buffer
        .writeAll(['"preserveDataGrouping":', preserveDataGrouping, ','], '');
  }
  if (text != null) {
    buffer.writeAll(['"text":', jsonEncode(text), ','], '');
  }
  if (title != null) {
    buffer.writeAll(['"title":', jsonEncode(title), ','], '');
  }
  if (type != null) {
    buffer.writeAll(['"type":', jsonEncode(type), ','], '');
  }
}