you can use the package below, A Flutter widget that provides a TextField with built-in speech-to-text functionality. This widget makes it easy to add voice input capabilities to your app with minimal setup.
Installation
Add this to your package's `pubspec.yaml` file:
```
dependencies:
speech_to_text_field: ^0.1.1
```
Then run:
```
flutter pub get
```
<https://pub.dev/packages/speech_to_text_field>
[](https://i.sstatic.net/KPiPFcTG.png)
Usage
```dart
SpeechToTextField(
controller: _controller,
labelText: 'Speak something',
hintText: 'Tap the mic and start speaking',
onListeningStarted: () {
print('Started listening');
},
onListeningStopped: () {
print('Stopped listening');
},
onListeningError: (error) {
print('Error: $error');
},
),
```
you can use the package below, A Flutter widget that provides a TextField with built-in speech-to-text functionality. This widget makes it easy to add voice input capabilities to your app with minimal setup.
Installation
Add this to your package's `pubspec.yaml` file:
```
dependencies:
speech_to_text_field: ^0.1.1
```
Then run:
```
flutter pub get
```
<https://pub.dev/packages/speech_to_text_field>
[](https://i.sstatic.net/KPiPFcTG.png)
Usage
```dart
SpeechToTextField(
controller: _controller,
labelText: 'Speak something',
hintText: 'Tap the mic and start speaking',
onListeningStarted: () {
print('Started listening');
},
onListeningStopped: () {
print('Stopped listening');
},
onListeningError: (error) {
print('Error: $error');
},
),
```