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:ollama_dart/ollama_dart.dart' as llama;
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 'worker/sender.dart';

View File

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