Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: _history.isNotEmpty when enabled parameter changes at runtime #28

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

moritzrickert
Copy link

Small fix resolving an issue that leads to app crashes in the case of a change to the parameter enabled at runtime.

Currently changing the value of enabled from false to true at runtime leads to a black screen due to the home page being changed while the navigator's history is non-empty. To prohibit changes to the home page when the navigator's history is non-empty, on initialisation an additional variable is introduced.

@tomalabaster
Copy link
Owner

Hi! Thanks for this, I'm afraid I'm unable to recreate the issue you're facing so am hesitant about accepting this change request.

Are you able to provide any repeatable steps/minimal code?

@moritzrickert
Copy link
Author

Hi! I have since stopped working on that project. However, if I remember correctly, the problem was that we wanted the app lock to be configurable. Therefore, there was a setting in the app enabling/disabling the plugin (changing the home page in the process). The value of this setting was stored in the device's secure storage with a provider allowing access on the current state of that setting. Now whenever the setting was set to false previously and then updated to true at runtime, the screen would just be black and the previously named error would be shown due to the change of the home screen without an empty history (the currently shown screen/widget of the app).
I hope this helps. If it does not I might be able to build a new example app as I do not have access to the original code anymore.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants