@@ -12,24 +12,24 @@ class PlayerWithControls extends StatelessWidget {
1212 Widget build (BuildContext context) {
1313 final ChewieController chewieController = ChewieController .of (context);
1414
15- double _calculateAspectRatio (BuildContext context) {
15+ double calculateAspectRatio (BuildContext context) {
1616 final size = MediaQuery .of (context).size;
1717 final width = size.width;
1818 final height = size.height;
1919
2020 return width > height ? width / height : height / width;
2121 }
2222
23- Widget _buildControls (
23+ Widget buildControls (
2424 BuildContext context,
2525 ChewieController chewieController,
2626 ) {
2727 return chewieController.showControls
2828 ? chewieController.customControls ?? const AdaptiveControls ()
29- : Container ();
29+ : const SizedBox ();
3030 }
3131
32- Widget _buildPlayerWithControls (
32+ Widget buildPlayerWithControls (
3333 ChewieController chewieController,
3434 BuildContext context,
3535 ) {
@@ -65,19 +65,19 @@ 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 ),
7474 ),
7575 if (! chewieController.isFullScreen)
76- _buildControls (context, chewieController)
76+ buildControls (context, chewieController)
7777 else
7878 SafeArea (
7979 bottom: false ,
80- child: _buildControls (context, chewieController),
80+ child: buildControls (context, chewieController),
8181 ),
8282 ],
8383 );
@@ -88,8 +88,8 @@ class PlayerWithControls extends StatelessWidget {
8888 height: MediaQuery .of (context).size.height,
8989 width: MediaQuery .of (context).size.width,
9090 child: AspectRatio (
91- aspectRatio: _calculateAspectRatio (context),
92- child: _buildPlayerWithControls (chewieController, context),
91+ aspectRatio: calculateAspectRatio (context),
92+ child: buildPlayerWithControls (chewieController, context),
9393 ),
9494 ),
9595 );
0 commit comments