mirror of
https://github.com/flutter/samples.git
synced 2025-11-10 14:58:34 +00:00
Adds analysis options to Veggie Seasons (#98)
This commit is contained in:
@@ -32,19 +32,19 @@ class Preferences extends Model {
|
||||
return Set.from(_preferredCategories);
|
||||
}
|
||||
|
||||
void addPreferredCategory(VeggieCategory category) async {
|
||||
Future<void> addPreferredCategory(VeggieCategory category) async {
|
||||
_preferredCategories.add(category);
|
||||
await _saveToSharedPrefs();
|
||||
notifyListeners();
|
||||
}
|
||||
|
||||
void removePreferredCategory(VeggieCategory category) async {
|
||||
Future<void> removePreferredCategory(VeggieCategory category) async {
|
||||
_preferredCategories.remove(category);
|
||||
await _saveToSharedPrefs();
|
||||
notifyListeners();
|
||||
}
|
||||
|
||||
void setDesiredCalories(int calories) async {
|
||||
Future<void> setDesiredCalories(int calories) async {
|
||||
_desiredCalories = calories;
|
||||
await _saveToSharedPrefs();
|
||||
notifyListeners();
|
||||
|
||||
Reference in New Issue
Block a user