takePicture method

  1. @override
Future<XFile> takePicture(
  1. int handle,
  2. DeviceOrientation snapshotOrientation
)
override

Take a still photo. snapshotOrientation is applied to the photo connection just before capture so the file's EXIF orientation matches how the user was holding the device.

Implementation

@override
Future<XFile> takePicture(
  int handle,
  DeviceOrientation snapshotOrientation,
) async {
  takePictureCalls.add((
    handle: handle,
    snapshotOrientation: snapshotOrientation,
  ));
  final err = takePictureError;
  if (err != null) throw err;
  return XFile(picturePath);
}