forEach method
对元素逐个执行操作后, 重新发射
Implementation
List<T>? forEach(ValueChanged<T> action) {
if (_subject.isClosed) {
L.w('IO在close状态下请求发送数据');
return null;
}
final copied = List.of(latest);
copied.forEach(action);
_subject.add(copied);
return latest;
}