On Day 7 we made an attempt to implement the camera functionality but the method
await _picker.getImage(source: ImageSource.camera); threw an error that I was unable to troubleshoot. The following error was thrown.
Exception has occurred. PlatformException (PlatformException(no_available_camera, No cameras available for taking pictures., null, null))
In this post we'll discuss the solution to the error from Day 7.
After searching online for a solution and much frustration I found the solution in this github issue. The solution that worked for me was to change
targetSdkVersion 30 to
targetSdkVersion 29. The property can be found in the
As a developer, getting stuck on an error is inevitable. Fortunately, you are likely not the first person to get stuck on that error. A diligent google search e.g. github issues or stackoverflow will usually reveal a solution to the problem.