isProtected method
Returns true if the peer is protected for some tag; if the tag is the empty string then it will return true if the peer is protected for any tag
Implementation
@override
bool isProtected(PeerId peerId, String tag) {
final protections = _protections[peerId];
if (protections == null) {
return false;
}
if (tag.isEmpty) {
return protections.isNotEmpty;
}
return protections.contains(tag);
}