distinctBy<S> method
use for FlowR.stream or flowr/FrViewModel.stream
.distinctBy((event) => event.foo)
equals
.map((event) => (event, event.foo))
.distinct()
.map((event) => event.$1)
Implementation
Stream<T> distinctBy<S>([S Function(T event)? field]) =>
map((e) => (e, field?.call(e))).distinct().map((event) => event.$1);