filter method
Returns a list containing only elements matching the given predicate!
Implementation
List<T> filter(bool test(T element)) {
if (this == null) return <T>[];
final result = <T>[];
this!.forEach((e) {
if (test(e)) {
result.add(e);
}
});
return result;
}