一句话解决方案:
看看你的return语句类型是不是漏了
报错内容:
The body might complete normally, causing ‘null’ to be returned, but
the return type is a potentially non-nullable type.
这个报错翻译过来的意思是:
方法体会被自动补全,届时null将会为返回值,但是方法声明的类型默认为不可空类型(因此产生冲突)
我报错的代码段如下:
List<Widget> _getListData(){
var tempList = listData.