Cha*_*air 2 widget stack-trace dart flutter
嗨我在运行应用程序时收到以下错误可能是什么原因导致问题?
??? EXCEPTION CAUGHT BY WIDGETS LIBRARY ???????????????????????????????????????????????????????????? The following assertion was thrown building Home(dirty, state: _HomeState#f7a67): 'package:flutter/src/widgets/framework.dart': Failed assertion: line 1639: '!children.any((Widget child) => child == null)': is not true.
小智 10
几天前面临同样的问题.
当您忘记或错过返回 Widget 时会发生这种情况.
如果没有看到您的代码,就很难知道确切的失败点.
就我而言,我之前的代码如下:
@override
Widget build(BuildContext context) {
//....
new Column(
//.....
);
}
Run Code Online (Sandbox Code Playgroud)
修好之后::
@override
Widget build(BuildContext context) {
//....
return new Column(
//.....
);
}
Run Code Online (Sandbox Code Playgroud)
希望这可以帮助!
| 归档时间: |
|
| 查看次数: |
2133 次 |
| 最近记录: |