简体   繁体   English

错误:太多位置 arguments:允许 0,但找到 2

[英]Error: Too many positional arguments: 0 allowed, but 2 found

Error: Too many positional arguments: 0 allowed, but 2 found.错误:太多位置 arguments:允许 0,但找到 2。 Try removing the extra positional arguments. configuration.dimensions = VideoDimensions(1920, 1080);尝试删除多余的位置 arguments。configuration.dimensions = VideoDimensions(1920, 1080);

This error happen when I use Agora video call in Flutter.我在Flutter使用Agora视频通话时出现这个错误。

Error says it doesnt have any positional arguments, instead it has named arguments错误说它没有任何位置 arguments,而是命名为 arguments

which means you need to pass like this这意味着你需要像这样通过

VideoDimensions(width: 1920, height: 1080),

Position arguments can be created as Position arguments 可以创建为

void functionName(int a, intb); => functionName(3,6) => functionName(3,6)

Optional arguments but named可选 arguments 但已命名

void functionName({int a, intb}); => functionName(a: 4) => functionName(a: 4)

Named and required命名和要求

void functionName({ required int a, requried intb}); => functionName(a: 3, b: 6) => functionName(a: 3, b: 6)

Optional but not named可选但未命名

void functionName([int a, intb]); => functionName(3,6) => functionName(3,6)

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 错误:位置参数太多:允许 1 个,但找到 2 个 - Error: Too many positional arguments: 1 allowed, but 2 found Riverpod StreamProvider 错误:位置参数太多:允许 1 个,但找到 2 个。 尝试删除额外的位置参数 - Riverpod StreamProvider Error: Too many positional arguments: 1 allowed, but 2 found. Try removing the extra positional arguments 错误:位置参数过多:预期为0,但发现3 - error: Too many positional arguments: 0 expected, but 3 found 错误:位置 arguments 太多:预期为 0,但找到了 9 - error: Too many positional arguments: 0 expected, but 9 found 错误:位置 arguments 太多:允许 1 个,但找到了 2 个。 尝试删除额外的位置 arguments。 super.addToScene(builder, layerOffset); - Error: Too many positional arguments: 1 allowed, but 2 found. Try removing the extra positional arguments. super.addToScene(builder, layerOffset); flutter 错误:位置 arguments 太多:预期为 0,但在流生成器中找到 1 - flutter error: Too many positional arguments: 0 expected, but 1 found in streambuilder Flutter 错误:太多位置 arguments:预期 0,但找到 1 - Flutter Error: Too many positional arguments: 0 expected, but 1 found Dart Flutter - 太多位置 arguments:预期 2 个,但找到 3 个。 错误 - Dart Flutter - Too many positional arguments: 2 expected, but 3 found. error 位置参数过多,预​​期为0,但找到3 - Too many positional arguments, 0 expected, but 3 found 位置参数过多,预​​期为 0,但找到了 1 - Too many positional arguments 0 expected but 1 found
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM