fluttercommunity / fluttercommunity/chewie

Aspect ratio improvement

Open
#87 3 comments 3 reactions 0 assignees View on GitHub
enhancement
Dominant language
Dart
Stars
2.1k
Forks
1.1k
Avg merge
6d 8h
Merged PRs (30d)
6

Description

@brianegan It would be cool to add one more improvement to Chewie. As we have autoinit - we can also add aspectRatio from controller value.
I see this as:
```
double _calculateAspectRatio(BuildContext context) {
final size = MediaQuery.of(context).size;
final width = size.width;
final height = size.height;

return _controller.value.initialized
? _controller.value.aspectRatio
: width > height ? width / height : height / width;
}
```

It can simplify video displaying in proper shape.
Waiting for your feedback
Thanks in advance

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.