Map<String, dynamic> toJson() { return { if (condition != null) 'condition': condition!.toJson(), if (style != null) 'style': style!.toJson(), }; }