-
Notifications
You must be signed in to change notification settings - Fork 75
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
Migrate dwds/web directory to null safety #1648
Migrate dwds/web directory to null safety #1648
Conversation
} | ||
}); | ||
return reloadCompleter.future; | ||
return reloadCompleter.future.then((value) { | ||
sub.cancel(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why was this moved into the then
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the sub is not defined inside the callback to window.onMessage.listen
yet (at least analyzer does not think so:) - so i moved it to where it logically behaves the same but cancels the sub as before.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh I see. Hmm, could the subscription be late
(so we would follow the pattern as before)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, it does not help unfortunately. I know this pattern is given as an example in many places but the analyzer is rejecting it currently (and I tend to agree with it, even just for safety, don't want the wrong pointer to be pinned here:)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some small suggestions, thanks!
Migrate dwds/web directory to null safety
Towards: #1327