File tree Expand file tree Collapse file tree 9 files changed +35
-29
lines changed Expand file tree Collapse file tree 9 files changed +35
-29
lines changed Original file line number Diff line number Diff line change @@ -194,7 +194,7 @@ class __PlayAbleMasterTileState extends State<_PlayAbleMasterTile> {
194
194
icon: Icon (
195
195
isPlaying && isEnQueued ? Iconz .pause : Iconz .playFilled,
196
196
size: kTinyButtonIconSize,
197
- color: context.theme.colorScheme.primary ,
197
+ color: context.theme.colorScheme.onSurface ,
198
198
),
199
199
),
200
200
),
Original file line number Diff line number Diff line change @@ -13,21 +13,19 @@ class MobileBottomBar extends StatelessWidget with WatchItMixin {
13
13
14
14
@override
15
15
Widget build (BuildContext context) {
16
- final color = watchPropertyValue (
17
- (PlayerModel m) {
18
- final theme = context.theme;
19
- return Color .alphaBlend (
20
- m.color? .withAlpha (theme.isLight ? 20 : 40 ) ??
21
- theme.scaffoldBackgroundColor,
22
- context.theme.scaffoldBackgroundColor,
23
- );
24
- },
25
- );
16
+ final theme = context.theme;
17
+ final color = watchPropertyValue ((PlayerModel m) => m.color);
18
+
26
19
return SizedBox (
27
20
width: context.mediaQuerySize.width,
28
21
child: RepaintBoundary (
29
22
child: Material (
30
- color: color,
23
+ color: color == null
24
+ ? theme.cardColor
25
+ : Color .alphaBlend (
26
+ color.withAlpha (theme.isLight ? 20 : 40 ),
27
+ theme.scaffoldBackgroundColor,
28
+ ),
31
29
child: Column (
32
30
mainAxisSize: MainAxisSize .min,
33
31
children: [
Original file line number Diff line number Diff line change @@ -2,6 +2,8 @@ import 'package:collection/collection.dart';
2
2
import 'package:flutter/material.dart' ;
3
3
import 'package:watch_it/watch_it.dart' ;
4
4
5
+ import '../../common/page_ids.dart' ;
6
+ import '../../common/view/icons.dart' ;
5
7
import '../../common/view/ui_constants.dart' ;
6
8
import '../../extensions/build_context_x.dart' ;
7
9
import '../../player/player_model.dart' ;
@@ -117,9 +119,13 @@ class MasterRail extends StatelessWidget with WatchItMixin {
117
119
final destinations = permanentMasterItems
118
120
.map (
119
121
(e) => NavigationRailDestination (
120
- icon: e.iconBuilder (false ),
122
+ icon: e.pageId == PageIDs .likedAudios
123
+ ? Icon (Iconz .heart)
124
+ : e.iconBuilder (false ),
121
125
label: e.titleBuilder (context),
122
- selectedIcon: e.iconBuilder (true ),
126
+ selectedIcon: e.pageId == PageIDs .likedAudios
127
+ ? Icon (Iconz .heartFilled)
128
+ : e.iconBuilder (true ),
123
129
padding: const EdgeInsets .symmetric (vertical: kSmallestSpace),
124
130
),
125
131
)
Original file line number Diff line number Diff line change @@ -52,7 +52,7 @@ class BottomPlayerImage extends StatelessWidget with WatchItMixin {
52
52
Widget child;
53
53
54
54
final fallBackImage = PlayerFallBackImage (
55
- audio : audio,
55
+ audioType : audio? .audioType ,
56
56
height: size,
57
57
width: size,
58
58
);
Original file line number Diff line number Diff line change @@ -38,7 +38,7 @@ class FullHeightPlayerImage extends StatelessWidget with WatchItMixin {
38
38
39
39
final fallBackImage = PlayerFallBackImage (
40
40
noIcon: emptyFallBack,
41
- audio : audio,
41
+ audioType : audio? .audioType ,
42
42
height: theHeight,
43
43
width: theWidth,
44
44
);
Original file line number Diff line number Diff line change @@ -25,10 +25,9 @@ class PlayerColor extends StatelessWidget with WatchItMixin {
25
25
final baseColor =
26
26
watchPropertyValue ((PlayerModel m) => m.color? .withValues (alpha: 0.4 ));
27
27
28
- final color = (baseColor ?? theme.cardColor).scale (
29
- lightness: theme.isLight ? - 0.1 : 0.2 ,
30
- saturation: theme.isLight ? 0.9 : 0.5 ,
31
- );
28
+ final color = baseColor? .scale (lightness: theme.isLight ? - 0.1 : 0.2 ) ??
29
+ theme.scaffoldBackgroundColor;
30
+
32
31
return Opacity (
33
32
opacity: alpha * 0.8 ,
34
33
child: Container (
Original file line number Diff line number Diff line change 1
1
import 'package:flutter/material.dart' ;
2
2
import 'package:yaru/yaru.dart' ;
3
3
4
- import '../../common/data/audio .dart' ;
4
+ import '../../common/data/audio_type .dart' ;
5
5
import '../../common/view/icons.dart' ;
6
6
import '../../extensions/build_context_x.dart' ;
7
7
import '../../extensions/theme_data_x.dart' ;
8
8
9
9
class PlayerFallBackImage extends StatelessWidget {
10
10
const PlayerFallBackImage ({
11
11
super .key,
12
- this .audio ,
12
+ this .audioType ,
13
13
required this .height,
14
14
required this .width,
15
15
this .noIcon = false ,
16
- this .color,
17
16
});
18
17
19
- final Audio ? audio ;
18
+ final AudioType ? audioType ;
20
19
final double height;
21
20
final double width;
22
21
final bool noIcon;
23
- final Color ? color;
24
22
25
23
@override
26
24
Widget build (BuildContext context) {
27
25
final iconSize = width * 0.7 ;
28
26
final theme = context.theme;
29
- final color = this .color ?? theme.primaryColor;
27
+ final color = theme.cardColor.scale (
28
+ lightness: theme.isLight ? - 0.15 : 0.3 ,
29
+ );
30
30
return Center (
31
31
child: Container (
32
32
decoration: BoxDecoration (
@@ -50,7 +50,7 @@ class PlayerFallBackImage extends StatelessWidget {
50
50
child: noIcon
51
51
? null
52
52
: Icon (
53
- audio ? . audioType? .iconData ?? Iconz .musicNote,
53
+ audioType? .iconData ?? Iconz .musicNote,
54
54
size: iconSize,
55
55
color: contrastColor (color),
56
56
),
Original file line number Diff line number Diff line change 1
1
import 'package:flutter/material.dart' ;
2
+ import 'package:phoenix_theme/phoenix_theme.dart' ;
2
3
import 'package:watch_it/watch_it.dart' ;
3
4
4
5
import '../../common/view/safe_network_image.dart' ;
@@ -26,7 +27,9 @@ class PlayerRemoteSourceImage extends StatelessWidget with WatchItMixin {
26
27
final theme = context.theme;
27
28
28
29
return Container (
29
- color: theme.cardColor,
30
+ color: theme.cardColor.scale (
31
+ lightness: theme.isLight ? - 0.15 : 0.3 ,
32
+ ),
30
33
height: height,
31
34
width: width,
32
35
child: SafeNetworkImage (
Original file line number Diff line number Diff line change @@ -64,7 +64,7 @@ class _SettingsPageState extends State<SettingsPage> {
64
64
constraints: constraints,
65
65
limit: 600 ,
66
66
min: 0 ,
67
- ).copyWith (bottom: bottomPlayerDefaultHeight),
67
+ ).copyWith (bottom: bottomPlayerDefaultHeight * 2 ),
68
68
children: const [
69
69
ThemeSection (),
70
70
PodcastSection (),
You can’t perform that action at this time.
0 commit comments