opt.: servers list -> map

This commit is contained in:
lollipopkit
2023-04-23 14:08:46 +08:00
parent bd608ce06f
commit 71243ea1fe
10 changed files with 85 additions and 80 deletions

View File

@@ -49,8 +49,8 @@ class _PkgManagePageState extends State<PkgManagePage>
@override
void initState() {
super.initState();
final si = locator<ServerProvider>().getServer(widget.spi.id);
if (si.client == null) {
final si = locator<ServerProvider>().servers[widget.spi.id];
if (si == null || si.client == null) {
showSnackBar(context, Text(_s.waitConnection));
context.pop();
return;