SortField class

Defines a field name and order used to sort query results.

See SortParams

Example

var filter = FilterParams.fromTuples(["type", "Type1"]);
var paging = new PagingParams(0, 100);
var sorting = new SortingParams(new SortField("create_time", true));

myDataClient.getDataByFilter(filter, paging, sorting, (err, page) {...});

Constructors

SortField([String name = null, 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.
  • SortField.fromJson(Map<String, dynamic> json)
    Creates a new instance from json. [...]
    factory

    Properties

    ascending ↔ bool
    The flag to define sorting order. True to sort ascending, false to sort descending
    read / write
    name ↔ String
    The field name to sort by
    read / write
    hashCode → int
    The hash code for this object. [...]
    read-only, inherited
    runtimeType → Type
    A representation of the runtime type of the object.
    read-only, inherited

    Methods

    fromJson(Map<String, dynamic> json) → void
    Returned JSON Map object from values of this object
    toJson() → Map<String, dynamic>
    Initialize this object from JSON Map object
    noSuchMethod(Invocation invocation) → dynamic
    Invoked when a non-existent method or property is accessed. [...]
    inherited
    toString() → String
    Returns a string representation of this object.
    inherited

    Operators

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