combine method Null safety

PathOrder combine(
  1. PathOrder secondPathOrder
)

Returns a new PathOrder object which first sorts PathSegment elements according to this instance and further sorts according to secondPathOrder.

Implementation

PathOrder combine(PathOrder secondPathOrder) {
  return PathOrder._((PathSegment a, PathSegment b) {
    var comp = _comparator(a, b);
    if (comp == 0) comp = secondPathOrder._comparator(a, b);
    return comp;
  });
}