mirror of
https://github.com/foss42/apidash.git
synced 2025-12-02 02:39:19 +08:00
Update settings_model.dart
This commit is contained in:
@@ -17,6 +17,7 @@ class SettingsModel {
|
||||
this.historyRetentionPeriod = HistoryRetentionPeriod.oneWeek,
|
||||
this.workspaceFolderPath,
|
||||
this.isSSLDisabled = false,
|
||||
this.isDashBotEnabled = true,
|
||||
});
|
||||
|
||||
final bool isDark;
|
||||
@@ -31,6 +32,7 @@ class SettingsModel {
|
||||
final HistoryRetentionPeriod historyRetentionPeriod;
|
||||
final String? workspaceFolderPath;
|
||||
final bool isSSLDisabled;
|
||||
final bool isDashBotEnabled;
|
||||
|
||||
SettingsModel copyWith({
|
||||
bool? isDark,
|
||||
@@ -45,6 +47,7 @@ class SettingsModel {
|
||||
HistoryRetentionPeriod? historyRetentionPeriod,
|
||||
String? workspaceFolderPath,
|
||||
bool? isSSLDisabled,
|
||||
bool? isDashBotEnabled,
|
||||
}) {
|
||||
return SettingsModel(
|
||||
isDark: isDark ?? this.isDark,
|
||||
@@ -61,6 +64,7 @@ class SettingsModel {
|
||||
historyRetentionPeriod ?? this.historyRetentionPeriod,
|
||||
workspaceFolderPath: workspaceFolderPath ?? this.workspaceFolderPath,
|
||||
isSSLDisabled: isSSLDisabled ?? this.isSSLDisabled,
|
||||
isDashBotEnabled: isDashBotEnabled ?? this.isDashBotEnabled,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -80,6 +84,7 @@ class SettingsModel {
|
||||
historyRetentionPeriod: historyRetentionPeriod,
|
||||
workspaceFolderPath: workspaceFolderPath,
|
||||
isSSLDisabled: isSSLDisabled,
|
||||
isDashBotEnabled: isDashBotEnabled,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -134,6 +139,7 @@ class SettingsModel {
|
||||
}
|
||||
final workspaceFolderPath = data["workspaceFolderPath"] as String?;
|
||||
final isSSLDisabled = data["isSSLDisabled"] as bool?;
|
||||
final isDashBotEnabled = data["isDashBotEnabled"] as bool?;
|
||||
|
||||
const sm = SettingsModel();
|
||||
|
||||
@@ -151,6 +157,7 @@ class SettingsModel {
|
||||
historyRetentionPeriod ?? HistoryRetentionPeriod.oneWeek,
|
||||
workspaceFolderPath: workspaceFolderPath,
|
||||
isSSLDisabled: isSSLDisabled,
|
||||
isDashBotEnabled: isDashBotEnabled,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -170,6 +177,7 @@ class SettingsModel {
|
||||
"historyRetentionPeriod": historyRetentionPeriod.name,
|
||||
"workspaceFolderPath": workspaceFolderPath,
|
||||
"isSSLDisabled": isSSLDisabled,
|
||||
"isDashBotEnabled": isDashBotEnabled,
|
||||
};
|
||||
}
|
||||
|
||||
@@ -194,7 +202,8 @@ class SettingsModel {
|
||||
other.activeEnvironmentId == activeEnvironmentId &&
|
||||
other.historyRetentionPeriod == historyRetentionPeriod &&
|
||||
other.workspaceFolderPath == workspaceFolderPath &&
|
||||
other.isSSLDisabled == isSSLDisabled;
|
||||
other.isSSLDisabled == isSSLDisabled &&
|
||||
other.isDashBotEnabled == isDashBotEnabled;
|
||||
}
|
||||
|
||||
@override
|
||||
@@ -213,6 +222,7 @@ class SettingsModel {
|
||||
historyRetentionPeriod,
|
||||
workspaceFolderPath,
|
||||
isSSLDisabled,
|
||||
isDashBotEnabled,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user