takePicture method
Implementation
Future<void> takePicture() async {
if (_faceDetectorService.faceDetected) {
await _cameraService.takePicture();
setState(() => _isPictureTaken = true);
} else {
showDialog(context: context,
builder: (context) =>
const AlertDialog(content: Text('No face detected!')));
}
}