fixed issue #2

This commit is contained in:
odweta
2026-04-03 18:13:27 +02:00
parent 4650604593
commit 30591db7f3
2 changed files with 34 additions and 1 deletions
+15
View File
@@ -1,5 +1,6 @@
// gets all quotes from the database and returns them in a list
import 'package:go_router/go_router.dart';
import 'package:path_provider/path_provider.dart';
import 'package:flutter/material.dart';
@@ -218,4 +219,18 @@ class QuoteProvider extends ChangeNotifier {
return Theme.of(context).textTheme.bodyMedium!.color!;
}
}
void showListPageFilteredByAuthor(BuildContext context, int index) {
filterController.text = sortedAuthorCounts[index].key;
filterBy = 0; // filter by author
// navigate to the main page
GoRouter.of(context).go('/');
Future.microtask(() => notifyListeners());
}
void resetLeaderboardFilter() {
filterController.text = '';
filterBy = 0;
notifyListeners();
}
}