getImagePreview method

Uint8List? getImagePreview({
  1. Size? size,
  2. ImageFileFormat? format,
})

Get the preview if available.

Available only if isImagePreviewAvailable returns true.

Returns

  • The resulting image if available, null otherwise

Throws

  • An exception if it fails.

Implementation

Uint8List? getImagePreview({
  final Size? size,
  final ImageFileFormat? format,
}) {
  return GemKitPlatform.instance.callGetImage(
    pointerId,
    'ContentStoreItemGetImagePreview',
    size?.width.toInt() ?? -1,
    size?.height.toInt() ?? -1,
    format?.id ?? -1,
  );
}