我正在使用最新版本的Flutter,我有一个我不理解的问题。情况是这样的:我根据变量的值构建一个下拉按钮。当更改dropdown的值时,该变量可能会通过setState()进行更改。// a few things there // here, that text will never change despite "setStatenewUnit) {
This error can occur when code calls setState() from a timer or an animation callback.Another solution is to check the "mounted" property of this object before calling setState() to ensureE/flutter (12613): This error might indicate a memory leak if setState