With2Where<A extends Comp<T>, B extends Comp<T>> method

Q With2Where<A extends Comp<T>, B extends Comp<T>>(
  1. bool fn(
    1. E entity,
    2. A a,
    3. B b
    )
)

Query-like Keeps only elements that have both A and B and for which fn returns true.

Implementation

Q With2Where<
  A extends Comp<T>,
  B extends Comp<T>
>(
  bool Function(E entity, A a, B b) fn
) {
  _groups.last.add((e) {
    final a = e.get<A>(), b = e.get<B>();
    return a != null && b != null && fn(e, a, b);
  });
  return self;
}