DoLastWith3<A extends Comp<T>, B extends Comp<T>, C extends Comp<T>> method

void DoLastWith3<A extends Comp<T>, B extends Comp<T>, C extends Comp<T>>(
  1. void fn(
    1. E entity,
    2. A a,
    3. B b,
    4. C c,
    )
)

Query-like Calls fn with the last matching element and its A, B, and C components. Does nothing if the result set is empty.

Implementation

void DoLastWith3<
  A extends Comp<T>,
  B extends Comp<T>,
  C extends Comp<T>
>(void Function(E entity, A a, B b, C c) fn) {
  final entities = _resolve();
  if (entities.isEmpty) return;
  final entity = entities.last;
  entity.on3<A, B, C>((a, b, c) => fn(entity, a, b, c));
}