screenshot method

Future<Uint8List?> screenshot({
  1. String? format = 'image/jpeg',
})

Takes the snapshot of the current video frame & returns encoded image bytes as Uint8List.

The format parameter specifies the format of the image to be returned. Supported values are:

  • image/jpeg: Returns a JPEG encoded image.
  • image/png: Returns a PNG encoded image.
  • null: Returns BGRA pixel buffer.

Implementation

Future<Uint8List?> screenshot({String? format = 'image/jpeg'}) async {
  return platform?.screenshot(
    format: format,
  );
}