WillPopScope(
onWillPop: () async{
if(isSubmit || (state.value['schemes']??[]).length < 1) {
return true;
}else {
showDialog(context, '您还未提交,确认退出?', cancelTitle: '取消', comfrimTitle: '确认', comfirm: () {
Navigator.pop(context);
});
return false;
}
},
child: ...
)