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 {
  final m = await _invokeMap('takePicture', {
    'handle': handle,
    'snapshotOrientation': _orientationArg(snapshotOrientation),
  });
  return XFile(m['path'] as String);
}