formAtKey method
AtKey?
formAtKey(
- ATKEY_TYPE_ENUM keyType,
- String atkeyMicrosecondId,
- EventNotificationModel eventData,
Implementation
AtKey? formAtKey(ATKEY_TYPE_ENUM keyType, String atkeyMicrosecondId,
String? sharedWith, String sharedBy, EventNotificationModel eventData) {
switch (keyType) {
case ATKEY_TYPE_ENUM.CREATEEVENT:
AtKey? atKey;
allEventNotifications.forEach((event) {
if (event.eventNotificationModel!.key == eventData.key) {
atKey = EventService().getAtKey(event.key!);
}
});
return atKey;
case ATKEY_TYPE_ENUM.ACKNOWLEDGEEVENT:
var key = AtKey()
..metadata = Metadata()
..metadata!.ttr = -1
..metadata!.ccd = true
..sharedWith = sharedWith
..sharedBy = sharedBy;
key.key = 'eventacknowledged-$atkeyMicrosecondId';
return key;
}
}