saveCustomTheme method

Future<void> saveCustomTheme(
  1. Color primaryColor
)

Implementation

Future<void> saveCustomTheme(Color primaryColor) async {
  final prefs = await SharedPreferences.getInstance();

  // Save the color value as an integer
  await prefs.setInt(customColorKey, primaryColor.value);

  // Also save that we're using a custom theme type
  await saveTheme(ThemeType.custom);
}