fromJSON method

  1. @override
void fromJSON(
  1. dynamic json
)
override

Convert this filter from JSON

Implementation

@override
void fromJSON(dynamic json) {
  if (json is! Map<String, dynamic>) {
    return;
  }
  if (json.containsKey(FilterField.equal)) {
    equal = json[FilterField.equal];
  }
  if (json.containsKey(FilterField.notEqual)) {
    notEqual = json[FilterField.notEqual];
  }
  if (json.containsKey(FilterField.startWith)) {
    startWith = json[FilterField.startWith];
  }
  if (json.containsKey(FilterField.notStartWith)) {
    notStartWith = json[FilterField.notStartWith];
  }
  if (json.containsKey(FilterField.endWith)) {
    endWith = json[FilterField.endWith];
  }
  if (json.containsKey(FilterField.contain)) {
    contain = json[FilterField.contain];
  }
  if (json.containsKey(FilterField.notContain)) {
    notEqual = json[FilterField.notContain];
  }
}