sort method
Sort the grid by one or more columns.
Single-column: sort(SortOrder.SORT_ASCENDING, col: 0)
Custom: sort(SortOrder.SORT_ASCENDING, col: 0, type: SortType.SORT_TYPE_CUSTOM)
Multi-column: sortMulti([(0, SortOrder.SORT_ASCENDING), (2, SortOrder.SORT_DESCENDING)])
Implementation
Future<void> sort(SortOrder order, {int col = -1, SortType? type}) async {
final sortColumn = SortColumn()
..col = col
..order = order;
if (type != null) {
sortColumn.type = type;
}
await VolvoxGridService.Sort(SortRequest()
..gridId = _gridId
..sortColumns.add(sortColumn));
notifyListeners();
}