sortedRows method
The rows in the order shown; the caller's list is never reordered.
Implementation
List<T> sortedRows() {
final rows = List<T>.from(widget.data);
if (_sorted) {
rows.sort((data1, data2) {
final order = data1.getCells()[sortColumnIndex].compareTo(
data2.getCells()[sortColumnIndex],
);
return isAscending ? order : -order;
});
}
return rows;
}