QuerySort constructor

QuerySort({
  1. String? field,
  2. bool asc = true,
})

Implementation

QuerySort({String? field, bool asc = true}) {
  if (field != null && field.isNotEmpty) {
    if (asc) {
      this.asc(field);
    } else {
      this.desc(field);
    }
  }
}