-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[camerax] Change
buildPreview
to return Texture
versus `FutureBui…
…lder` (#6021) Changes the `buildPreview` implementation to return a `Texture` versus a `FutureBuilder` that would ultimately return that same `Texture`. The `FutureBuilder` depended on checking a condition that should be true by default assuming `createCamera` was called prior. This seems to be an assumption made consistently across other platform implementations (including `camera_android`-- see [source](https://github.com/flutter/packages/blob/7b1ae1f4cceea02f330716e701c6dcd9f0ca3f7e/packages/camera/camera_android/lib/src/android_camera.dart#L520)), so this PR is achieving consistency with them. Fixes flutter/flutter#140567. Thanks to @davidmartos96 for the push to investigate deeper on that issue!
- Loading branch information
Showing
4 changed files
with
43 additions
and
78 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters