fluttercommunity / fluttercommunity/chewie
Aspect ratio improvement
- 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.