customMap<T> method
Implementation
List<T> customMap<T>(T? toResult(E e)) {
List<T> newList = <T>[];
this?.forEach((element) {
T? result = toResult(element);
if (result != null) {
newList.add(result);
}
});
return newList;
}