toggle method

  1. @override
void toggle()
override

Toggle the current theme between dark and light

If the current theme has only light (or dark) implementation, the toggle method will have no effect

Implementation

@override
void toggle() {
  injected.initialize();
  if (isDarkTheme) {
    themeMode = ThemeMode.light;
  } else {
    themeMode = ThemeMode.dark;
  }
}