This commit is contained in:
2023-09-03 12:22:27 +08:00
parent ade2bb2113
commit 95b8435f78
16 changed files with 555 additions and 34 deletions

View File

@@ -121,8 +121,16 @@ class _SetServerPageState extends State<SetServerPage> with ThemeModeWidget {
ElevatedButton(
onPressed: _isValid
? () {
prefs.setString('baseUrl', _serverUrl + _apiPath);
context.go('/');
prefs
.setString('baseUrl', _serverUrl + _apiPath)
.then((re) {
if (re) {
tryInitApi(context);
context.canPop()
? context.pop()
: context.go("/");
}
});
}
: null,
child: Text(AppLocalizations.of(context)!.save)),