Skip to content

Commit

Permalink
fix display size while Chewie wrapped by some rotate widget
Browse files Browse the repository at this point in the history
  • Loading branch information
stones committed Sep 13, 2023
1 parent 015a986 commit 3dac4b8
Showing 1 changed file with 12 additions and 9 deletions.
21 changes: 12 additions & 9 deletions lib/src/player_with_controls.dart
Original file line number Diff line number Diff line change
Expand Up @@ -83,15 +83,18 @@ class PlayerWithControls extends StatelessWidget {
);
}

return Center(
child: SizedBox(
height: MediaQuery.of(context).size.height,
width: MediaQuery.of(context).size.width,
child: AspectRatio(
aspectRatio: calculateAspectRatio(context),
child: buildPlayerWithControls(chewieController, context),
return LayoutBuilder(
builder: (BuildContext context, BoxConstraints constraints) {
return Center(
child: SizedBox(
height: constraints.maxHeight,
width: constraints.maxWidth,
child: AspectRatio(
aspectRatio: calculateAspectRatio(context),
child: buildPlayerWithControls(chewieController, context),
),
),
),
);
);
});
}
}

0 comments on commit 3dac4b8

Please sign in to comment.