[英]flutter: why property in flutter doc can't be identified in my program?
when I'm working with flutter CupertinoScrollbar
in flutter doc , I found the property thickness
and thicknessWhileDragging
.当我在flutter doc 中使用 flutter
CupertinoScrollbar
时,我发现了属性thickness
和thicknessWhileDragging
。 But when I want to try the two properties my program just couldn't identify them.但是当我想尝试这两个属性时,我的程序无法识别它们。 It showed a red wavy line and said
the named parameter isn't defined
.它显示了一条红色波浪线,并表示
the named parameter isn't defined
。 So why this happens?那么为什么会发生这种情况呢? The related code is below.
相关代码如下。
CupertinoScrollbar(
isAlwaysShown: true,
controller: sc,
thickness: 3, // it said the named parameter isn't defined
child: ListView.builder(
controller: sc,
itemCount: 1,
scrollDirection: Axis.vertical,
padding: EdgeInsets.fromLTRB(ScreenUtil.dp(22), 0, ScreenUtil.dp(23), ScreenUtil.dp(8.13)),
itemBuilder: (context, index) => Html(data: """$html""",),
),
),
Try flutter clean
and then flutter pub get
尝试
flutter clean
然后flutter pub get
if it still doesn't work, try close your code editor and then open it again如果它仍然不起作用,请尝试关闭您的代码编辑器,然后再次打开它
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.