[英]Immutable class in flutter?
I am getting this-> Here is the screenshot我得到这个 - >这是截图
What is this immutable class?这个不可变类是什么? And how I need to correct this.以及我需要如何纠正这一点。
Fields in a stateless widget should be marked as final, so change fields to无状态小部件中的字段应标记为 final,因此将字段更改为
final pinPillPosition
final currentlySelectedPin
Do this in your stateless widget or you can ignore the warning by在您的无状态小部件中执行此操作,或者您可以通过以下方式忽略警告
//ignore: must_be_immutable
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.