matchSearch method

bool matchSearch(
  1. PartyActivityV1 item,
  2. String search
)

Implementation

bool matchSearch(PartyActivityV1 item, String search) {
  search = search.toLowerCase();
  if (matchString(item.type, search)) {
    return true;
  }
  if (item.party != null && matchString(item.party!.name, search)) {
    return true;
  }
  if (item.ref_item != null && matchString(item.ref_item!.name, search)) {
    return true;
  }
  if (item.ref_party != null && matchString(item.ref_party!.name, search)) {
    return true;
  }
  return false;
}