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