onThumbnailGenerated property

ThumbnailGeneratedCallback? onThumbnailGenerated
final

A callback function that is called when the editing is complete and the thumbnail image is generated, along with capturing the original image as a raw ui.Image.

This callback is particularly useful if you have a high-resolution image that typically takes a long time to generate. It allows you to display the thumbnail quickly while the conversion of the original image runs in the background. When you use this callback, it will disable the onImageEditingComplete callback.

  • thumbnailBytes: The bytes of the generated thumbnail image.
  • rawImage: The raw ui.Image object of the original image.

Example usage:

onThumbnailGenerated: (Uint8List thumbnailBytes, ui.Image rawImage) async {
  // Perform operations with the thumbnail bytes and raw image
};

Implementation

final ThumbnailGeneratedCallback? onThumbnailGenerated;