barrierDismissible and onWillPop

This commit is contained in:
rustdesk 2022-03-24 21:23:22 +08:00
parent 61722f5b8e
commit 9dadd76a8d
2 changed files with 60 additions and 64 deletions

View File

@ -135,8 +135,12 @@ void showServer() {
},
child: Text(translate('OK')),
),
]);
});
],
onWillPop: () async {
return true;
},
);
}, barrierDismissible: true);
}
String? validate(value) {
@ -169,18 +173,10 @@ void showAbout() {
)),
)),
]),
actions: [
TextButton(
style: flatButtonStyle,
onPressed: () {
close();
},
child: Text(translate('OK')),
)
],
actions: [],
onWillPop: () async {
return true;
},
);
});
}, barrierDismissible: true);
}