fixed issue #2
This commit is contained in:
@@ -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();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user