aspectRatio property

double get aspectRatio

Implementation

double get aspectRatio {
  if (!isInitialized || size.width == 0 || size.height == 0) {
    return 1.0;
  }
  final double aspectRatio = size.width / size.height;
  if (aspectRatio <= 0) {
    return 1.0;
  }
  return aspectRatio;
}