set method

void set(
  1. ThemeMode next
)

Sets the preference, persists it, and re-applies.

Implementation

void set(ThemeMode next) {
  mode.value = next;
  _settings.theme = next.name;
  _applyNow();
}