size property

Size get size

SDK-recommended dimensions for optimal rendering.

Returns the preferred width and height for this image. When no size is specified in rendering methods, this recommendation is used for retrieving the image via getRenderableImage or getRenderableImageBytes.

Returns

  • Size with recommended width and height

Implementation

Size get size {
  final OperationResult resultString = objectMethod(
    pointerId,
    'ImgFlutter',
    'getSize',
  );

  final Map<String, dynamic> decodedVal = resultString['result'];
  return Size(decodedVal['first'] + 0.0, decodedVal['second'] + 0.0);
}