comparator property

Comparator<Component>? comparator
final

An optional custom ordering, replacing the default ordering by Component.priority. Supply one via Component.createComponentList.

The ordering is stable in both cases: elements that compare equal keep their insertion order. If the values that the comparator reads change after insertion, call Component.rebalanceChildren to restore the ordering (priority changes on mounted components do this automatically).

Implementation

final Comparator<Component>? comparator;