takePhoto method
Implementation
Future<void> takePhoto(BuildContext context) async {
if (cameraInitialized.value) {
Helper.showLoading(buildContext: context);
XFile? file = await cameraController?.takePicture();
debugPrint("file : ${file?.path}");
if (context.mounted) Helper.hideLoading(context: context);
// Get.back(result: file);
if (context.mounted) Navigator.pop(context, file);
}
}