getActionString method
returns current status of the event
Implementation
String getActionString(EventNotificationModel event, bool haveResponded) {
if (isEventCancelled(event)) return 'Cancelled';
/// for creator it can only be cancelled state
if (compareAtSign(event.atsignCreator!,
AtClientManager.getInstance().atClient.getCurrentAtSign()!)) {
return '';
}
var _eventInfo = getMyEventInfo(event);
if (_eventInfo == null) {
return 'Action required';
}
if (_eventInfo.isExited) {
return 'Request declined';
}
if (!_eventInfo.isAccepted) {
return 'Action required';
} else {
return '';
}
}