onItemSelect method
Implementation
void onItemSelect(String jid, String name, bool isBlocked, bool isGroup,
BuildContext context) async {
if (isGroup.checkNull() &&
!availableFeatures.value.isGroupChatAvailable.checkNull()) {
Helper.showFeatureUnavailable(context);
return;
}
if (isGroup.checkNull() &&
!(await Mirrorfly.isMemberOfGroup(
groupJid: jid,
userJid: SessionManagement.getUserJID().checkNull()))
.checkNull()) {
toToast(AppConstants.youAreNoLonger);
return;
}
if (isBlocked.checkNull()) {
if (context.mounted) {
unBlock(jid, name, context);
}
} else {
onItemClicked(jid, name);
}
}