sortValues property
The value comparator.
final pie = Pie(…)..sortValues = (a, b) => ascending;
pie.sortValues; // (a, b) => ascending
The value comparator is similar to the data comparator (sort), except the two arguments a and b are values derived from the input data list using the value accessor (sortValues) rather than the data elements. If the arc for a should be before the arc for b, then the comparator must return a number less than zero; if the arc for a should be after the arc for b, then the comparator must return a number greater than zero; returning zero means that the relative order of a and b is unspecified.
The value comparator defaults to descending. If both the data comparator (sort) and the value comparator are null, then arcs are positioned in the original input order. Setting the value comparator implicitly sets the data comparator (sort) to null.
Sorting does not affect the order of the generated arc list (see Pie.call) which is always in the same order as the input data list; it merely affects the computed angles of each arc. The first arc starts at the startAngle and the last arc ends at the endAngle.
Implementation
int Function(num, num)? get sortValues => _sortValues;