toOptionsJSON method

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

Implementation

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

  if (pitch != null) {
    buffer.writeAll(['"pitch":', pitch?.toJSON(), ','], '');
  }
  if (playDelay != null) {
    buffer.writeAll(['"playDelay":', playDelay?.toJSON(), ','], '');
  }
  if (rate != null) {
    buffer.writeAll(['"rate":', rate?.toJSON(), ','], '');
  }
  if (text != null) {
    buffer.writeAll(['"text":', jsonEncode(text), ','], '');
  }
  if (time != null) {
    buffer.writeAll(['"time":', time?.toJSON(), ','], '');
  }
  if (volume != null) {
    buffer.writeAll(['"volume":', volume?.toJSON(), ','], '');
  }
}