@@ -73,7 +73,7 @@ class TextCaption extends Caption {
7373 /// and [end] .
7474 final String text;
7575
76- /// The subtitile attributes associated with this caption.
76+ /// The subtitle attributes associated with this caption.
7777 final List <SubtitleAttribute ?>? subtitleAttributes;
7878
7979 /// Specifies how the text in the closed caption should look.
@@ -89,7 +89,7 @@ class TextCaption extends Caption {
8989 subtitleAttributes: < SubtitleAttribute ? > [],
9090 );
9191
92- static Color ? _toColor (int colorValue) {
92+ static Color ? _intToColor (int colorValue) {
9393 String hexValue = colorValue.toRadixString (16 );
9494 if (hexValue.length < 6 ) {
9595 hexValue = hexValue.padLeft (6 , '0' );
@@ -103,11 +103,11 @@ class TextCaption extends Caption {
103103 return null ;
104104 }
105105
106- static FontWeight _toWeight (int weightValue) {
106+ static FontWeight _intToFontWeight (int weightValue) {
107107 return weightValue == 0 ? FontWeight .normal : FontWeight .bold;
108108 }
109109
110- static FontStyle _toStyle (int styleValue) {
110+ static FontStyle _intToFontStyle (int styleValue) {
111111 return styleValue == 0 ? FontStyle .normal : FontStyle .italic;
112112 }
113113
@@ -131,19 +131,19 @@ class TextCaption extends Caption {
131131 }
132132 case SubtitleAttrType .subAttrFontWeight:
133133 actualTextStyle = actualTextStyle.copyWith (
134- fontWeight: _toWeight (attr.attrValue as int ));
134+ fontWeight: _intToFontWeight (attr.attrValue as int ));
135135 case SubtitleAttrType .subAttrFontStyle:
136136 actualTextStyle = actualTextStyle.copyWith (
137- fontStyle: _toStyle (attr.attrValue as int ));
137+ fontStyle: _intToFontStyle (attr.attrValue as int ));
138138 case SubtitleAttrType .subAttrFontColor:
139139 if (actualTextStyle.foreground == null ) {
140140 actualTextStyle = actualTextStyle.copyWith (
141- color: _toColor (attr.attrValue as int ));
141+ color: _intToColor (attr.attrValue as int ));
142142 }
143143 case SubtitleAttrType .subAttrFontBgColor:
144144 if (actualTextStyle.background == null ) {
145145 actualTextStyle = actualTextStyle.copyWith (
146- backgroundColor: _toColor (attr.attrValue as int ));
146+ backgroundColor: _intToColor (attr.attrValue as int ));
147147 }
148148 case SubtitleAttrType .subAttrFontOpacity:
149149 actualTextStyle = actualTextStyle.copyWith (
@@ -156,10 +156,6 @@ class TextCaption extends Caption {
156156 case SubtitleAttrType .subAttrFontTextOutlineColor:
157157 case SubtitleAttrType .subAttrFontTextOutlineThickness:
158158 case SubtitleAttrType .subAttrFontTextOutlineBlurRadius:
159- // actualTextStyle = actualTextStyle.copyWith(shadows: <Shadow>[
160- // const Shadow(color: Colors.green, offset: Offset(1, 1))
161- // ]);
162- break ;
163159 case SubtitleAttrType .subAttrRegionXPos:
164160 case SubtitleAttrType .subAttrRegionYPos:
165161 case SubtitleAttrType .subAttrRegionWidth:
0 commit comments