Open Somespi opened 3 days ago
After some testing, I noticed that when doing await controller.analysisController?.imageSubscription?.cancel();
manually it works fine.
I'm betting that the issue comes from await CamerawesomePlugin.stopAnalysis();
in
Future<void> stop() async {
if (onImageListener == null || imageSubscription == null) {
return;
}
_analysisEnabled = false;
await CamerawesomePlugin.stopAnalysis();
imageSubscription?.cancel();
imageSubscription = null;
}
Steps to Reproduce
I encountered an issue when setting
autoStart: false
and attempting to stop the camera stream usingAnalysisController.stop()
or when calling
stop
method forAnalysisController
Expected results
The camera stream should stop when calling
stop()
on theAnalysisController
, and no error should occur.Actual results
An error is thrown.
About your device
Your flutter version
Run this in your command line
flutter --version
Flutter 3.24.3 • channel • https://github.com/flutter/flutter.git Framework • revision archlinuxaur (unknown (arch linux aur package)) • 2038-01-19 03:14:08 Engine • revision 36335019a8ea Tools • Dart 3.5.3 • DevTools 2.37.3