Sort<TEntity> class

Represents a sort operation on a field

Annotations

Constructors

Sort(Field<TEntity, Object?> field, {bool descending = false})
Creates a sort configuration for field.
const
Sort.asc(Field<TEntity, Object?> field)
Creates an ascending sort for field.
const
Sort.desc(Field<TEntity, Object?> field)
Creates a descending sort for field.
const

Properties

descending bool
final
field Field<TEntity, Object?>
final
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

compare(TEntity a, TEntity b) int
Compares two items based on this sort configuration. Requires field.getValue to be defined.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
Serializes this sort configuration to JSON.
toString() String
A string representation of this object.
inherited

Operators

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