isForThisWidget method
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 &&
id['parentMessageId'] != parentMessageId) {
//Checking if parent message id exist then match or not
return false;
} else {
return true;
}
}
return false;
}