toJson method
Implementation
Map<String, dynamic> toJson() {
final result = <String, dynamic>{
'numStartups': numStartups,
if (installMethod != null) 'installMethod': installMethod!.name,
if (autoUpdates != null) 'autoUpdates': autoUpdates,
'theme': theme.name,
if (hasCompletedOnboarding != null)
'hasCompletedOnboarding': hasCompletedOnboarding,
'preferredNotifChannel': preferredNotifChannel.name,
'verbose': verbose,
if (oauthAccount != null) 'oauthAccount': oauthAccount!.toJson(),
if (editorMode != null) 'editorMode': editorMode!.name,
'autoCompactEnabled': autoCompactEnabled,
'showTurnDuration': showTurnDuration,
'env': env,
'tipsHistory': tipsHistory,
'memoryUsageCount': memoryUsageCount,
'todoFeatureEnabled': todoFeatureEnabled,
'respectGitignore': respectGitignore,
'copyFullResponse': copyFullResponse,
'cachedStatsigGates': cachedStatsigGates,
if (cachedGrowthBookFeatures != null)
'cachedGrowthBookFeatures': cachedGrowthBookFeatures,
};
if (projects != null) {
result['projects'] = projects!.map((k, v) => MapEntry(k, v.toJson()));
}
return result;
}