Map<String, dynamic> toJson() { final name = this.name; final selectorSettings = this.selectorSettings; return { 'name': name, if (selectorSettings != null) 'selectorSettings': selectorSettings, }; }