loadColor method
Loads the saved color from shared preferences.
Implementation
Future<Color> loadColor() async {
final SharedPreferences prefs = await SharedPreferences.getInstance();
int colorValue =
prefs.getInt(_colorSharedPreferencesKey) ?? widget.defaultColor.value;
return Color(colorValue);
}