Converts the action to a map for platform channel communication.
Map<String, dynamic> toMap() { return { 'title': title, 'style': style.index, }; }