toggleTheme method

void toggleTheme()

Implementation

void toggleTheme() {
  final newValue =
      currentMode.value == ThemeMode.light ? ThemeMode.dark : ThemeMode.light;

  runInAction(() => currentMode.value = newValue);
}