aspectRatio property

double get aspectRatio

SDK-recommended aspect ratio for proportional display.

Returns width divided by height as a convenience for UI layout calculations that need to maintain the image's proportions.

Returns

  • Aspect ratio as a double (width / height)

Implementation

double get aspectRatio {
  final OperationResult resultString = objectMethod(
    pointerId,
    'ImgFlutter',
    'getAspectRatioF',
  );

  return resultString['result'];
}