applyFilters method

List<Map<String, dynamic>> applyFilters(
  1. List<Map<String, dynamic>> listAll,
  2. GroupFilterExp? filter
)

Implementation

List<Map<String, dynamic>> applyFilters(
    List<Map<String, dynamic>> listAll, GroupFilterExp? filter) {
  List<Map<String, dynamic>> tempList = [];
  filter = convertFiltersToLowerCase(filter);
  if (filter != null && filter.filterExps.isNotEmpty) {
    for (int i = 0; i < listAll.length; i++) {
      if (applyGroupFilterExp(filter, listAll[i])) {
        tempList.add(listAll[i]);
      }
    }
  } else {
    tempList = listAll;
  }
  return tempList;
}