Set preference value programmatically

is it possible to set a preference value programmatically.

Hey @vinodronold,

you can simply do the following in the frontend of your application to set a preference:

@inject(PreferenceService) preferences: PreferenceService;
// An example that sets the currently selected theme to `light`
// Note that setting a preference is async, while getting preferences is sync
await this.preferences.set('workbench.colorTheme', 'light');
1 Like

Thank you.!