5/18/1
This commit is contained in:
@@ -6,7 +6,7 @@ import 'package:get/get.dart';
|
||||
|
||||
class TextToSpeechController extends GetxController {
|
||||
final flutterTts = FlutterTts();
|
||||
|
||||
bool isComplete = false;
|
||||
// Initialize TTS in initState
|
||||
@override
|
||||
void onInit() {
|
||||
@@ -41,6 +41,8 @@ class TextToSpeechController extends GetxController {
|
||||
if (result == 1) {
|
||||
// TTS operation has started
|
||||
// You can perform additional operations here, if needed
|
||||
isComplete = true;
|
||||
update();
|
||||
}
|
||||
} catch (error) {
|
||||
// Handle error gracefully, e.g., show a message
|
||||
|
||||
Reference in New Issue
Block a user