filter method
Filters the given data
.
If it returns true, the data will be included.
Implementation
@override
@protected
bool filter(DynamicMap data) {
if (_searchText.isEmpty) {
return true;
}
final tmp = [];
final search = data.getAsMap(searchValueKey);
_splitBygram ??= _searchText.toLowerCase().splitByBigram();
for (final text in _splitBygram!) {
if (tmp.contains(text)) {
continue;
}
if (search.get(text, false)) {
return true;
}
}
return false;
}