Converts to a map for method channel communication.
Map<String, dynamic> toMap() { return { 'filter': filter.name, }; }