remove<T> method
Implementation
int remove<T>({T? value}) {
if (value != null) {
return list.remove(value) ? 1 : 0;
}
int count = 0;
List<T> l = list.whereType<T>().toList();
for (T t in l) {
if (list.remove(t)) count++;
}
return count;
}