Fix, Improve

- fix range exception when no data fetched from server
- display empty when no server stored
- server edit page auto select stored/used key item
This commit is contained in:
LollipopKit
2021-10-31 21:44:02 +08:00
parent 1943fde6eb
commit 6e3fca32db
4 changed files with 35 additions and 25 deletions

View File

@@ -52,7 +52,7 @@ class _ServerPageState extends State<ServerPage>
if (pro.servers.isEmpty) {
return const Center(
child: Text(
'There is not server.\nClick the fab to add one.',
'There is no server.\nClick the fab to add one.',
textAlign: TextAlign.center,
),
);
@@ -106,7 +106,7 @@ class _ServerPageState extends State<ServerPage>
child: Padding(
padding: const EdgeInsets.all(13),
child: _buildRealServerCard(
si.status, si.info.name ?? '', si.connectionState),
si.status, si.info.name, si.connectionState),
),
onTap: () =>
AppRoute(ServerDetailPage(si.client.id!), 'server detail page')