1. WillPopScope(
    2. onWillPop: () async{
    3. if(isSubmit || (state.value['schemes']??[]).length < 1) {
    4. return true;
    5. }else {
    6. showDialog(context, '您还未提交,确认退出?', cancelTitle: '取消', comfrimTitle: '确认', comfirm: () {
    7. Navigator.pop(context);
    8. });
    9. return false;
    10. }
    11. },
    12. child: ...
    13. )