toOptionsJSON method

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

Implementation

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

  if (language != null) {
    buffer.writeAll(['"language":', jsonEncode(language), ','], '');
  }
  if (mapping != null) {
    buffer.writeAll(['"mapping":', mapping?.toJSON(), ','], '');
  }
  if (pointGrouping != null) {
    buffer.writeAll(['"pointGrouping":', pointGrouping?.toJSON(), ','], '');
  }
  if (preferredVoice != null) {
    buffer
        .writeAll(['"preferredVoice":', jsonEncode(preferredVoice), ','], '');
  }
  if (type != null) {
    buffer.writeAll(['"type":', jsonEncode(type), ','], '');
  }
  if (activeWhen != null) {
    buffer.writeAll(['"activeWhen":', activeWhen?.toJSON(), ','], '');
  }
  if (showPlayMarker != null) {
    buffer.writeAll(['"showPlayMarker":', showPlayMarker, ','], '');
  }
}