toMap method

dynamic toMap()

Implementation

toMap() {
  Map<String, Object> result = {};
  result["text"] = text;
  if (lang != null) {
    result["lang"] = lang!;
  }
  if (volume != null) {
    result["volume"] = volume!;
  }
  if (pitch != null) {
    result["pitch"] = pitch!;
  }
  if (rate != null) {
    result["rate"] = rate!;
  }

  return result;
}