-
Notifications
You must be signed in to change notification settings - Fork 26.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[camera] Blank screen when switching between front and back cameras #81893
Comments
Hi @II11II Preview
flutter doctor -v[✓] Flutter (Channel stable, 2.0.6, on Microsoft Windows [Version 10.0.19042.928], locale en-US)
• Flutter version 2.0.6 at C:\Users\Taha\Code\flutter_stable
• Framework revision 1d9032c7e1 (6 days ago), 2021-04-29 17:37:58 -0700
• Engine revision 05e680e202
• Dart version 2.12.3
[!] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
• Android SDK at C:\Users\Taha\Code\SDK
• Platform android-30, build-tools 30.0.3
• ANDROID_HOME = C:\Users\Taha\Code\SDK
• Java binary at: C:\Users\Taha\Code\android-studio\jre\bin\java
• Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b01)
✗ Android license status unknown.
Run `flutter doctor --android-licenses` to accept the SDK licenses.
See https://flutter.dev/docs/get-started/install/windows#android-setup for more details.
[✓] Chrome - develop for the web
• Chrome at C:\Program Files\Google\Chrome\Application\chrome.exe
[✓] Visual Studio - develop for Windows (Visual Studio Community 2019 16.9.4)
• Visual Studio at C:\Program Files (x86)\Microsoft Visual Studio\2019\Community
• Visual Studio Community 2019 version 16.9.31205.134
• Windows 10 SDK version 10.0.19041.0
[✓] Android Studio (version 4.1.0)
• Android Studio at C:\Users\Taha\Code\android-studio
• Flutter plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/6351-dart
• Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b01)
[✓] IntelliJ IDEA Community Edition (version 2021.1)
• IntelliJ at C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2020.3.3
• Flutter plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/6351-dart
[✓] VS Code (version 1.55.2)
• VS Code at C:\Users\Taha\AppData\Local\Programs\Microsoft VS Code
• Flutter extension version 3.22.0
[✓] Connected device (5 available)
• SM M025F (mobile) • R9ZR205XX0A • android-arm • Android 10 (API 29)
• emulator-5554 (mobile) • emulator-5554 • android-x86 • Android 4.1.2 (API 16) (emulator)
• Windows (desktop) • windows • windows-x64 • Microsoft Windows [Version 10.0.19042.928]
• Chrome (web) • chrome • web-javascript • Google Chrome 90.0.4430.93
• Edge (web) • edge • web-javascript • Microsoft Edge 90.0.818.51
! Doctor found issues in 1 category. [✓] Flutter (Channel master, 2.3.0-1.0.pre.227, on Microsoft Windows [Version 10.0.19042.928], locale en-US)
• Flutter version 2.3.0-1.0.pre.227 at C:\Users\Taha\Code\flutter_master
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision 7f1d1414cc (25 hours ago), 2021-05-04 06:17:19 -0700
• Engine revision 378e4dbc41
• Dart version 2.14.0 (build 2.14.0-48.0.dev)
[!] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
• Android SDK at C:\Users\Taha\Code\SDK
• Platform android-30, build-tools 30.0.3
• ANDROID_HOME = C:\Users\Taha\Code\SDK
• Java binary at: C:\Users\Taha\Code\android-studio\jre\bin\java
• Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b01)
✗ Android license status unknown.
Run `flutter doctor --android-licenses` to accept the SDK licenses.
See https://flutter.dev/docs/get-started/install/windows#android-setup for more details.
[✓] Chrome - develop for the web
• Chrome at C:\Program Files\Google\Chrome\Application\chrome.exe
[✓] Visual Studio - develop for Windows (Visual Studio Community 2019 16.9.4)
• Visual Studio at C:\Program Files (x86)\Microsoft Visual Studio\2019\Community
• Visual Studio Community 2019 version 16.9.31205.134
• Windows 10 SDK version 10.0.19041.0
[✓] Android Studio (version 4.1.0)
• Android Studio at C:\Users\Taha\Code\android-studio
• Flutter plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/6351-dart
• Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b01)
[✓] IntelliJ IDEA Community Edition (version 2021.1)
• IntelliJ at C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2020.3.3
• Flutter plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/6351-dart
[✓] VS Code (version 1.55.2)
• VS Code at C:\Users\Taha\AppData\Local\Programs\Microsoft VS Code
• Flutter extension version 3.22.0
[✓] Connected device (5 available)
• SM M025F (mobile) • R9ZR205XX0A • android-arm • Android 10 (API 29)
• emulator-5554 (mobile) • emulator-5554 • android-x86 • Android 4.1.2 (API 16) (emulator)
• Windows (desktop) • windows • windows-x64 • Microsoft Windows [Version 10.0.19042.928]
• Chrome (web) • chrome • web-javascript • Google Chrome 90.0.4430.93
• Edge (web) • edge • web-javascript • Microsoft Edge 90.0.818.51
! Doctor found issues in 1 category. Related to #78417, |
The issue is reproducible on the latest
Check flutter doctor -v[✓] Flutter (Channel stable, 2.2.3, on macOS 12.0 21A5506j darwin-x64, locale en-GB)
• Flutter version 2.2.3 at /Users/tahatesser/Code/flutter_stable
• Framework revision f4abaa0735 (9 weeks ago), 2021-07-01 12:46:11 -0700
• Engine revision 241c87ad80
• Dart version 2.13.4
[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
• Android SDK at /Users/tahatesser/Code/SDK
• Platform android-31, build-tools 30.0.3
• ANDROID_HOME = /Users/tahatesser/Code/SDK
• Java binary at: /Users/tahatesser/Code/jdk/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment Temurin-11.0.12+7 (build 11.0.12+7)
• All Android licenses accepted.
[✓] Xcode - develop for iOS and macOS
• Xcode at /Applications/Xcode-beta.app/Contents/Developer
• Xcode 13.0, Build version 13A5212g
• CocoaPods version 1.10.2
[✓] Chrome - develop for the web
• Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
[!] Android Studio (version 2020.3)
• Android Studio at /Users/tahatesser/Library/Application Support/JetBrains/Toolbox/apps/AndroidStudio/ch-0/203.7621141/Android Studio.app/Contents
• Flutter plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/6351-dart
✗ Unable to find bundled Java version.
• Try updating or re-installing Android Studio.
[✓] VS Code (version 1.59.1)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension version 3.26.0
[✓] Connected device (3 available)
• Redmi K20 Pro (mobile) • def0ad20 • android-arm64 • Android 11 (API 30)
• macOS (desktop) • macos • darwin-x64 • macOS 12.0 21A5506j darwin-x64
• Chrome (web) • chrome • web-javascript • Google Chrome 93.0.4577.63
! Doctor found issues in 1 category. [✓] Flutter (Channel master, 2.6.0-1.0.pre.170, on macOS 12.0 21A5506j darwin-x64, locale en-GB)
• Flutter version 2.6.0-1.0.pre.170 at /Users/tahatesser/Code/flutter_master
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision 4069c6355b (6 hours ago), 2021-09-03 02:11:05 -0400
• Engine revision d6f6a0fe90
• Dart version 2.15.0 (build 2.15.0-69.0.dev)
[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
• Android SDK at /Users/tahatesser/Code/SDK
• Platform android-31, build-tools 30.0.3
• ANDROID_HOME = /Users/tahatesser/Code/SDK
• Java binary at: /Users/tahatesser/Library/Application Support/JetBrains/Toolbox/apps/AndroidStudio/ch-0/203.7621141/Android Studio.app/Contents/jre/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 11.0.10+0-b96-7281165)
• All Android licenses accepted.
[✓] Xcode - develop for iOS and macOS (Xcode 13.0)
• Xcode at /Applications/Xcode-beta.app/Contents/Developer
• CocoaPods version 1.10.2
[✓] Chrome - develop for the web
• Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
[✓] Android Studio (version 2020.3)
• Android Studio at /Users/tahatesser/Library/Application Support/JetBrains/Toolbox/apps/AndroidStudio/ch-0/203.7621141/Android Studio.app/Contents
• Flutter plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/6351-dart
• Java version OpenJDK Runtime Environment (build 11.0.10+0-b96-7281165)
[✓] Android Studio (version 2020.3)
• Android Studio at /Users/tahatesser/Library/Application Support/JetBrains/Toolbox/apps/AndroidStudio/ch-0/203.7583922/Android Studio.app/Contents
• Flutter plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/6351-dart
• Java version OpenJDK Runtime Environment (build 11.0.10+0-b96-7281165)
[✓] VS Code (version 1.59.1)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension version 3.26.0
[✓] Connected device (3 available)
• Redmi K20 Pro (mobile) • def0ad20 • android-arm64 • Android 11 (API 30)
• macOS (desktop) • macos • darwin-x64 • macOS 12.0 21A5506j darwin-x64
• Chrome (web) • chrome • web-javascript • Google Chrome 93.0.4577.63
• No issues found! ✅: No Issue ❗️: Issue reproduced |
Any update on this? |
2022 December and the problem is continuing. At least for the temporary solution, how can we show a black screen instead of a white one? @TahaTesser |
i can show only black screen by set backgroundColor of Scaffold into black |
How to show flip effect using camera plugin? |
I don't know what is flip effect, but CameraPreview will so the color or the screen behind it.
Like in this sample which is the example of library camera in pub.dev, when change color BoxDecoration to red, it will show Red Screen to black Screen(Camera preview need time to init) then CameraPreview.
This code will show White screen then Black screen then CameraPreview. Hope this help
|
Flip effect while switching camera from back to front and vice-versa, It shows black screen for a split of second. How to tackle that? |
Or can we show blurred version of the last frame while we make a switch? |
Yeah same, How can we show that? |
The CameraX implementation of the camera plugin on Android is finished, so we would greatly appreciate it if you try it out to see if it fixes this issue :) If you find a similar issue with that implementation (or any other issues), please feel free to file a separate issue. |
Code: #81816
BUG:
After Fast and many times changing camera from front to back, the black screen apears
57f5434d-7133-4fe2-905e-4d5e25ebe9f6.mp4
logs
The text was updated successfully, but these errors were encountered: