title: How to show a status of "playing" and "silent" in flutter text to speech?
body: <p>I have this program which transforms text to audio, it works without problem, but so far I have not been able to integrate and find information about showing a text that says &quot;playing&quot; and &quot;off&quot;, so that when it plays it shows &quot;playing&quot; and vice versa I would really appreciate a little help, thank you very much.</p>
  <p>This is my code.</p>
  <pre><code>import 'package:flutter/material.dart';
  import 'package:flutter/rendering.dart';
  import 'package:flutter_tts/flutter_tts.dart';
  
  class TextVoicePage extends StatelessWidget {
    @override
    Widget build(BuildContext context) {
      return MaterialApp(
        home: Scaffold(
          body: TextVoice(),
        ),
      );
    }
  
  class TextVoice extends StatelessWidget {
    final FlutterTts flutterTts = FlutterTts();
  
    @override
    Widget build(BuildContext context) {
      TextEditingController textEditingController = TextEditingController();
  
      Future _speak(String text) async {
        await flutterTts.setLanguage(&quot;es-MX&quot;);
        await flutterTts.setPitch(1);
        await flutterTts.speak(text);
      }
  
      Future _stop() async {
        await flutterTts.stop();
      }
  
  
      return Scaffold(
          body: Stack(
            children: &lt;Widget&gt;[
              Padding(
                padding: EdgeInsets.all(30.0),
                child: TextFormField(
                  decoration: InputDecoration(
                    hintText: 'Introduce el texto.',
                    labelStyle: TextStyle(color: Colors.white70, fontSize: 16.0),
                    enabledBorder: OutlineInputBorder(
                      borderSide: BorderSide(color: Colors.pink[900]),
                    ),
                    focusedBorder: OutlineInputBorder(
                      borderSide: BorderSide(color: Colors.pink[50]),
                    ),
                    hintStyle: TextStyle(color: Colors.white30, fontSize: 16.0),
                    border: OutlineInputBorder(),
                  ),
                  controller: textEditingController,
                  cursorColor: Colors.white,
                  style: TextStyle(color: Colors.white70, fontSize: 16.0),
                  maxLines: null,
                ),
              ),
            ],
          ),
          floatingActionButtonLocation: FloatingActionButtonLocation.centerFloat,
          bottomNavigationBar: Container(
            color: Colors.black,
            height: 40.0,
            alignment: Alignment.topCenter,
          ),
          floatingActionButton: Padding(
            padding: const EdgeInsets.all(8.0),
            child: Row(
              mainAxisAlignment: MainAxisAlignment.center,
              children: &lt;Widget&gt;[
                FloatingActionButton(
                  backgroundColor: Colors.green,
                  heroTag: &quot;btn&quot;,
                  onPressed: () =&gt; _speak(textEditingController.text),
                  child: Icon(Icons.play_arrow),
                ),
                SizedBox(
                  width: 40,
                ),
                FloatingActionButton(
                  backgroundColor: Colors.red,
                  heroTag: &quot;btn2&quot;,
                  onPressed: () =&gt; _stop(),
                  child: Icon(Icons.stop),
                )
              ],
            ),
          ));
    }
  }
  </code></pre>