♻️ Migrated to riverpod v3

This commit is contained in:
2025-12-06 13:00:30 +08:00
parent fd79c11d18
commit 9d03faf594
158 changed files with 6834 additions and 10357 deletions

View File

@@ -35,10 +35,12 @@ final postListNotifierProvider = AsyncNotifierProvider.autoDispose
PostListNotifier.new,
);
class PostListNotifier
extends AutoDisposeFamilyAsyncNotifier<List<SnPost>, PostListQuery>
with FamilyAsyncPaginationController<SnPost, PostListQuery> {
static const int _pageSize = 20;
class PostListNotifier extends AsyncNotifier<List<SnPost>>
with AsyncPaginationController<SnPost> {
final PostListQuery arg;
PostListNotifier(this.arg);
static const int pageSize = 20;
@override
Future<List<SnPost>> fetch() async {
@@ -46,7 +48,7 @@ class PostListNotifier
final queryParams = {
'offset': fetchedCount,
'take': _pageSize,
'take': pageSize,
'replies': arg.includeReplies,
'orderDesc': arg.orderDesc,
if (arg.shuffle) 'shuffle': arg.shuffle,