setUnwantedIngredientsForProject method

Future<void> setUnwantedIngredientsForProject(
  1. Map<String, String> ingredientsMap,
  2. PreferencesPageProjects project
)

Sets the unwanted ingredients map for a specific project.

Implementation

Future<void> setUnwantedIngredientsForProject(
  Map<String, String> ingredientsMap,
  PreferencesPageProjects project,
) async {
  await _sharedPreferences.setString(
    '${_TAG_UNWANTED_INGREDIENTS}_${project.projectKey}',
    jsonEncode(ingredientsMap),
  );
  notifyListeners();
}