File tree Expand file tree Collapse file tree 1 file changed +12
-9
lines changed
Expand file tree Collapse file tree 1 file changed +12
-9
lines changed Original file line number Diff line number Diff line change @@ -83,15 +83,18 @@ class PlayerWithControls extends StatelessWidget {
8383 );
8484 }
8585
86- return Center (
87- child: SizedBox (
88- height: MediaQuery .of (context).size.height,
89- width: MediaQuery .of (context).size.width,
90- child: AspectRatio (
91- aspectRatio: calculateAspectRatio (context),
92- child: buildPlayerWithControls (chewieController, context),
86+ return LayoutBuilder (
87+ builder: (BuildContext context, BoxConstraints constraints) {
88+ return Center (
89+ child: SizedBox (
90+ height: constraints.maxHeight,
91+ width: constraints.maxWidth,
92+ child: AspectRatio (
93+ aspectRatio: calculateAspectRatio (context),
94+ child: buildPlayerWithControls (chewieController, context),
95+ ),
9396 ),
94- ),
95- );
97+ );
98+ } );
9699 }
97100}
You can’t perform that action at this time.
0 commit comments