getImagePreview method
- Size? size,
- ImageFileFormat? format,
Retrieve the raw preview bytes for this item if available.
This call returns the preview image as a Uint8List. Use isImagePreviewAvailable to
check for availability before calling.
Parameters
size— optional target size for the returned image.format— optional ImageFileFormat describing the requested encoding.
Returns
- The preview image bytes as
Uint8List, ornullwhen no preview is present.
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,
);
}