Fixed voice selector colors

This commit is contained in:
JHubi1 2024-06-25 21:30:10 +02:00
parent feab8d65a8
commit 666aff0a2a
No known key found for this signature in database
GPG Key ID: 7BF82570CBBBD050
2 changed files with 13 additions and 14 deletions

View File

@ -8,7 +8,7 @@ import 'package:ollama_app/worker/setter.dart';
import 'package:speech_to_text/speech_to_text.dart' as stt; import 'package:speech_to_text/speech_to_text.dart' as stt;
import 'package:ollama_dart/ollama_dart.dart' as llama; import 'package:ollama_dart/ollama_dart.dart' as llama;
import 'package:datetime_loop/datetime_loop.dart'; import 'package:datetime_loop/datetime_loop.dart';
import 'package:volume_controller/volume_controller.dart'; // import 'package:volume_controller/volume_controller.dart';
import 'main.dart'; import 'main.dart';
import 'worker/sender.dart'; import 'worker/sender.dart';

View File

@ -277,26 +277,25 @@ class _ScreenSettingsVoiceState extends State<ScreenSettingsVoice> {
: (voiceLanguageOptionsAvailable.contains(languageOptionIds.elementAt(index))) : (voiceLanguageOptionsAvailable.contains(languageOptionIds.elementAt(index)))
? const Icon(Icons.spatial_tracking_rounded) ? const Icon(Icons.spatial_tracking_rounded)
: null, : null,
checkmarkColor: (usedIndex == checkmarkColor: (usedIndex == index &&
index) !(prefs?.getBool("useDeviceTheme") ??
false))
? ((MediaQuery.of(context).platformBrightness == Brightness.light) ? ((MediaQuery.of(context).platformBrightness == Brightness.light)
? (theme ?? ThemeData()).colorScheme.secondary ? (theme ?? ThemeData()).colorScheme.secondary
: (themeDark ?? ThemeData.dark()).colorScheme.secondary) : (themeDark ?? ThemeData.dark()).colorScheme.secondary)
: null, : null,
labelStyle: (usedIndex == labelStyle: (usedIndex == index &&
index) !(prefs?.getBool("useDeviceTheme") ??
false))
? TextStyle( ? TextStyle(
color: (MediaQuery.of(context).platformBrightness == Brightness.light) ? (theme ?? ThemeData()).colorScheme.secondary : (themeDark ?? ThemeData.dark()).colorScheme.secondary) color: (MediaQuery.of(context).platformBrightness == Brightness.light) ? (theme ?? ThemeData()).colorScheme.secondary : (themeDark ?? ThemeData.dark()).colorScheme.secondary)
: null, : null,
selectedColor: (MediaQuery.of(context).platformBrightness == selectedColor: (prefs?.getBool("useDeviceTheme") ??
Brightness false)
.light) ? null
? (theme ?? ThemeData()) : (MediaQuery.of(context).platformBrightness == Brightness.light)
.colorScheme ? (theme ?? ThemeData()).colorScheme.primary
.primary : (themeDark ?? ThemeData.dark()).colorScheme.primary,
: (themeDark ?? ThemeData.dark())
.colorScheme
.primary,
onSelected: onSelected:
(bool (bool
selected) { selected) {