mirror of
https://github.com/inventree/inventree-app.git
synced 2026-10-08 00:02:05 +00:00
Cleanup
This commit is contained in:
1 parent
74e6315a57
commit
d918079440
5 files changed
+80
-78
No files matched your search
@@ -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);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user