主要三步:
1、state方法中混入with AutomaticKeepAliveClientMixin
2、继续在state方法中的build方法中添加super.build(context);
3、继续在state方法中添加
1 @override 2 // TODO: implement wantKeepAlive 3 bool get wantKeepAlive => true; //保持当前页面状态
1 @override 2 // TODO: implement wantKeepAlive 3 bool get wantKeepAlive => true; //保持当前页面状态