newAtKey method

AtKey newAtKey(
  1. int ttr,
  2. String key,
  3. String? sharedWith, {
  4. int? ttl,
})

Implementation

AtKey newAtKey(int ttr, String key, String? sharedWith, {int? ttl}) {
  var atKey = AtKey()
    ..metadata = Metadata()
    ..metadata!.ttr = ttr
    ..metadata!.ccd = true
    ..key = key
    ..sharedWith = sharedWith
    ..sharedBy = atClient!.currentAtSign;
  if (ttl != null) atKey.metadata!.ttl = ttl;
  return atKey;
}