Convert the filter to a map for channel.
Map<String, dynamic> toMap() { return <String, dynamic>{ 'type': type.value, 'child': { ...childMap(), ..._paramMap(), }, }; }