Skip to content

Commit 95eed70

Browse files
committed
Remove unused locator
1 parent 2c9a001 commit 95eed70

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

lib/providers/exercises.dart

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ class ExercisesProvider with ChangeNotifier {
107107
}
108108

109109
// Initialize filters for exercises search in exercises list
110-
void _initFilters() {
110+
void initFilters() {
111111
if (_muscles.isEmpty || _equipment.isEmpty || _filters != null) {
112112
return;
113113
}
@@ -268,8 +268,6 @@ class ExercisesProvider with ChangeNotifier {
268268
///
269269
/// If the exercise is not known locally, it is fetched from the server.
270270
Future<Exercise> fetchAndSetExercise(int exerciseId) async {
271-
//final database = locator<ExerciseDatabase>();
272-
273271
try {
274272
final exercise = findExerciseById(exerciseId);
275273

@@ -435,7 +433,7 @@ class ExercisesProvider with ChangeNotifier {
435433
]);
436434
await setExercisesFromDatabase(database);
437435

438-
_initFilters();
436+
initFilters();
439437
notifyListeners();
440438
}
441439

@@ -450,8 +448,6 @@ class ExercisesProvider with ChangeNotifier {
450448
log('Loaded ${exercisesDb.length} exercises from cache');
451449

452450
exercises = exercisesDb.map((e) => Exercise.fromApiDataString(e.data, _languages)).toList();
453-
454-
// updateExerciseCache(database);
455451
}
456452

457453
/// Updates the exercise database with *all* the exercises from the server

0 commit comments

Comments
 (0)