Skip to content

Commit d480aff

Browse files
authored
Merge pull request Sub6Resources#417 from Sub6Resources/new-parser
New parser - small oopsie
2 parents f1c5267 + 54be788 commit d480aff

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

lib/src/replaced_element.dart

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -249,9 +249,9 @@ class VideoContentElement extends ReplacedElement {
249249

250250
@override
251251
Widget toWidget(RenderContext context) {
252+
final double _width = width ?? (height ?? 150) * 2;
253+
final double _height = height ?? (width ?? 300) / 2;
252254
return Container(
253-
width: width ?? (height ?? 150) * 2,
254-
height: height ?? (width ?? 300) / 2,
255255
child: Chewie(
256256
controller: ChewieController(
257257
videoPlayerController: VideoPlayerController.network(
@@ -264,6 +264,7 @@ class VideoContentElement extends ReplacedElement {
264264
looping: loop,
265265
showControls: showControls,
266266
autoInitialize: true,
267+
aspectRatio: _width / _height,
267268
),
268269
),
269270
);

0 commit comments

Comments
 (0)