playText static method

void playText(
  1. String text, {
  2. AlertSeverity severity = AlertSeverity.information,
})

Play the given text using TTS.

Parameters

  • text: The text to be synthesized and played.
  • severity: Optional severity used to select preferences (defaults to AlertSeverity.information).

Implementation

static void playText(
  String text, {
  AlertSeverity severity = AlertSeverity.information,
}) {
  staticMethod(
    'SoundService',
    'playText',
    args: <String, dynamic>{'text': text, 'severity': severity.id},
  );
}