-
-
Notifications
You must be signed in to change notification settings - Fork 599
Open
Description
- mobile_scanner: ^7.0.1
- Android 15 OneUI 7 Samsung
Works absolutely fine in dev / profile mode.
In my release build, I tried doing the following:
final MobileScannerController _cameraController = MobileScannerController(autoStart: false);
//...
@override
initState() {
super.initState();
_startCamera();
}
//...
MobileScanner(
controller: _cameraController,
onDetect: (barcodeCapture) {
final String? code = barcodeCapture.barcodes.first.rawValue;
if (code != null) {
// Do something..
}
},
),
//....
void _startCamera() async {
WidgetsBinding.instance.addPostFrameCallback((_) async {
Utils.snackbar('Starting Cam', context);
if (!_cameraController.value.isStarting) {
await _cameraController.start();
Utils.snackbar('Cam ready', context);
}
});
}
I never see the second snackbar message.
Release mode running logs:
[ ] E/flutter (24795): [ERROR:flutter/runtime/dart_vm_initializer.cc(40)] Unhandled Exception: MissingPluginException(No implementation found for method state on channel
dev.steenbakker.mobile_scanner/scanner/method)
[ ] E/flutter (24795): #0 MethodChannel._invokeMethod (package:flutter/src/services/platform_channel.dart:365)
[ ] E/flutter (24795): <asynchronous suspension>
[ ] E/flutter (24795): #1 MethodChannelMobileScanner._requestCameraPermission (package:mobile_scanner/src/method_channel/mobile_scanner_method_channel.dart:148)
[ ] E/flutter (24795): <asynchronous suspension>
[ ] E/flutter (24795): #2 MethodChannelMobileScanner.start (package:mobile_scanner/src/method_channel/mobile_scanner_method_channel.dart:289)
[ ] E/flutter (24795): <asynchronous suspension>
[ ] E/flutter (24795): #3 MobileScannerController.start (package:mobile_scanner/src/mobile_scanner_controller.dart:417)
[ ] E/flutter (24795): <asynchronous suspension>
[ ] E/flutter (24795): #4 _PageHomeState._startCamera.<anonymous closure> (package:menu_scan/home.dart:91)
[ ] E/flutter (24795): <asynchronous suspension>
[ ] E/flutter (24795):
wangjunjx8868 and TheEvilSocks
Metadata
Metadata
Assignees
Labels
No labels