Map<String, dynamic> toJson() { final json = <String, dynamic>{}; if (params != null) { json[r'params'] = params; } return json; }