Isolate SSHKeyPair process to avoid run stuck

This commit is contained in:
Junyuan Feng
2022-01-10 12:10:56 +08:00
parent 516cec5565
commit 692f3bcdbc
7 changed files with 39 additions and 31 deletions

View File

@@ -35,8 +35,8 @@ class _ServerDetailPageState extends State<ServerDetailPage>
@override
Widget build(BuildContext context) {
return Consumer<ServerProvider>(builder: (_, provider, __) {
return _buildMainPage(
provider.servers.firstWhere((e) => '${e.info.ip}:${e.info.port}' == widget.id));
return _buildMainPage(provider.servers
.firstWhere((e) => '${e.info.ip}:${e.info.port}' == widget.id));
});
}
@@ -44,16 +44,6 @@ class _ServerDetailPageState extends State<ServerDetailPage>
return Scaffold(
appBar: AppBar(
title: Text(si.info.name),
actions: [
IconButton(
onPressed: () => AppRoute(
ServerEditPage(
spi: si.info,
),
'Edit server info page')
.go(context),
icon: const Icon(Icons.edit))
],
),
body: ListView(
padding: const EdgeInsets.all(17),