File tree Expand file tree Collapse file tree 6 files changed +16
-17
lines changed
Expand file tree Collapse file tree 6 files changed +16
-17
lines changed Original file line number Diff line number Diff line change @@ -21,14 +21,14 @@ class CenterPlayButton extends StatelessWidget {
2121
2222 @override
2323 Widget build (BuildContext context) {
24- return Container (
24+ return ColoredBox (
2525 color: Colors .transparent,
2626 child: Center (
2727 child: UnconstrainedBox (
2828 child: AnimatedOpacity (
2929 opacity: show ? 1.0 : 0.0 ,
3030 duration: const Duration (milliseconds: 300 ),
31- child: Container (
31+ child: DecoratedBox (
3232 decoration: BoxDecoration (
3333 color: backgroundColor,
3434 shape: BoxShape .circle,
Original file line number Diff line number Diff line change @@ -203,14 +203,14 @@ class _CupertinoControlsState extends State<CupertinoControls>
203203
204204 Widget _buildSubtitles (Subtitles subtitles) {
205205 if (! _subtitleOn) {
206- return Container ();
206+ return const SizedBox ();
207207 }
208208 if (_subtitlesPosition == null ) {
209- return Container ();
209+ return const SizedBox ();
210210 }
211211 final currentSubtitle = subtitles.getByPosition (_subtitlesPosition! );
212212 if (currentSubtitle.isEmpty) {
213- return Container ();
213+ return const SizedBox ();
214214 }
215215
216216 if (chewieController.subtitleBuilder != null ) {
@@ -395,7 +395,7 @@ class _CupertinoControlsState extends State<CupertinoControls>
395395 borderRadius: BorderRadius .circular (10.0 ),
396396 child: BackdropFilter (
397397 filter: ui.ImageFilter .blur (sigmaX: 10.0 ),
398- child: Container (
398+ child: ColoredBox (
399399 color: backgroundColor,
400400 child: Container (
401401 height: barHeight,
@@ -468,7 +468,7 @@ class _CupertinoControlsState extends State<CupertinoControls>
468468 Widget _buildSubtitleToggle (Color iconColor, double barHeight) {
469469 //if don't have subtitle hiden button
470470 if (chewieController.subtitle? .isEmpty ?? true ) {
471- return Container ();
471+ return const SizedBox ();
472472 }
473473 return GestureDetector (
474474 onTap: _subtitleToggle,
Original file line number Diff line number Diff line change 11import 'package:chewie/chewie.dart' ;
2- import 'package:chewie/src/material/material_desktop_controls.dart' ;
32import 'package:flutter/material.dart' ;
43
54class AdaptiveControls extends StatelessWidget {
Original file line number Diff line number Diff line change @@ -213,11 +213,11 @@ class _MaterialControlsState extends State<MaterialControls>
213213
214214 Widget _buildSubtitles (BuildContext context, Subtitles subtitles) {
215215 if (! _subtitleOn) {
216- return Container ();
216+ return const SizedBox ();
217217 }
218218 final currentSubtitle = subtitles.getByPosition (_subtitlesPosition);
219219 if (currentSubtitle.isEmpty) {
220- return Container ();
220+ return const SizedBox ();
221221 }
222222
223223 if (chewieController.subtitleBuilder != null ) {
@@ -446,7 +446,7 @@ class _MaterialControlsState extends State<MaterialControls>
446446 Widget _buildSubtitleToggle () {
447447 //if don't have subtitle hiden button
448448 if (chewieController.subtitle? .isEmpty ?? true ) {
449- return Container ();
449+ return const SizedBox ();
450450 }
451451 return GestureDetector (
452452 onTap: _onSubtitleTap,
Original file line number Diff line number Diff line change @@ -206,11 +206,11 @@ class _MaterialDesktopControlsState extends State<MaterialDesktopControls>
206206
207207 Widget _buildSubtitles (BuildContext context, Subtitles subtitles) {
208208 if (! _subtitleOn) {
209- return Container ();
209+ return const SizedBox ();
210210 }
211211 final currentSubtitle = subtitles.getByPosition (_subtitlesPosition);
212212 if (currentSubtitle.isEmpty) {
213- return Container ();
213+ return const SizedBox ();
214214 }
215215
216216 if (chewieController.subtitleBuilder != null ) {
Original file line number Diff line number Diff line change @@ -26,7 +26,7 @@ class PlayerWithControls extends StatelessWidget {
2626 ) {
2727 return chewieController.showControls
2828 ? chewieController.customControls ?? const AdaptiveControls ()
29- : Container ();
29+ : const SizedBox ();
3030 }
3131
3232 Widget _buildPlayerWithControls (
@@ -65,9 +65,9 @@ class PlayerWithControls extends StatelessWidget {
6565 duration: const Duration (
6666 milliseconds: 250 ,
6767 ),
68- child: Container (
69- decoration: const BoxDecoration (color: Colors .black54),
70- child: Container (),
68+ child: const DecoratedBox (
69+ decoration: BoxDecoration (color: Colors .black54),
70+ child: SizedBox (),
7171 ),
7272 ),
7373 ),
You can’t perform that action at this time.
0 commit comments