@@ -39,24 +39,24 @@ class ThemeStateNotifier extends StateNotifier<SettingsModel> {
39
39
String ? proxyUsername,
40
40
String ? proxyPassword,
41
41
}) async {
42
- state = state. copyWith (
43
- isDark: isDark,
44
- alwaysShowCollectionPaneScrollbar: alwaysShowCollectionPaneScrollbar,
45
- size: size,
46
- offset: offset,
47
- defaultUriScheme: defaultUriScheme,
48
- defaultCodeGenLang: defaultCodeGenLang,
49
- saveResponses: saveResponses,
50
- promptBeforeClosing: promptBeforeClosing,
51
- activeEnvironmentId: activeEnvironmentId,
52
- historyRetentionPeriod: historyRetentionPeriod,
53
- workspaceFolderPath: workspaceFolderPath,
54
- isSSLDisabled: isSSLDisabled,
55
- isProxyEnabled: isProxyEnabled,
56
- proxyHost: proxyHost,
57
- proxyPort: proxyPort,
58
- proxyUsername: proxyUsername,
59
- proxyPassword: proxyPassword,
42
+ state = SettingsModel (
43
+ isDark: isDark ?? state.isDark ,
44
+ alwaysShowCollectionPaneScrollbar: alwaysShowCollectionPaneScrollbar ?? state.alwaysShowCollectionPaneScrollbar ,
45
+ size: size ?? state.size ,
46
+ offset: offset ?? state.offset ,
47
+ defaultUriScheme: defaultUriScheme ?? state.defaultUriScheme ,
48
+ defaultCodeGenLang: defaultCodeGenLang ?? state.defaultCodeGenLang ,
49
+ saveResponses: saveResponses ?? state.saveResponses ,
50
+ promptBeforeClosing: promptBeforeClosing ?? state.promptBeforeClosing ,
51
+ activeEnvironmentId: activeEnvironmentId ?? state.activeEnvironmentId ,
52
+ historyRetentionPeriod: historyRetentionPeriod ?? state.historyRetentionPeriod ,
53
+ workspaceFolderPath: workspaceFolderPath ?? state.workspaceFolderPath ,
54
+ isSSLDisabled: isSSLDisabled ?? state.isSSLDisabled ,
55
+ isProxyEnabled: isProxyEnabled ?? state.isProxyEnabled ,
56
+ proxyHost: proxyHost ?? state.proxyHost ,
57
+ proxyPort: proxyPort ?? state.proxyPort ,
58
+ proxyUsername: proxyUsername ?? state.proxyUsername ,
59
+ proxyPassword: proxyPassword ?? state.proxyPassword ,
60
60
);
61
61
await setSettingsToSharedPrefs (state);
62
62
}
0 commit comments