问题:
The following assertion was thrown while finalizing the widget tree:
xxx.dispose failed to call super.dispose.
dispose() implementations must always call their superclass dispose() method, to ensure that all the resources used by the widget are fully released.
When the exception was thrown, this was the stack:
原因:
在该页面上还有资源没有被释放掉。dispose()实现必须始终调用其超类方法,以确保小部件使用的所有资源都被完全释放。
解决方法:
把该页面中可以跳转过去的页面都加上,以确保完全释放
@override
void dispose() {
super.dispose();
//释放的资源
}