isForThisWidget method

bool isForThisWidget(
  1. Map<String, dynamic>? id
)

Implementation

bool isForThisWidget(Map<String, dynamic>? id) {
  if (id == null) {
    return true; //if passed id is null , that means for all composer
  }
  if ((id['uid'] != null &&
          id['uid'] ==
              user?.uid) //checking if uid or guid match composer's uid or guid
      ||
      (id['guid'] != null && id['guid'] == group?.guid)) {
    if (id['parentMessageId'] != null) {
      return (threadMessageParentId == id['parentMessageId']);
    }

    return true;
  }
  return false;
}