migrate mDNS to null safety#297
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.
This pattern is no longer allowed.
| version: 0.2.2 | ||
|
|
||
| dependencies: | ||
| meta: ^1.1.6 |
There was a problem hiding this comment.
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.
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.
| int _mDnsPort; | ||
| InternetAddress? _mDnsAddress; | ||
| int? _mDnsPort; | ||
| late RawDatagramSocket _incoming; |
There was a problem hiding this comment.
fair enough :D
There was a problem hiding this comment.
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