aspectRatio static method
Implementation
static double? aspectRatio(VideoPlayerValue? value) {
if (value == null || value.size.width == 0 || value.size.height == 0) {
return null;
}
final double aspectRatio = value.size.width / value.size.height;
if (aspectRatio <= 0) {
return 1.0;
}
return aspectRatio;
}