getScale method

double getScale(
  1. VideoPlayerController c
)

Implementation

double getScale(VideoPlayerController c) {
  const videoContainerRatio = 0.4;
  final double videoRatio = c.value.aspectRatio;
  if (videoRatio < videoContainerRatio) {
    return videoContainerRatio / videoRatio;
  } else {
    return videoRatio / videoContainerRatio;
  }
}