self static method

SelfKeyBuilder self(
  1. String key, {
  2. String? namespace,
  3. String sharedBy = '',
})

Self keys that are created by the owner of the atSign and the keys can be accessed by the owner of the atSign only.

Builds a self key and returns a SelfKeyBuilder.

Example: phone.wavi@alice

AtKey selfKey = AtKey.self('phone', namespace: 'wavi', sharedBy: '@alice').build();

Implementation

static SelfKeyBuilder self(String key,
    {String? namespace, String sharedBy = ''}) {
  assertStartsWithAtIfNotEmpty(sharedBy);
  return SelfKeyBuilder()
    ..key(key)
    ..namespace(namespace)
    ..sharedBy(sharedBy);
}