takePhoto method
Implementation
void takePhoto(BuildContext context, Color IconBackGroundColor,
Function(String) onDataCameraReceived) async {
XFile file = await _cameraController.takePicture();
Navigator.push(
context,
MaterialPageRoute(
builder: (builder) => CameraViewPage(
path: file.path,
IconBackGroundColor: IconBackGroundColor,
onDataCameraReceived: onDataCameraReceived,
),
),
);
}