We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 77bd460 commit 3ca9a0cCopy full SHA for 3ca9a0c
lib/src/replaced_element.dart
@@ -249,9 +249,11 @@ class VideoContentElement extends ReplacedElement {
249
250
@override
251
Widget toWidget(RenderContext context) {
252
+ final double _width = width ?? (height ?? 150) * 2;
253
+ final double _height = height ?? (width ?? 300) / 2;
254
return Container(
- width: width ?? (height ?? 150) * 2,
- height: height ?? (width ?? 300) / 2,
255
+ width: _width,
256
+ height: _height,
257
child: Chewie(
258
controller: ChewieController(
259
videoPlayerController: VideoPlayerController.network(
@@ -264,6 +266,7 @@ class VideoContentElement extends ReplacedElement {
264
266
looping: loop,
265
267
showControls: showControls,
268
autoInitialize: true,
269
+ aspectRatio: _width / _height,
270
),
271
272
);
0 commit comments