WebView 要求为@immutable 属性,这是为啥?
来源:12-16 加载进度条与下拉刷新的实现【实战应用】
Mecil9
2019-05-17
This class (or a class which this class inherits from) is marked as ‘@immutable’, but one or more of its instance fields are not final: WebView.urldart(must_be_immutable)
写回答
1回答
-
CrazyCodeBoy
2019-05-18
因为Widget是@immutable 的是不可变的,另外WebView继承自StatefulWidget ,StatefulWidget集成自Widget:
class WebView extends StatefulWidget { ...
所以WebView也是@immutable 的,这个在课程中有介绍哦
00
相似问题