‘package:flutter/src/widgets/text.dart’ : Failed assertion:line xxx pos xx:‘data != null’ : A non-null String must be provided to a Text Widget.See also:…
这个是由于自己定义了String 的成员变量而没有初始化而导致后面调用的时候传入了空值。
NoSuchMethodError: The method ‘_debugTypesAreRight’ was called on null.Receiver…
这个是由于在定义有状态组件的时候createState方法没有返回值而导致的
@override
_MyHomePageState createState() {
new _MyHomePageState();
}
加个return就好了。