setGraphicTheme method

void setGraphicTheme(
  1. String theme
)

Implementation

void setGraphicTheme(String theme) async {
  state = theme;

  // Save the theme to shared_preferences.

  final prefs = await SharedPreferences.getInstance();
  await prefs.setString(_themeKey, theme);
}