@@ -5,6 +5,7 @@ import 'package:yaru/yaru.dart';
55
66import '../../common/view/theme.dart' ;
77import '../../extensions/taget_platform_x.dart' ;
8+ import '../../player/player_model.dart' ;
89import '../../settings/settings_model.dart' ;
910import 'desktop_musicpod_app.dart' ;
1011import 'mobile_musicpod_app.dart' ;
@@ -61,19 +62,22 @@ class MaterialMusicPodApp extends StatelessWidget with WatchItMixin {
6162 (SettingsModel m) => m.customThemeColor,
6263 );
6364
65+ final usePlayerColor = watchPropertyValue (
66+ (SettingsModel m) => m.usePlayerColor,
67+ );
68+ final playerColor = watchPropertyValue ((PlayerModel m) => m.color);
69+
6470 return SystemThemeBuilder (
6571 builder: (context, accent) {
72+ final color = playerColor != null && usePlayerColor
73+ ? playerColor
74+ : (customThemeColor != null && useCustomThemeColor
75+ ? Color (customThemeColor)
76+ : accent.accent);
77+
6678 return isMobile
67- ? MobileMusicPodApp (
68- accent: customThemeColor != null && useCustomThemeColor
69- ? Color (customThemeColor)
70- : accent.accent,
71- )
72- : DesktopMusicPodApp (
73- accent: customThemeColor != null && useCustomThemeColor
74- ? Color (customThemeColor)
75- : accent.accent,
76- );
79+ ? MobileMusicPodApp (accent: color)
80+ : DesktopMusicPodApp (accent: color);
7781 },
7882 );
7983 }
0 commit comments