firstOrDefault method
get the first item that match expression or null if not any
Implementation
T? firstOrDefault([bool Function(T element)? test]) {
var filtered = test == null ? this : where(test);
if (filtered.isNotEmpty) {
return filtered.first;
} else {
return null;
}
}