toOptionsJSON method

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

Implementation

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

  if (afterSeriesWait != null) {
    buffer.writeAll(['"afterSeriesWait":', afterSeriesWait, ','], '');
  }
  if (defaultInstrumentOptions != null) {
    buffer.writeAll([
      '"defaultInstrumentOptions":',
      defaultInstrumentOptions?.toJSON(),
      ','
    ], '');
  }
  if (defaultSpeechOptions != null) {
    buffer.writeAll(
        ['"defaultSpeechOptions":', defaultSpeechOptions?.toJSON(), ','], '');
  }
  if (duration != null) {
    buffer.writeAll(['"duration":', duration, ','], '');
  }
  if (enabled != null) {
    buffer.writeAll(['"enabled":', enabled, ','], '');
  }
  if (events != null) {
    buffer.writeAll(['"events":', events?.toJSON(), ','], '');
  }
  if (globalContextTracks != null) {
    buffer.write('"globalContextTracks":[');
    for (var item in globalContextTracks!) {
      buffer.writeAll([item.toJSON(), ','], '');
    }
    buffer.write('],');
  }
  if (globalTracks != null) {
    buffer.write('"globalTracks":[');
    for (var item in globalTracks!) {
      buffer.writeAll([item.toJSON(), ','], '');
    }
    buffer.write('],');
  }
  if (masterVolume != null) {
    buffer.writeAll(['"masterVolume":', masterVolume, ','], '');
  }
  if (order != null) {
    buffer.writeAll(['"order":', jsonEncode(order), ','], '');
  }
  if (pointGrouping != null) {
    buffer.writeAll(['"pointGrouping":', pointGrouping?.toJSON(), ','], '');
  }
  if (showCrosshair != null) {
    buffer.writeAll(['"showCrosshair":', showCrosshair, ','], '');
  }
  if (showTooltip != null) {
    buffer.writeAll(['"showTooltip":', showTooltip, ','], '');
  }
  if (updateInterval != null) {
    buffer.writeAll(['"updateInterval":', updateInterval, ','], '');
  }
}