Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting
| import 'package:flutter/material.dart'; | ||
|
|
||
| class TimerDisplay extends StatelessWidget { | ||
| const TimerDisplay({super.key, required this.duration}); | ||
|
|
||
| final Duration duration; | ||
|
|
||
| @override | ||
| Widget build(BuildContext context) { | ||
| final textTheme = Theme.of(context).textTheme; | ||
| final style = | ||
| textTheme.titleMedium?.copyWith( | ||
| fontSize: 18, | ||
| fontWeight: FontWeight.w500, | ||
| color: Colors.grey.shade600, | ||
| letterSpacing: 1.2, | ||
| fontFeatures: const [FontFeature.tabularFigures()], | ||
| ) ?? | ||
| const TextStyle( | ||
| fontSize: 18, | ||
| fontWeight: FontWeight.w500, | ||
| color: Color(0xFF757575), | ||
| letterSpacing: 1.2, | ||
| fontFeatures: [FontFeature.tabularFigures()], |
There was a problem hiding this comment.
[P0] Import FontFeature to compile TimerDisplay
The new TimerDisplay widget calls FontFeature.tabularFigures() but the file only imports package:flutter/material.dart. FontFeature lives in dart:ui and is not re-exported by the Material barrel, so the widget fails to compile with Undefined class 'FontFeature'. Add an explicit dart:ui import (or prefix the symbol) so the timer can build.
Useful? React with 👍 / 👎.
Summary
Extend
lib/features/voice_to_text/view/voice_to_text_model.dartwith elapsed-duration state plusstartTimer,pauseTimer, andresetTimer, ensuring the timer cancels on dispose.Introduce
TimerDisplay(lib/features/voice_to_text/widget/timer_display.dart) and render itbeneath the waveform, auto-starting the timer from
_VoiceToTextViewState(lib/features/voice_to_text/view/ voice_to_text_screen.dart).Add targeted coverage: fake-async unit tests for timer transitions (
test/features/voice_to_text/view/ voice_to_text_model_test.dart) and a widget test for MM:SS formatting (test/features/voice_to_text/widget/ timer_display_test.dart).Declare the
fake_asyncdev dependency inpubspec.yaml/pubspec.lock.Testing
flutter test