setTheme method
Sets the global theme to the provided mode.
The component where this method is used must be a descendant of NakiThemeProvider, otherwise this operation will silently fail.
Implementation
void setTheme(ThemeMode mode) {
final theme = NakiThemeProvider.of(this);
if (theme != null) theme.setMode(mode);
}