2
0
mirror of https://github.com/inventree/inventree-app.git synced 2025-06-12 02:05:29 +00:00

Yet more linting

This commit is contained in:
Oliver
2021-09-28 20:35:19 +10:00
parent ad0cc36540
commit 77bac9af36
29 changed files with 251 additions and 253 deletions

View File

@ -16,6 +16,15 @@ class UserProfile {
this.selected = false,
});
factory UserProfile.fromJson(int key, Map<String, dynamic> json, bool isSelected) => UserProfile(
key: key,
name: json["name"] as String,
server: json["server"] as String,
username: json["username"] as String,
password: json["password"] as String,
selected: isSelected,
);
// ID of the profile
int? key;
@ -36,15 +45,6 @@ class UserProfile {
// User ID (will be provided by the server on log-in)
int user_id = -1;
factory UserProfile.fromJson(int key, Map<String, dynamic> json, bool isSelected) => UserProfile(
key: key,
name: json["name"] as String,
server: json["server"] as String,
username: json["username"] as String,
password: json["password"] as String,
selected: isSelected,
);
Map<String, dynamic> toJson() => {
"name": name,
"server": server,
@ -62,7 +62,7 @@ class UserProfileDBManager {
final store = StoreRef("profiles");
Future<Database> get _db async => await InvenTreePreferencesDB.instance.database;
Future<Database> get _db async => InvenTreePreferencesDB.instance.database;
Future<bool> profileNameExists(String name) async {