newAtKey method
returns a new AtKey
.
Implementation
AtKey newAtKey(int ttr, String key, String? sharedWith,
{int? ttl, DateTime? expiresAt}) {
var atKey = AtKey()
..metadata = Metadata()
..metadata.ttr = ttr
..metadata.ccd = true
..key = key
..sharedWith = sharedWith
..sharedBy = AtLocationNotificationListener().currentAtSign;
if (ttl != null) atKey.metadata.ttl = ttl;
if (expiresAt != null) atKey.metadata.expiresAt = expiresAt;
return atKey;
}