Line data Source code
1 : import 'package:flutter/cupertino.dart';
2 :
3 : /// Theme data for customizing the ExpandedGoogleCastPlayerController widget.
4 : class GoogleCastPlayerTheme {
5 : /// Background color for the player.
6 : final Color? backgroundColor;
7 :
8 : /// Background gradient for the player.
9 : final Gradient? backgroundGradient;
10 :
11 : /// Text style for the media title.
12 : final TextStyle? titleTextStyle;
13 :
14 : /// Text style for the device name.
15 : final TextStyle? deviceTextStyle;
16 :
17 : /// Text style for time displays.
18 : final TextStyle? timeTextStyle;
19 :
20 : /// Color for icons.
21 : final Color? iconColor;
22 :
23 : /// Color for disabled icons.
24 : final Color? disabledIconColor;
25 :
26 : /// Size of icons.
27 : final double? iconSize;
28 :
29 : /// Custom background widget.
30 : final Widget? backgroundWidget;
31 :
32 : /// Border radius for media images.
33 : final BorderRadius? imageBorderRadius;
34 :
35 : /// Shadow for media images.
36 : final List<BoxShadow>? imageShadow;
37 :
38 : /// Maximum width for media images.
39 : final double? imageMaxWidth;
40 :
41 : /// Maximum height for media images.
42 : final double? imageMaxHeight;
43 :
44 : /// Fit for media images.
45 : final BoxFit? imageFit;
46 :
47 : /// Fallback widget when no image is available.
48 : final Widget? noImageFallback;
49 :
50 : /// Background color for popup menus (like captions menu)
51 : final Color? popupBackgroundColor;
52 :
53 : /// Text color for popup menu items
54 : final Color? popupTextColor;
55 :
56 : /// Text style for popup menu items
57 : final TextStyle? popupTextStyle;
58 :
59 : /// Volume slider active color
60 : final Color? volumeSliderActiveColor;
61 :
62 : /// Volume slider inactive color
63 : final Color? volumeSliderInactiveColor;
64 :
65 : /// Volume slider thumb color
66 : final Color? volumeSliderThumbColor;
67 :
68 : /// Creates a new [GoogleCastPlayerTheme].
69 0 : const GoogleCastPlayerTheme({
70 : this.backgroundColor,
71 : this.backgroundGradient,
72 : this.titleTextStyle,
73 : this.deviceTextStyle,
74 : this.timeTextStyle,
75 : this.iconColor,
76 : this.disabledIconColor,
77 : this.iconSize,
78 : this.backgroundWidget,
79 : this.imageBorderRadius,
80 : this.imageShadow,
81 : this.imageMaxWidth,
82 : this.imageMaxHeight,
83 : this.imageFit,
84 : this.noImageFallback,
85 : this.popupBackgroundColor,
86 : this.popupTextColor,
87 : this.popupTextStyle,
88 : this.volumeSliderActiveColor,
89 : this.volumeSliderInactiveColor,
90 : this.volumeSliderThumbColor,
91 : });
92 : }
|