Skip to content

Commit

Permalink
Merge pull request #777 from bailyzheng/zldev
Browse files Browse the repository at this point in the history
fix display size while Chewie wrapped by some rotate widget
  • Loading branch information
diegotori authored Nov 28, 2023
2 parents 909423d + 3dac4b8 commit 443d761
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 443d761

Please sign in to comment.