Skip to content

Conversation

@jonahwilliams
Copy link
Contributor

Work towards flutter/flutter#71511

abstract class ResourceRecordClass {
// This class is intended to be used as a namespace, and should not be
// extended directly.
factory ResourceRecordClass._() => null;
Copy link
Contributor Author

@jonahwilliams jonahwilliams Mar 3, 2021

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
Copy link
Contributor Author

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.

@jonahwilliams jonahwilliams changed the title migrate MDNS to null safety migrate mDNS to null safety Mar 3, 2021
@stuartmorgan-g stuartmorgan-g requested a review from blasten March 3, 2021 21:05
InternetAddress _mDnsAddress;
int _mDnsPort;
InternetAddress? _mDnsAddress;
late int _mDnsPort;
Copy link
Contributor

@blasten blasten Mar 3, 2021

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.

Copy link
Contributor Author

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;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this one too :)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fair enough :D

Copy link
Contributor Author

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

@jonahwilliams jonahwilliams merged commit d83cd11 into flutter:master Mar 4, 2021
@jonahwilliams jonahwilliams deleted the mdns_migrate branch March 4, 2021 20:36
@miketheman
Copy link

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?

@stuartmorgan-g
Copy link
Collaborator

Looks like it just never got published; I've now done that.

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.

4 participants