From b3b3127c55378ebb694d0be541ee65f95090bf5d Mon Sep 17 00:00:00 2001 From: Ashita Prasad Date: Sat, 17 May 2025 16:56:53 +0530 Subject: [PATCH] Update settings_model.dart --- lib/models/settings_model.dart | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/lib/models/settings_model.dart b/lib/models/settings_model.dart index 74bc2ff9..a06b1e59 100644 --- a/lib/models/settings_model.dart +++ b/lib/models/settings_model.dart @@ -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, ); } }