Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Toolchain] Corresponding Flutter methods may not have return values at all #351

Open
yamasite opened this issue Nov 8, 2021 · 1 comment

Comments

@yamasite
Copy link
Contributor

yamasite commented Nov 8, 2021

Problem

Quite a few methods are not consistent in return values:

C++: public abstract int addPublishStreamUrl(String url, boolean transcodingEnabled);
Flutter: Future<void> addPublishStreamUrl(String url, bool transcodingEnabled);

C++ has a return value, but Flutter does not.

Solution

To ensure that Flutter doc does not generate return values in docs or comments, new attributes need to be added.

Need to update

<section id="return_values">
   <title>返回值</title>
   <ul>
       <li>0: 方法调用成功。</li>
       <li>&lt; 0: 方法调用失败。<ul>
       <li><codeph>ERR_INVALID_ARGUMENT</codeph> (2): 参数无效,一般是 URL 为空或是长度为 0 的字符串。</li>
       <li><codeph>ERR_NOT_INITIALIZED</codeph> (7): 推流时未初始化引擎。</li>
   </ul>
       </li>
   </ul>
</section>

to

<section id="return_values" props="native electron unity">
   <title>返回值</title>
   <ul>
       <li>0: 方法调用成功。</li>
       <li>&lt; 0: 方法调用失败。<ul>
       <li><codeph>ERR_INVALID_ARGUMENT</codeph> (2): 参数无效,一般是 URL 为空或是长度为 0 的字符串。</li>
       <li><codeph>ERR_NOT_INITIALIZED</codeph> (7): 推流时未初始化引擎。</li>
   </ul>
       </li>
   </ul>
</section>
@yamasite
Copy link
Contributor Author

yamasite commented Nov 8, 2021

@wangjie-agora This change affects 180 api_ dita files

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants