toJson method
Implementation
Map<String, dynamic> toJson() {
final t = type == FilterType.equal
? 'equal'
: type == FilterType.like
? 'like'
: type == FilterType.gt
? 'gt'
: 'lt';
return <String, dynamic>{
'key': key,
'type': t,
'value': value,
};
}