distinctBy<T> method

bool Function(T, T) distinctBy<T>(
  1. Object key(
    1. T
    )
)
 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);