distinctBy<T> method
buildWhen: (p, c) => p.userId != p.userId && p.name != c.name,
buildWhen: (p, c) => (p.userId, p.name) != (p.name, c.name),
buildWhen: distinctBy((e) => (e.userId, e.name)),
Implementation
bool Function(T, T) distinctBy<T>(Object Function(T) key) =>
(a, b) => key(a) != key(b);