需求:A页面跳到B页面,在B页面做数据更新,返回A页面刷新结果;
思路:在A页面跳转到B页面的时候使用then函数,在B返回A的时候进行数据刷新操作。
Navigator.of(context).push(MaterialPageRoute(builder: (context) {
return OpinionDetails(feedbackModel: _feedbackLoader[index]);//是一个feedbackModel
})).then((value){
_feedbackLoader.obtainData(true);//数据刷新
});