PropertySorter class

Sorts values according to value of a map property.

An example:

database.collection('movies').query(
  query: Query(
    sorter: PropertySorter.descending('year'),
  ),
);
Inheritance
Annotations

Constructors

PropertySorter(String name, {bool isDescending = false})
const
PropertySorter.descending(String name)
const

Properties

hashCode int
The hash code for this object. [...]
read-only, override
isDescending bool
final
name String
final
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited

Methods

compare(Object left, Object right, {Comparator comparator}) int
override
compareSnapshot(Snapshot left, Snapshot right, {Comparator comparator}) int
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
simplify() Sorter
inherited
toString() String
A string representation of this object. [...]
override

Operators

operator ==(dynamic other) bool
The equality operator. [...]
override