This commit is contained in:
rustdesk
2022-03-24 20:57:30 +08:00
parent 763234221e
commit 61722f5b8e
4 changed files with 146 additions and 13 deletions

View File

@@ -147,3 +147,40 @@ String? validate(value) {
final res = FFI.getByName('test_if_valid_server', value);
return res.isEmpty ? null : res;
}
void showAbout() {
DialogManager.show((setState, close) {
return CustomAlertDialog(
title: Text(translate('About') + ' RustDesk'),
content: Wrap(direction: Axis.vertical, spacing: 12, children: [
Text('Version: $version'),
InkWell(
onTap: () async {
const url = 'https://rustdesk.com/';
if (await canLaunch(url)) {
await launch(url);
}
},
child: Padding(
padding: EdgeInsets.symmetric(vertical: 8),
child: Text('Support',
style: TextStyle(
decoration: TextDecoration.underline,
)),
)),
]),
actions: [
TextButton(
style: flatButtonStyle,
onPressed: () {
close();
},
child: Text(translate('OK')),
)
],
onWillPop: () async {
return true;
},
);
});
}