Future<File?> takePicture() async { final x = await _controller?.takePicture(); if (x != null) { return File(x.path); } else { return null; } }