aspectRatio property
double
get
aspectRatio
Aspect ratio with a graceful fall-through to 1:1 before the first
frame is decoded. Compose / gallery wrap the player in
AspectRatio and would otherwise divide by zero.
Implementation
double get aspectRatio {
if (size.width <= 0 || size.height <= 0) return 1.0;
return size.width / size.height;
}