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