From f7d39d8544a65f1bbdd54a313977c68e045ce089 Mon Sep 17 00:00:00 2001 From: hailin Date: Tue, 24 Feb 2026 09:21:06 -0800 Subject: [PATCH] fix: use theme-aware colors in voice test page for dark mode readability Replace hardcoded Colors.grey with Theme.of(context).colorScheme for result containers and status text so they're readable in both light and dark themes. Co-Authored-By: Claude Opus 4.6 --- .../presentation/pages/voice_test_page.dart | 26 +++++++++++-------- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/it0_app/lib/features/agent_call/presentation/pages/voice_test_page.dart b/it0_app/lib/features/agent_call/presentation/pages/voice_test_page.dart index 0c8412e..e65b624 100644 --- a/it0_app/lib/features/agent_call/presentation/pages/voice_test_page.dart +++ b/it0_app/lib/features/agent_call/presentation/pages/voice_test_page.dart @@ -301,7 +301,7 @@ class _VoiceTestPageState extends ConsumerState { _provider == _VoiceProvider.openai ? 'STT: gpt-4o-transcribe | TTS: tts-1' : 'STT: faster-whisper | TTS: Kokoro', - style: TextStyle(fontSize: 12, color: Colors.grey[500]), + style: TextStyle(fontSize: 12, color: Theme.of(context).colorScheme.onSurfaceVariant), ), ), ), @@ -335,7 +335,7 @@ class _VoiceTestPageState extends ConsumerState { padding: const EdgeInsets.only(top: 8), child: Text(_ttsStatus, style: - TextStyle(color: Colors.grey[600], fontSize: 13)), + TextStyle(color: Theme.of(context).colorScheme.onSurfaceVariant, fontSize: 13)), ), ], ), @@ -370,7 +370,7 @@ class _VoiceTestPageState extends ConsumerState { padding: const EdgeInsets.only(top: 8), child: Text(_sttStatus, style: - TextStyle(color: Colors.grey[600], fontSize: 13)), + TextStyle(color: Theme.of(context).colorScheme.onSurfaceVariant, fontSize: 13)), ), if (_sttResult.isNotEmpty) Container( @@ -378,11 +378,13 @@ class _VoiceTestPageState extends ConsumerState { margin: const EdgeInsets.only(top: 8), padding: const EdgeInsets.all(12), decoration: BoxDecoration( - color: Colors.grey[100], + color: Theme.of(context).colorScheme.surfaceContainerHighest, borderRadius: BorderRadius.circular(8), ), - child: - Text(_sttResult, style: const TextStyle(fontSize: 16)), + child: Text(_sttResult, + style: TextStyle( + fontSize: 16, + color: Theme.of(context).colorScheme.onSurface)), ), ], ), @@ -418,7 +420,7 @@ class _VoiceTestPageState extends ConsumerState { padding: const EdgeInsets.only(top: 8), child: Text(_rtStatus, style: - TextStyle(color: Colors.grey[600], fontSize: 13)), + TextStyle(color: Theme.of(context).colorScheme.onSurfaceVariant, fontSize: 13)), ), if (_rtResult.isNotEmpty) Container( @@ -426,11 +428,13 @@ class _VoiceTestPageState extends ConsumerState { margin: const EdgeInsets.only(top: 8), padding: const EdgeInsets.all(12), decoration: BoxDecoration( - color: Colors.grey[100], + color: Theme.of(context).colorScheme.surfaceContainerHighest, borderRadius: BorderRadius.circular(8), ), - child: - Text(_rtResult, style: const TextStyle(fontSize: 14)), + child: Text(_rtResult, + style: TextStyle( + fontSize: 14, + color: Theme.of(context).colorScheme.onSurface)), ), ], ), @@ -458,7 +462,7 @@ class _VoiceTestPageState extends ConsumerState { Padding( padding: const EdgeInsets.only(top: 4), child: Text(subtitle, - style: TextStyle(fontSize: 12, color: Colors.grey[500])), + style: TextStyle(fontSize: 12, color: Theme.of(context).colorScheme.onSurfaceVariant)), ), const SizedBox(height: 12), child,