isCameraAvailable method
Checks if a camera with the specified cameraLensDirection is available.
This method returns true if a camera matching the given direction is found,
and false if no such camera is available.
Example usage:
bool isAvailable = await isCameraAvailable(CameraLensDirection.front);
Implementation
Future<bool> isCameraAvailable(CameraLensDirection cameraLensDirection) async {
return await _getCameraBasedOnFacingType(cameraLensDirection) != null;
}