getImagePreview method

  1. @override
Future<Uint8List?> getImagePreview(
  1. String path
)
override

Retrieves an image thumbnail/preview as a byte array. path - The path of the image file. Returns Uint8List containing image data or null if unavailable. Example:

Uint8List? preview = await MethodChannelMediaManager().getImagePreview('/path/to/image.jpg');

Implementation

@override
Future<Uint8List?> getImagePreview(String path) async {
  final Uint8List? data = await methodChannel.invokeMethod(
    'getImagePreview',
    {'path': path},
  );
  return data;
}