简体   繁体   English

flutter 运行 pub 运行 build_runner 构建失败

[英]flutter run pub run build_runner build failed

[used json annotation and serializable ][1] [使用 json 注释和可序列化][1]

[Not understanding the error][2] [不理解错误][2]

You can't name the instance of the object with the same name as the object.您不能将 object 的实例命名为与 object 相同的名称。 This will do the trick:这可以解决问题:

addproductmodel _addproductmodel = addproductmodel(product_name: _productname.text);

You class's names also should start with uppercase letter for clarity.为了清楚起见,您的班级名称也应以大写字母开头。 I recommand you to read this.我建议您阅读此内容。

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

相关问题 flutter pub run build_runner 构建失败 - flutter pub run build_runner build failed flutter pub run build_runner 卡住了 - flutter pub run build_runner stuck flutter pub run build_runner build --delete-conflicting-outputs 在 github 操作中运行失败 - flutter pub run build_runner build --delete-conflicting-outputs run failed in github action $ flutter pub run build_runner 在项目中构建 hive 没有响应 - $ flutter pub run build_runner build in project with hive not responding flutter pub run build_runner build 上的错误 - Error on flutter pub run build_runner build flutter pub run build_runner 构建不工作 - flutter pub run build_runner build not working 如何在 intellij idea 中以调试模式运行 flutter 'packages pub run build_runner build'? - How run flutter 'packages pub run build_runner build' with debug mode in intellij idea? 如何使用 class 的“flutter pub run build_runner build”在 Flutter 中有字段时间戳? - How to “flutter pub run build_runner build” with the class has field Timestamp in Flutter? pub run build_runner build 有错误 (66) - pub run build_runner build has error (66) 运行时出错 flutter pub run build_runner build --delete-conflicting-outputs - Error when running flutter pub run build_runner build --delete-conflicting-outputs
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM