validateUserOptions static method
Implementation
static bool validateUserOptions(User? loggedInUser, User? user, String id) {
if (user?.uid == loggedInUser?.uid && id == UserOptionConstants.blockUser) {
return false;
} else if ((user?.blockedByMe == true) &&
id == UserOptionConstants.blockUser) {
return false;
} else if ((user?.blockedByMe == false || user?.blockedByMe == null) &&
id == UserOptionConstants.unblockUser) {
return false;
}
return true;
}