Update: 2026-05-07 22:19:17
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
import 'package:get/get.dart';
|
||||
|
||||
class VoiceResult {
|
||||
final String action;
|
||||
final Map<String, dynamic> params;
|
||||
final String confirmation;
|
||||
|
||||
VoiceResult({
|
||||
required this.action,
|
||||
required this.params,
|
||||
required this.confirmation,
|
||||
});
|
||||
}
|
||||
|
||||
class VoiceController extends GetxController {
|
||||
var isListening = false.obs;
|
||||
var isProcessing = false.obs;
|
||||
var hasPermission = true.obs;
|
||||
var recognizedText = ''.obs;
|
||||
var errorMessage = ''.obs;
|
||||
Rx<VoiceResult?> lastResult = Rx<VoiceResult?>(null);
|
||||
|
||||
void startListening() {
|
||||
isListening.value = true;
|
||||
errorMessage.value = '';
|
||||
// Mock implementation
|
||||
}
|
||||
|
||||
void stopListening() {
|
||||
isListening.value = false;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user