Unsupported operation: Trying to use the default qrview implementation for TargetPlatform.macOS but there isn't a default one
See also: https://flutter.dev/docs/testing/errors
Flutter informationflutter doctor -v:
[✓] Flutter (Channel stable, 3.19.1, on macOS 14.3.1 23D60 darwin-x64,
locale en-US)
• Flutter version 3.19.1 on channel stable at
/usr/local/Caskroom/flutter/3.16.3/flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision abb292a07e (7 days ago), 2024-02-20 14:35:05
-0800
• Engine revision 04817c99c9
• Dart version 3.3.0
• DevTools version 2.31.1
[✓] Android toolchain - develop for Android devices (Android SDK version
34.0.0)
• Android SDK at /Users/agcar/Library/Android/sdk
• Platform android-34, build-tools 34.0.0
• ANDROID_HOME = /Users/agcar/Library/Android/sdk
• ANDROID_SDK_ROOT = /opt/homebrew/share/android-commandlinetools
• Java binary at: /Applications/Android
Studio.app/Contents/jbr/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build
17.0.7+0-17.0.7b1000.6-10550314)
• All Android licenses accepted.
[✓] Xcode - develop for iOS and macOS (Xcode 15.2)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Build 15C500b
• CocoaPods version 1.15.2
[✓] Chrome - develop for the web
• Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google
Chrome
[✓] Android Studio (version 2023.1)
• Android Studio at /Applications/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
17.0.7+0-17.0.7b1000.6-10550314)
[✓] IntelliJ IDEA Community Edition (version 2021.3.2)
• IntelliJ at /Applications/IntelliJ IDEA CE.app
• Flutter plugin version 68.1.3
• Dart plugin version 213.7371
[✓] VS Code (version 1.86.2)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension version 3.82.0
[✓] Connected device (3 available)
• Alejandro’s iPhone (mobile) • 00008110-0018184A023B801E • ios
• iOS 17.3.1 21D61
• macOS (desktop) • macos • darwin-x64
• macOS 14.3.1 23D60 darwin-x64
• Chrome (web) • chrome •
web-javascript • Google Chrome 121.0.6167.184
[✓] Network resources
• All expected network resources are available.
• No issues found!
Device (please complete the following information):
Device: MacBookPro 16-Inch, 2019.
OS: macOS Sonoma 14.3.1
Screenshots
Additional context
Run flutter run -d chrome and land on the code example provided.
I advise providing a static view and then allowing the developer to emulate a scan of a QR barcode when detecting that the code is running on macOS via code.
Describe the bug Install the dependency and follow the example provided by the qr_code_scanner 1.0.1 dependency page in PubDev page. When running on Chrome, it will provide the following error:
Flutter information
flutter doctor -v
:Device (please complete the following information):
Screenshots
Additional context Run
flutter run -d chrome
and land on the code example provided.I advise providing a static view and then allowing the developer to emulate a scan of a QR barcode when detecting that the code is running on macOS via code.
Have a nice day.