Summary
Adopt the MVVM architecture for the voice-to-text feature and organize the project structure accordingly.
Requirements
- Restructure the
lib/ tree to follow a feature-first layout with MVVM layers.
core/ for shared models, services, utilities.
features/voice_to_text/ containing view/, viewmodel/, models/, widgets/, and optional feature services.
- Introduce a
VoiceToTextViewModel that exposes observable state (transcript, active word index, timer, waveform data, recording state) and command methods (start/pause/stop recording, update transcript/waveform).
- Ensure view widgets depend only on ViewModel outputs and forward user interactions to ViewModel commands.
- Inject dependencies (audio capture, speech recognition, storage) via constructors using a DI mechanism (
Provider, get_it, or equivalent).
- Add unit tests for the ViewModel covering state transitions and service interactions.
Acceptance Criteria
Summary
Adopt the MVVM architecture for the voice-to-text feature and organize the project structure accordingly.
Requirements
lib/tree to follow a feature-first layout with MVVM layers.core/for shared models, services, utilities.features/voice_to_text/containingview/,viewmodel/,models/,widgets/, and optional feature services.VoiceToTextViewModelthat exposes observable state (transcript, active word index, timer, waveform data, recording state) and command methods (start/pause/stop recording, update transcript/waveform).Provider,get_it, or equivalent).Acceptance Criteria
VoiceToTextViewModelexists with defined state and command API, decoupled from UI widgets.