I got error that said ScannerProperties.edit(BarcodeManager()) returning null in my existing flutter project, I test the same code in new flutter project with same flutter version, gradle version, kotlin version and so on, but surprisingly its not returning null on new flutter project. Both project use datalogic-android sdk version 1.32.
here is my code snippet
lateinit var dataLogicManager: BarcodeManager
lateinit var dataLogicConfig: ScannerProperties
override fun configureFlutterEngine(flutterEngine: FlutterEngine) {
super.configureFlutterEngine(flutterEngine)
MethodChannel(
flutterEngine.dartExecutor,
"command_channel"
).setMethodCallHandler { call, result ->
when (call.method) {
"init_manager" -> {
dataLogicManager = BarcodeManager()
dataLogicConfig = ScannerProperties.edit(dataLogicManager)
dataLogicConfig.intentWedge.action.set(ACTION_BROADCAST_RECEIVER)
dataLogicConfig.intentWedge.category.set(CATEGORY_BROADCAST_RECEIVER)
dataLogicConfig.intentWedge.deliveryMode.set(IntentDeliveryMode.BROADCAST)
dataLogicConfig.store(dataLogicManager, false)
Log.d("LOGTAG", "$dataLogicManager")
Log.d("LOGTAG", "$dataLogicConfig")
}
else -> {
result.notImplemented()
}
}
}
}
Any suggestion would be appriciate. Thank you