toggleTheme method
void
toggleTheme()
Toggles between dark, light and system theme modes.
The component where this method is used must be a descendant of NakiThemeProvider, otherwise this operation will silently fail.
Implementation
void toggleTheme() {
final theme = NakiThemeProvider.of(this);
if (theme != null) theme.toggleMode();
}