toJSON method
Convert this filter to JSON
Implementation
@override
Map<String, dynamic> toJSON() {
Map<String, String?> json = {};
if (equal != null) {
json[FilterField.equal] = equal;
}
if (notEqual != null) {
json[FilterField.notEqual] = notEqual;
}
if (startWith != null) {
json[FilterField.startWith] = startWith;
}
if (notStartWith != null) {
json[FilterField.notStartWith] = notStartWith;
}
if (endWith != null) {
json[FilterField.endWith] = endWith;
}
if (notEndWith != null) {
json[FilterField.notEndWith] = notEndWith;
}
if (contain != null) {
json[FilterField.contain] = contain;
}
if (notContain != null) {
json[FilterField.notContain] = notContain;
}
return json;
}