SortOption<T> constructor

const SortOption<T>(
  1. String field, {
  2. int direction = SortOption.DESC,
  3. Comparator<T>? comparator,
})

Creates a new SortOption instance

For example:

// Sort channels by the last message date:
final sorting = SortOption("last_message_at")

Implementation

const SortOption(
  this.field, {
  this.direction = SortOption.DESC,
  this.comparator,
});