-
-
Notifications
You must be signed in to change notification settings - Fork 282
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
An exception is thrown when UpgradeAlert rebuilds. #370
Comments
I think the error occurs because we pass a different But I need to pass a different |
@AhmedLSayed9 I assume the problem is that you are instantiating Upgrader multiple times. As you can see in this example, you should use a final variable with Upgrader: https://github.com/larryaasen/upgrader/blob/f7f0e7da00b809e61ea2f55d8e0d0d0d074aa7f0/example/lib/main-min-app-version.dart#L26C29-L26C29 |
I see. I think we can avoid that by storing the Also, I was expecting to be able to update Can I open a PR that offer a solution for both things? Let me know if it should land on |
@larryaasen The fix allowed me to re-evaluate and show UpgradeAlert again when |
@AhmedLSayed9 I looked at your code briefly and I wonder if that change will pass the unit tests. You can submit a PR if you would like and I can enable the CI action to run and review the unit test results. |
I've forgotten about this. PR is submitted now :) |
I don't think this is an issue anymore with the latest changes in version 10.0.0.
|
I've tested it again with version |
@larryaasen |
I've fixed my PR. |
Using the following sample from the examples with a button added to perform a rebuild:
First build is done without errors. but if I ignore the dialog and press the button to perform a rebuild, the following error is thrown:
the upgrader log:
The text was updated successfully, but these errors were encountered: