get method

Contact get(
  1. String publicKey
)

Gets a Contact specified by publicKey.

An ArgumentError is thrown if publicKey is unknown.

Implementation

Contact get(String publicKey) {
  if (!_contacts.containsKey(publicKey)) {
    throw ArgumentError.value(publicKey, 'publicKey', "Unknown contact");
  }
  return _contacts[publicKey] as Contact;
}