It appears that while List
and Set
in Dart have both a removeWhere()
method and a retainWhere()
method (which just inverts the filter lambda function but is more readable), Map
only seems to have a removeWhere()
method. Is this intended or a weird oversight? I’m really confused by this.
Of course inverting the filter myself isn’t really a problem or even writing my own extension to add the method myself, I can’t seem to wrap my head around why those classes would have a mismatch like that.