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
When you first enter the page, initialize and bind the onStatus parameter statusListener. In the callback, change the state widget.
When you navigator back and enter the page again, re-execute initialize, which will execute the return successfully without overwriting the new statusListener callback. This will cause the widget changed in the callback to be the widget of the first initialized page, rather than the state widget of the current page, resulting in the inability to change the state widget of the current page.
You can only manually reassign statusListener = _statusListener, rebind the state change callback to update the state widget of the current page.
The text was updated successfully, but these errors were encountered:
I found in the README that the initialize method only needs to be called once per application session. So, this behavior is expected according to the package.
Suggestion: There are two methods, stop() and cancel(). stop should remain as is, but cancel should reset all configurations, requiring the user to call initialize() again after cancellation. If users want to initialize only once per application session, they can manage it accordingly.
Workaround Solution:
The statusListener and errorListener can be set manually if needed. This can help if anyone is stuck with a similar issue:
When you first enter the page,
initialize
and bind theonStatus
parameterstatusListener
. In the callback, change the state widget.When you navigator back and enter the page again, re-execute
initialize
, which will execute the return successfully without overwriting the newstatusListener
callback. This will cause the widget changed in the callback to be the widget of the first initialized page, rather than the state widget of the current page, resulting in the inability to change the state widget of the current page.You can only manually reassign
statusListener = _statusListener
, rebind the state change callback to update the state widget of the current page.The text was updated successfully, but these errors were encountered: