getCachedContactDetail function
AtContact?
getCachedContactDetail(
- String? atsign
)
Implementation
AtContact? getCachedContactDetail(String? atsign) {
if (atsign ==
EventKeyStreamService().atContactImpl?.atClient?.currentAtSign) {
return EventKeyStreamService().loggedInUserDetails;
}
if (EventKeyStreamService().contactList.isNotEmpty) {
var index = EventKeyStreamService()
.contactList
.indexWhere((element) => element.atSign == atsign);
if (index > -1) return EventKeyStreamService().contactList[index];
}
return null;
}