[英]How do I filter a stream in dart after a certain criteria?
Lets say I have a stream of persons and I want to filter them by the age being >= 40. I know that in Java I can do something like this:假设我有一个 stream 的人,我想按年龄 >= 40 过滤他们。我知道在 Java 中我可以这样做:
lp.stream().filter(p->p.getAKge()>=40).forEach(System.out::println);
I'm new to dart so I don't really know what would be the equivalent of this functionality in this language.我是 dart 的新手,所以我真的不知道在这种语言中这个功能的等价物是什么。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.