name = "$country.$city", 这个报错
来源:5-7 带你揭开Flutter中的面向对象(标准构造方法、初始化列表)

慕先生6041497
2022-02-16
这个报错 name’ isn’t a field in the enclosing class. (Documentation) Try correcting the name to match an existing field, or defining a field named ‘name’.
写回答
2回答
-
Da丶
2022-05-12
应该是Dart的语法改变了。
name 不能在参数列表和初始化列表中同时出现
00 -
CrazyCodeBoy
2022-02-17
对照下这块代码实现看是否有出入的地方呢:https://coding.imooc.com/learn/questiondetail/134661.html
00
相似问题