You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The scanner works and initializes when the user navigates to page. However, when the user switches to another page and back the page where I have my scanner.
It throws this error: Generic Error | The scanner was already started call stop() before calling start() again.
To try to clear this error I hot restarted but the error just changed to Generic Error | Called start() while already started()!
Can the package not handle this and just ignore the start call if it's already started instead of throwing an error?
Does anyone know why this is not handling the issue as I thought it would be?
I thought it could be related to
class _BarcodeScannerPageViewState extends State<BarcodeScannerPageView>
with RouteAware
Since we are popping pages, I thought it could be the fact that WidgetsBindingObserver didn't popping and navigating new pages onto the context, but it still called start at the init of the page.
However that implementation didn't work either. Has anyone else ran into similar errors and found a solution?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
The scanner works and initializes when the user navigates to page. However, when the user switches to another page and back the page where I have my scanner.
It throws this error:
Generic Error | The scanner was already started call stop() before calling start() again.
To try to clear this error I hot restarted but the error just changed to
Generic Error | Called start() while already started()!
Can the package not handle this and just ignore the start call if it's already started instead of throwing an error?
Here is the initialization portion:
Here is the part where I thought it handles how the scanner should respond if there was a page change via didChangeAppLifecycleState
Here is the actual controller page
Does anyone know why this is not handling the issue as I thought it would be?
I thought it could be related to
Since we are popping pages, I thought it could be the fact that WidgetsBindingObserver didn't popping and navigating new pages onto the context, but it still called start at the init of the page.
However that implementation didn't work either. Has anyone else ran into similar errors and found a solution?
Beta Was this translation helpful? Give feedback.
All reactions