@@ -17,7 +17,7 @@ class SettingsModel {
17
17
this .historyRetentionPeriod = HistoryRetentionPeriod .oneWeek,
18
18
this .workspaceFolderPath,
19
19
this .isSSLDisabled = false ,
20
- this .isProxyEnabled = false ,
20
+ this .proxySettings = const ProxySettings () ,
21
21
});
22
22
23
23
final bool isDark;
@@ -34,7 +34,7 @@ class SettingsModel {
34
34
final bool isSSLDisabled;
35
35
36
36
// Proxy settings
37
- final bool isProxyEnabled ;
37
+ final ProxySettings proxySettings ;
38
38
39
39
SettingsModel copyWith ({
40
40
bool ? isDark,
@@ -49,7 +49,7 @@ class SettingsModel {
49
49
HistoryRetentionPeriod ? historyRetentionPeriod,
50
50
String ? workspaceFolderPath,
51
51
bool ? isSSLDisabled,
52
- bool ? isProxyEnabled ,
52
+ ProxySettings ? proxySettings ,
53
53
}) {
54
54
return SettingsModel (
55
55
isDark: isDark ?? this .isDark,
@@ -66,7 +66,7 @@ class SettingsModel {
66
66
historyRetentionPeriod ?? this .historyRetentionPeriod,
67
67
workspaceFolderPath: workspaceFolderPath ?? this .workspaceFolderPath,
68
68
isSSLDisabled: isSSLDisabled ?? this .isSSLDisabled,
69
- isProxyEnabled : isProxyEnabled ?? this .isProxyEnabled ,
69
+ proxySettings : proxySettings ?? this .proxySettings ,
70
70
);
71
71
}
72
72
@@ -86,7 +86,7 @@ class SettingsModel {
86
86
historyRetentionPeriod: historyRetentionPeriod,
87
87
workspaceFolderPath: workspaceFolderPath,
88
88
isSSLDisabled: isSSLDisabled,
89
- isProxyEnabled : isProxyEnabled ,
89
+ proxySettings : proxySettings ,
90
90
);
91
91
}
92
92
@@ -141,7 +141,6 @@ class SettingsModel {
141
141
}
142
142
final workspaceFolderPath = data["workspaceFolderPath" ] as String ? ;
143
143
final isSSLDisabled = data["isSSLDisabled" ] as bool ? ;
144
- final isProxyEnabled = data["isProxyEnabled" ] as bool ? ;
145
144
146
145
const sm = SettingsModel ();
147
146
@@ -159,7 +158,7 @@ class SettingsModel {
159
158
historyRetentionPeriod ?? HistoryRetentionPeriod .oneWeek,
160
159
workspaceFolderPath: workspaceFolderPath,
161
160
isSSLDisabled: isSSLDisabled,
162
- isProxyEnabled : isProxyEnabled ,
161
+ proxySettings : ProxySettings . fromJson (data[ "proxySettings" ]) ,
163
162
);
164
163
}
165
164
@@ -179,7 +178,7 @@ class SettingsModel {
179
178
"historyRetentionPeriod" : historyRetentionPeriod.name,
180
179
"workspaceFolderPath" : workspaceFolderPath,
181
180
"isSSLDisabled" : isSSLDisabled,
182
- "isProxyEnabled " : isProxyEnabled ,
181
+ "proxySettings " : proxySettings ,
183
182
};
184
183
}
185
184
@@ -205,7 +204,7 @@ class SettingsModel {
205
204
other.historyRetentionPeriod == historyRetentionPeriod &&
206
205
other.workspaceFolderPath == workspaceFolderPath &&
207
206
other.isSSLDisabled == isSSLDisabled &&
208
- other.isProxyEnabled == isProxyEnabled ;
207
+ other.proxySettings == proxySettings ;
209
208
}
210
209
211
210
@override
@@ -224,7 +223,7 @@ class SettingsModel {
224
223
historyRetentionPeriod,
225
224
workspaceFolderPath,
226
225
isSSLDisabled,
227
- isProxyEnabled ,
226
+ proxySettings ,
228
227
);
229
228
}
230
229
}
0 commit comments