[camera_android_camerax] Allow usage of all use cases concurrently (#10732) Removes guardrails to avoid previously unsupported concurrent camera use cases (this was changed in a later version of CameraX that came after the guards were implemented. See https://github.com/flutter/packages/pull/6608 for details). Fixes https://github.com/flutter/flutter/issues/150387. As a bonus, also fixes https://github.com/flutter/flutter/issues/157181 by: 1. Using delayed `Future`s instead of calls to `sleep` which I theorize was blocking calls happening on the native side, so the `sleep` calls were not actually giving time for the camera to initialize 2. Ensuring all calls to start video recording have a delay afterwards to, again, give time for the camera to initialize. I tracked down these fixes by noticing we actually are not surfacing video recording errors; we actually were getting the [ERROR_NO_VALID_DATA](https://developer.android.com/reference/androidx/camera/video/VideoRecordEvent.Finalize#ERROR_NO_VALID_DATA()) error. Filed an issue to expose all video recording errors like this for easier debugging in the future: https://github.com/flutter/flutter/issues/182960. ## Pre-Review Checklist **Note**: The Flutter team is currently trialing the use of [Gemini Code Assist for GitHub](https://developers.google.com/gemini-code-assist/docs/review-github-code). Comments from the `gemini-code-assist` bot should not be taken as authoritative feedback from the Flutter team. If you find its comments useful you can update your code accordingly, but if you are unsure or disagree with the feedback, please feel free to wait for a Flutter team member's review for guidance on which automated comments should be addressed. [^1]: Regular contributors who have demonstrated familiarity with the repository guidelines only need to comment if the PR is not auto-exempted by repo tooling.
This repo is a companion repo to the main flutter repo. It contains the source code for Flutter's first-party packages (i.e., packages developed by the core Flutter team). Check the packages directory to see all packages.
These packages are also available on pub.
Please file any issues, bugs, or feature requests in the main flutter repo. Issues pertaining to this repository are labeled “package”.
If you wish to contribute a new package to the Flutter ecosystem, please see the documentation for developing packages. You can store your package source code in any GitHub repository (the present repo is only intended for packages developed by the core Flutter team). Once your package is ready you can publish to the pub repository.
If you wish to contribute a change to any of the existing packages in this repo, please review our contribution guide, and send a pull request.
These are the packages hosted in this repository: