BlockedServer.parse constructor
BlockedServer.parse(
- String addressSha1
Parse the address and check if it is included in
_knownCrackedServers
and if so, add the cracked address
to it.
Implementation
factory BlockedServer.parse(String addressSha1) {
final crackedAddress = _knownCrackedServers
.where((server) => server.addressSha1 == addressSha1);
if (crackedAddress.isEmpty) {
return BlockedServer(addressSha1, null);
} else {
return crackedAddress.first;
}
}