setTheme method
- String theme
Updates the user's theme.
Implementation
Future<void> setTheme(String theme) async {
if (!state.hasData) {
log('User is not loaded yet. Aborting.');
return;
}
await captureEvent('theme_changed', properties: {'theme': theme});
return _updateUser(
state.requireData.copyWith(themeName: theme),
);
}