I got a problem with the qr_code_scanner library after upgrading my flutter to the new 3.0.0
e: /home/kalheeso/snap/flutter/common/flutter/.pub-cache/hosted/pub.dartlang.org/qr_code_scanner-0.7.0/android/src/main/kotlin/net/touchcapture/qr/flutterqr/QRView.kt: (23, 1): Class 'QRView' is not abstract and does not implement abstract member public abstract fun onRequestPermissionsResult(p0: Int, p1: Array<(out) String!>, p2: IntArray): Boolean defined in io.flutter.plugin.common.PluginRegistry.RequestPermissionsResultListener
e: /home/kalheeso/snap/flutter/common/flutter/.pub-cache/hosted/pub.dartlang.org/qr_code_scanner-0.7.0/android/src/main/kotlin/net/touchcapture/qr/flutterqr/QRView.kt: (216, 26): Null can not be a value of a non-null type String
e: /home/kalheeso/snap/flutter/common/flutter/.pub-cache/hosted/pub.dartlang.org/qr_code_scanner-0.7.0/android/src/main/kotlin/net/touchcapture/qr/flutterqr/QRView.kt: (247, 26): Null can not be a value of a non-null type String
e: /home/kalheeso/snap/flutter/common/flutter/.pub-cache/hosted/pub.dartlang.org/qr_code_scanner-0.7.0/android/src/main/kotlin/net/touchcapture/qr/flutterqr/QRView.kt: (310, 5): 'onRequestPermissionsResult' overrides nothing
e: /home/kalheeso/snap/flutter/common/flutter/.pub-cache/hosted/pub.dartlang.org/qr_code_scanner-0.7.0/android/src/main/kotlin/net/touchcapture/qr/flutterqr/QRViewFactory.kt: (10, 1): Class 'QRViewFactory' is not abstract and does not implement abstract base class member public abstract fun create(p0: Context?, p1: Int, p2: Any?): PlatformView defined in io.flutter.plugin.platform.PlatformViewFactory
e: /home/kalheeso/snap/flutter/common/flutter/.pub-cache/hosted/pub.dartlang.org/qr_code_scanner-0.7.0/android/src/main/kotlin/net/touchcapture/qr/flutterqr/QRViewFactory.kt: (13, 5): 'create' overrides nothing
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':qr_code_scanner:compileDebugKotlin'.
> Compilation error. See log for more details
CodePudding user response:
Use alternative mobile_scanner. this library doesn't work in Flutter 3.0. or else if you want to use qr_code_scanner library, that is not the official creator repo but you can use it.
dependency_overrides:
qr_code_scanner:
git:
url: https://github.com/X-SLAYER/qr_code_scanner.git
ref: flutter-beta