updateThemeMode method

Future<void> updateThemeMode(
  1. ThemeMode theme
)

Persists the user's preferred ThemeMode to local or remote storage.

Implementation

Future<void> updateThemeMode(ThemeMode theme) async {
  // Use the shared_preferences package to persist settings locally or the
  // http package to persist settings over the network.
  _prefs.setInt("themeMode", theme.index);
}