简体   繁体   English

Flutter 显示 Expected to find ','。 在 main.dart 文件中

[英]Flutter is showing Expected to find ','. in main.dart file

why Flutter is showing Expected to find ','.为什么 Flutter 显示 Expected to find ','。 in main.dart file在 main.dart 文件中

Flutter is showing Expected to find ','. Flutter 显示 Expected to find ','。 in main.dart file在 main.dart 文件中

https://i.stack.imgur.com/iDKS3.png https://i.stack.imgur.com/iDKS3.png

you need to add a comma after each line of code like this:您需要在每行代码后添加一个逗号,如下所示:

home: Scaffold(
  appBar: AppBar(...), //here a comma
  body: YoueBodyWidget(),
  
),

on which line you watching this error just add ',' in end您在哪一行看到此错误只需在末尾添加“,”

like:喜欢:

home: Scaffold( appBar: AppBar(...), //here a comma body: YoueBodyWidget(), home: Scaffold( appBar: AppBar(...), //这里是逗号 body: YoueBodyWidget(),

), ),

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM