takePhoto method

Future<String?> takePhoto({
  1. String? fileName,
})

Captures a still photo and returns the saved file path when supported.

Implementation

Future<String?> takePhoto({String? fileName}) {
  if (!_isRunning) throw StateError('Camera is not running.');
  if (fileName != null && fileName.trim().isEmpty) {
    throw ArgumentError.value(fileName, 'fileName', 'File name is empty.');
  }
  return NexoraSdkPlatform.instance.takePhoto(fileName: fileName);
}