toggleMode static method
Toggles the current theme mode.
Returns true if successful, false if no NakiThemeProvider
is in the component tree.
Implementation
static bool toggleMode(BuildContext context) {
final state = of(context);
if (state == null) return false;
state.toggleMode();
return true;
}