1. Add _baseText variable to track text before recording starts
- Preserves existing text when starting new recording session
- Provides foundation for real-time appending
2. Update real-time result processing logic
- Real-time results now immediately update the text field
- Combine base text + current recognition text
- Move cursor to end for better UX
- Add intelligent spacing between segments
3. Improve final result handling
- Final results update base text for next recording
- Clean state management between recording sessions
4. Update recording status change logic
- Capture base text when recording starts
- Maintain proper state transitions
Now users can see their speech being converted to text in real-time directly in the input field, providing immediate visual feedback during speech recognition.
1. Update UI to show actual _currentText instead of fixed 'realtime recognizing...' text
- Use Flexible widget to handle text overflow
- Show actual recognition text when available
- Fallback to 'realtime recognizing...' when text is empty
2. Fix final result processing logic
- Don't update _currentText when processing final results
- Final results only append to text field, don't interfere with real-time display
3. Improve listening status management
- Clear _currentText when recording stops
- Ensure clean state transitions between recording sessions
This fixes the issue where users could only see final results without real-time feedback.
1. Add finalResult property to SpeechRecognitionResult class
- Distinguish between real-time and final recognition results
- Update factory methods, toString, equals, and hashCode
- Update toMap and fromMap methods
2. Update YxAsrService to support finalResult flag
- Add finalResult parameter to _sendResult method
- Mark final results with finalResult: true
- Keep real-time results as finalResult: false (default)
3. Remove unused methods to clean up codebase
- Remove unused _toggleRecording method
- Remove unused _updateTextController method
- Clean up orphaned comments
These fixes resolve linter errors and ensure proper text appending functionality.
- Change from replacing current text to appending final results
- Distinguish between real-time results (display only) and final results (append to text)
- Add proper spacing between appended text segments
- Maintain history of individual recognition segments
- Clear current text when starting new recording session