mirror of
https://github.com/vodemn/m3_lightmeter.git
synced 2024-11-23 16:00:41 +00:00
format
This commit is contained in:
parent
41f111f087
commit
2fade36ba8
2 changed files with 6 additions and 14 deletions
2
.vscode/settings.json
vendored
2
.vscode/settings.json
vendored
|
@ -9,8 +9,6 @@
|
||||||
},
|
},
|
||||||
"dart.lineLength": 100,
|
"dart.lineLength": 100,
|
||||||
"[dart]": {
|
"[dart]": {
|
||||||
"editor.formatOnSave": true,
|
|
||||||
"editor.formatOnType": true,
|
|
||||||
"editor.rulers": [
|
"editor.rulers": [
|
||||||
100,
|
100,
|
||||||
120,
|
120,
|
||||||
|
|
|
@ -23,29 +23,23 @@ class UserPreferencesService {
|
||||||
|
|
||||||
UserPreferencesService(this._sharedPreferences);
|
UserPreferencesService(this._sharedPreferences);
|
||||||
|
|
||||||
IsoValue get iso =>
|
IsoValue get iso => isoValues.firstWhere((v) => v.value == (_sharedPreferences.getInt(_isoKey) ?? 100));
|
||||||
isoValues.firstWhere((v) => v.value == (_sharedPreferences.getInt(_isoKey) ?? 100));
|
|
||||||
set iso(IsoValue value) => _sharedPreferences.setInt(_isoKey, value.value);
|
set iso(IsoValue value) => _sharedPreferences.setInt(_isoKey, value.value);
|
||||||
|
|
||||||
NdValue get ndFilter =>
|
NdValue get ndFilter => ndValues.firstWhere((v) => v.value == (_sharedPreferences.getInt(_ndFilterKey) ?? 0));
|
||||||
ndValues.firstWhere((v) => v.value == (_sharedPreferences.getInt(_ndFilterKey) ?? 0));
|
|
||||||
set ndFilter(NdValue value) => _sharedPreferences.setInt(_ndFilterKey, value.value);
|
set ndFilter(NdValue value) => _sharedPreferences.setInt(_ndFilterKey, value.value);
|
||||||
|
|
||||||
EvSourceType get evSourceType =>
|
EvSourceType get evSourceType => EvSourceType.values[_sharedPreferences.getInt(_evSourceTypeKey) ?? 0];
|
||||||
EvSourceType.values[_sharedPreferences.getInt(_evSourceTypeKey) ?? 0];
|
|
||||||
set evSourceType(EvSourceType value) => _sharedPreferences.setInt(_evSourceTypeKey, value.index);
|
set evSourceType(EvSourceType value) => _sharedPreferences.setInt(_evSourceTypeKey, value.index);
|
||||||
|
|
||||||
bool get haptics => _sharedPreferences.getBool(_hapticsKey) ?? false;
|
bool get haptics => _sharedPreferences.getBool(_hapticsKey) ?? false;
|
||||||
set haptics(bool value) => _sharedPreferences.setBool(_hapticsKey, value);
|
set haptics(bool value) => _sharedPreferences.setBool(_hapticsKey, value);
|
||||||
|
|
||||||
double get cameraEvCalibration => _sharedPreferences.getDouble(_cameraEvCalibrationKey) ?? 0.0;
|
double get cameraEvCalibration => _sharedPreferences.getDouble(_cameraEvCalibrationKey) ?? 0.0;
|
||||||
set cameraEvCalibration(double value) =>
|
set cameraEvCalibration(double value) => _sharedPreferences.setDouble(_cameraEvCalibrationKey, value);
|
||||||
_sharedPreferences.setDouble(_cameraEvCalibrationKey, value);
|
|
||||||
|
|
||||||
double get lightSensorEvCalibration =>
|
double get lightSensorEvCalibration => _sharedPreferences.getDouble(_lightSensorEvCalibrationKey) ?? 0.0;
|
||||||
_sharedPreferences.getDouble(_lightSensorEvCalibrationKey) ?? 0.0;
|
set lightSensorEvCalibration(double value) => _sharedPreferences.setDouble(_lightSensorEvCalibrationKey, value);
|
||||||
set lightSensorEvCalibration(double value) =>
|
|
||||||
_sharedPreferences.setDouble(_lightSensorEvCalibrationKey, value);
|
|
||||||
|
|
||||||
ThemeType get themeType => ThemeType.values[_sharedPreferences.getInt(_themeTypeKey) ?? 0];
|
ThemeType get themeType => ThemeType.values[_sharedPreferences.getInt(_themeTypeKey) ?? 0];
|
||||||
set themeType(ThemeType value) => _sharedPreferences.setInt(_themeTypeKey, value.index);
|
set themeType(ThemeType value) => _sharedPreferences.setInt(_themeTypeKey, value.index);
|
||||||
|
|
Loading…
Reference in a new issue