Skip to content

Commit 906fa72

Browse files
committed
Rename function
1 parent 8f42514 commit 906fa72

File tree

6 files changed

+9
-9
lines changed

6 files changed

+9
-9
lines changed

lib/providers/nutrition.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,7 @@ class NutritionPlansProvider with ChangeNotifier {
288288
}
289289
}
290290

291-
Future<void> clearIngredientCaches() async {
291+
Future<void> clearIngredientCache() async {
292292
await database.deleteEverything();
293293
}
294294

lib/widgets/core/settings.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ class SettingsPage extends StatelessWidget {
6363
key: const ValueKey('cacheIconIngredients'),
6464
icon: const Icon(Icons.delete),
6565
onPressed: () async {
66-
await nutritionProvider.clearIngredientCaches();
66+
await nutritionProvider.clearIngredientCache();
6767

6868
if (context.mounted) {
6969
final snackBar = SnackBar(

test/core/settings_test.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ void main() {
6262
await tester.tap(find.byKey(const ValueKey('cacheIconIngredients')));
6363
await tester.pumpAndSettle();
6464

65-
verify(mockNutritionProvider.clearIngredientCaches());
65+
verify(mockNutritionProvider.clearIngredientCache());
6666
});
6767
});
6868
}

test/core/settings_test.mocks.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -909,9 +909,9 @@ class MockNutritionPlansProvider extends _i1.Mock
909909
) as _i15.Future<void>);
910910

911911
@override
912-
_i15.Future<void> clearIngredientCaches() => (super.noSuchMethod(
912+
_i15.Future<void> clearIngredientCache() => (super.noSuchMethod(
913913
Invocation.method(
914-
#clearIngredientCaches,
914+
#clearIngredientCache,
915915
[],
916916
),
917917
returnValue: _i15.Future<void>.value(),

test/nutrition/nutritional_meal_form_test.mocks.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -363,9 +363,9 @@ class MockNutritionPlansProvider extends _i1.Mock
363363
) as _i9.Future<void>);
364364

365365
@override
366-
_i9.Future<void> clearIngredientCaches() => (super.noSuchMethod(
366+
_i9.Future<void> clearIngredientCache() => (super.noSuchMethod(
367367
Invocation.method(
368-
#clearIngredientCaches,
368+
#clearIngredientCache,
369369
[],
370370
),
371371
returnValue: _i9.Future<void>.value(),

test/nutrition/nutritional_plan_form_test.mocks.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -363,9 +363,9 @@ class MockNutritionPlansProvider extends _i1.Mock
363363
) as _i9.Future<void>);
364364

365365
@override
366-
_i9.Future<void> clearIngredientCaches() => (super.noSuchMethod(
366+
_i9.Future<void> clearIngredientCache() => (super.noSuchMethod(
367367
Invocation.method(
368-
#clearIngredientCaches,
368+
#clearIngredientCache,
369369
[],
370370
),
371371
returnValue: _i9.Future<void>.value(),

0 commit comments

Comments
 (0)