2
0
mirror of https://github.com/inventree/inventree-app.git synced 2025-06-13 10:45: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

@ -11,12 +11,12 @@ import "package:path/path.dart";
*/
class InvenTreePreferencesDB {
InvenTreePreferencesDB._();
static final InvenTreePreferencesDB _singleton = InvenTreePreferencesDB._();
static InvenTreePreferencesDB get instance => _singleton;
InvenTreePreferencesDB._();
Completer<Database> _dbOpenCompleter = Completer();
bool isOpen = false;
@ -56,6 +56,12 @@ class InvenTreePreferencesDB {
class InvenTreePreferences {
factory InvenTreePreferences() {
return _api;
}
InvenTreePreferences._internal();
/* The following settings are not stored to persistent storage,
* instead they are only used as "session preferences".
* They are kept here as a convenience only.
@ -74,11 +80,6 @@ class InvenTreePreferences {
bool expandStockList = true;
// Ensure we only ever create a single instance of the preferences class
static final InvenTreePreferences _api = new InvenTreePreferences._internal();
static final InvenTreePreferences _api = InvenTreePreferences._internal();
factory InvenTreePreferences() {
return _api;
}
InvenTreePreferences._internal();
}