Open EArminjon opened 1 year ago
Maybe once fixed it will help following issue :
I am having the same issue. Has anyone found a fix?
@BBQRIBS72 , @junko2013 Issue created 2 days ago :') You can upvote original post to avoid spamming. If someone know how to resolve this, he will post don't worry !
the same issue
me too
Please check fix here https://github.com/juliansteenbakker/mobile_scanner/issues/619#issuecomment-1918405545
@EArminjon With the new beta release, version 5.0.0-beta.1 , we removed the manual lifecycle management in mobile_scanner
itself, as it caused issues with widget tree reparenting.
Now that you have full control over the lifecycle, this issue should no longer occur?
With latest version i can well manage with some tricks multiples scanners lifecycle (https://github.com/juliansteenbakker/mobile_scanner/issues/1002#issuecomment-2156693406) and so this issue.
As it's 'tricky' and required an other package 'visibility_detector' i didn't know if i can close this issue :/
When you leave the page, does that page call its dispose method?
You also do not await the disposal?
@override
Future<void> dispose() async {
super.dispose(); // If dispose is async, the super call has to happen before any awaits. Otherwise the framework asserts
await controller.dispose();
}
To reproduce :
Behavior : You will see the notification green badge which indicate that the camera is running in background despite the page is well poped (so high battery usage).
Expected behavior : Green toast should not appear or disappear automatically. Camera should not live if controller is well disposed.
Video :
untitled.webm
Code :
Flutter doctor -v