toJson method

  1. @override
Map<String, dynamic> toJson()
override

Converts this filter to a JSON-compatible map.

Implementation

@override
Map<String, dynamic> toJson() {
  final Map<String, dynamic> json = {};
  json["skip"] = skip;
  json["take"] = take;
  if (orderBy != null) {
    json["orderBy"] = orderBy;
  }
  if (orderType != null) {
    json["orderType"] = orderType;
  }
  if (search != null) {
    json["search"] = search;
  }
  if (viewCode != null) {
    json["viewCode"] = viewCode;
  }
  for (final field in fields) {
    json[field.name] = field.toJson();
  }
  return json;
}