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