sortHistoryEvents function

void sortHistoryEvents(
  1. List<Map<String, dynamic>> events
)

Sorts unified history events newest first, in place.

Implementation

void sortHistoryEvents(List<Map<String, dynamic>> events) {
  events.sort(
    (a, b) => _stringValue(
      b['createdAtUtc'],
    ).compareTo(_stringValue(a['createdAtUtc'])),
  );
}