filter method
Implementation
@override
bool filter(TalkerData item) {
var match = false;
if (titles.isNotEmpty) {
match = match || titles.contains(item.title);
}
if (types.isNotEmpty) {
match = match || _checkTypeMatch(item);
}
if (searchQuery?.isNotEmpty ?? false) {
final fullMsg = item.generateTextMessage();
final fullUpperMsg = fullMsg.toUpperCase();
final fullLowerMsg = fullMsg.toLowerCase();
final textContain = fullUpperMsg.contains(searchQuery!) ||
fullLowerMsg.contains(searchQuery!);
match = match || textContain;
}
if (titles.isEmpty && types.isEmpty && (searchQuery?.isEmpty ?? true)) {
match = true;
}
return match;
}