feat: add setting for auto-lock fix: fix sideswipe
This commit is contained in:
@@ -4,12 +4,14 @@ enum AppLanguage { system, english, dutch }
|
||||
|
||||
class AppSettings {
|
||||
final bool pinRequired;
|
||||
final bool autoLockEnabled;
|
||||
final AppThemeMode themeMode;
|
||||
final AppLanguage language;
|
||||
final int barGridRows;
|
||||
|
||||
const AppSettings({
|
||||
required this.pinRequired,
|
||||
this.autoLockEnabled = true,
|
||||
required this.themeMode,
|
||||
this.language = AppLanguage.system,
|
||||
this.barGridRows = 3,
|
||||
@@ -17,12 +19,14 @@ class AppSettings {
|
||||
|
||||
AppSettings copyWith({
|
||||
bool? pinRequired,
|
||||
bool? autoLockEnabled,
|
||||
AppThemeMode? themeMode,
|
||||
AppLanguage? language,
|
||||
int? barGridRows,
|
||||
}) {
|
||||
return AppSettings(
|
||||
pinRequired: pinRequired ?? this.pinRequired,
|
||||
autoLockEnabled: autoLockEnabled ?? this.autoLockEnabled,
|
||||
themeMode: themeMode ?? this.themeMode,
|
||||
language: language ?? this.language,
|
||||
barGridRows: barGridRows ?? this.barGridRows,
|
||||
@@ -31,6 +35,7 @@ class AppSettings {
|
||||
|
||||
static const AppSettings defaults = AppSettings(
|
||||
pinRequired: false,
|
||||
autoLockEnabled: true,
|
||||
themeMode: AppThemeMode.system,
|
||||
);
|
||||
|
||||
@@ -39,11 +44,17 @@ class AppSettings {
|
||||
identical(this, other) ||
|
||||
other is AppSettings &&
|
||||
pinRequired == other.pinRequired &&
|
||||
autoLockEnabled == other.autoLockEnabled &&
|
||||
themeMode == other.themeMode &&
|
||||
language == other.language &&
|
||||
barGridRows == other.barGridRows;
|
||||
|
||||
@override
|
||||
int get hashCode =>
|
||||
Object.hash(pinRequired, themeMode, language, barGridRows);
|
||||
int get hashCode => Object.hash(
|
||||
pinRequired,
|
||||
autoLockEnabled,
|
||||
themeMode,
|
||||
language,
|
||||
barGridRows,
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user