SortField<T extends Object> class

A sortable field definition that maps remote field names to local value extractors.

This class defines how to sort model instances by specifying both the remote field name (used in API queries) and a function to extract the corresponding value from local model instances for comparison.

The SortField combines the remote field identifier with a comparator function that can extract and compare values from model instances, enabling both remote API sorting and local client-side sorting with the same field definition.

Example usage:

final createdAtField = SortField('created_at', (activity) => activity.createdAt);
final nameSort = Sort.asc(createdAtField);
Implementers

Constructors

SortField.new(String remote, SortFieldValueGetter<T, Object> localValue)
Creates a new SortField with the specified remote field name and value extractor.
factory

Properties

comparator AnySortComparator<T>
The comparator function used for local sorting operations.
final
hashCode int
The hash code for this object.
no setterinherited
remote String
The remote field name used in API queries.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited