Skip to content

Commit

Permalink
fix(lib): privatize player video build methods
Browse files Browse the repository at this point in the history
  • Loading branch information
ThibaultBee committed Oct 30, 2023
1 parent 071555f commit 82f1d86
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/src/widgets/apivideo_player_video.dart
Original file line number Diff line number Diff line change
Expand Up @@ -79,10 +79,10 @@ class _PlayerVideoState extends State<PlayerVideo> {
Widget build(BuildContext context) {
return _textureId == ApiVideoPlayerController.kUninitializedTextureId
? Container()
: buildPlayer();
: _buildPlayer();
}

Widget buildPlayer() => LayoutBuilder(
Widget _buildPlayer() => LayoutBuilder(
builder: (BuildContext context, BoxConstraints constraints) {
return Stack(alignment: Alignment.center, children: [
// See https://github.com/flutter/flutter/issues/17287
Expand All @@ -97,11 +97,11 @@ class _PlayerVideoState extends State<PlayerVideo> {
width: _size.width,
height: _size.height,
child: _playerPlatform.buildView(_textureId))))),
buildFittedPlayerOverlay(constraints)
_buildFittedPlayerOverlay(constraints)
]);
});

Widget buildFittedPlayerOverlay(BoxConstraints constraints) {
Widget _buildFittedPlayerOverlay(BoxConstraints constraints) {
final fittedSize = applyBoxFit(widget.fit, _size, constraints.biggest);
return SizedBox(
width: fittedSize.destination.width,
Expand Down

0 comments on commit 82f1d86

Please sign in to comment.