-
Notifications
You must be signed in to change notification settings - Fork 3.6k
migrate mDNS to null safety #297
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
Conversation
| abstract class ResourceRecordClass { | ||
| // This class is intended to be used as a namespace, and should not be | ||
| // extended directly. | ||
| factory ResourceRecordClass._() => null; |
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.
This pattern is no longer allowed.
| version: 0.2.2 | ||
|
|
||
| dependencies: | ||
| meta: ^1.1.6 |
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.
Meta was only used for required and for a protected annotation, but that annotation was used on private members and I don't think its worth the dependency.
| InternetAddress _mDnsAddress; | ||
| int _mDnsPort; | ||
| InternetAddress? _mDnsAddress; | ||
| late int _mDnsPort; |
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 lookup of this value is protected by _started, which makes late ok, but what about making it nullable and explicitly checking for it before it's used? I think it has the added benefit that it removes the assumption that a separate bit is keeping track of whether it's safe to read the value.
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.
done
| int _mDnsPort; | ||
| InternetAddress? _mDnsAddress; | ||
| int? _mDnsPort; | ||
| late RawDatagramSocket _incoming; |
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.
this one too :)
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.
fair enough :D
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.
didn't even need it
|
Hooray, thanks for working on this. I looked on pub.dev and didn't see a release yet - is there a timeline or process I can follow to be notified of when this lands? |
|
Looks like it just never got published; I've now done that. |
Work towards flutter/flutter#71511