SortField constructor

SortField([
  1. String? name,
  2. bool ascending = true
])

Creates a new instance and assigns its values.

  • name the name of the field to sort by.
  • ascending true to sort in ascending order, and false to sort in descending order.

Implementation

SortField([String? name, bool ascending = true])
    : name = name,
      ascending = ascending;