2
0
mirror of https://github.com/inventree/inventree-app.git synced 2025-06-12 10:15:32 +00:00
This commit is contained in:
Oliver Walters
2021-02-09 09:12:47 +11:00
parent 74e6315a57
commit d918079440
5 changed files with 80 additions and 78 deletions

View File

@ -83,24 +83,4 @@ class InvenTreePreferences {
}
InvenTreePreferences._internal();
// Load saved login details, and attempt connection
void loadLoginDetails(BuildContext context) async {
print("Loading login details");
await InvenTreeAPI().connectToServer(context);
}
void saveLoginDetails(BuildContext context, String server, String username, String password) async {
SharedPreferences prefs = await SharedPreferences.getInstance();
await prefs.setString(_SERVER, server);
await prefs.setString(_USERNAME, username);
await prefs.setString(_PASSWORD, password);
// Reconnect the API
await InvenTreeAPI().connectToServer(context);
}
}