Changed provider
This commit is contained in:
@@ -11,7 +11,7 @@ class BookmarksModel {
|
|||||||
|
|
||||||
BookmarksModel({
|
BookmarksModel({
|
||||||
this.currentPage = 0,
|
this.currentPage = 0,
|
||||||
this.limit = 20,
|
this.limit = 30,
|
||||||
required this.bookmarks,
|
required this.bookmarks,
|
||||||
this.inialLoadStatus = LoadStatus.loading,
|
this.inialLoadStatus = LoadStatus.loading,
|
||||||
this.loadingMore = false,
|
this.loadingMore = false,
|
||||||
|
|||||||
@@ -44,7 +44,7 @@ FutureOr<void> bookmarksRequestLoadMore(BookmarksRequestLoadMoreRef ref) async {
|
|||||||
ref.read(bookmarksProvider.notifier).setLoadingMore(false);
|
ref.read(bookmarksProvider.notifier).setLoadingMore(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Riverpod(keepAlive: true)
|
@riverpod
|
||||||
class Bookmarks extends _$Bookmarks {
|
class Bookmarks extends _$Bookmarks {
|
||||||
@override
|
@override
|
||||||
BookmarksModel build() {
|
BookmarksModel build() {
|
||||||
|
|||||||
@@ -172,11 +172,12 @@ final bookmarksRequestLoadMoreProvider =
|
|||||||
);
|
);
|
||||||
|
|
||||||
typedef BookmarksRequestLoadMoreRef = AutoDisposeFutureProviderRef<void>;
|
typedef BookmarksRequestLoadMoreRef = AutoDisposeFutureProviderRef<void>;
|
||||||
String _$bookmarksHash() => r'454f0fcfa9ee776828ba50edf4906ed0a267cb97';
|
String _$bookmarksHash() => r'fa25d1f42aaf2a5d5b09cb082e2a2b70f277309c';
|
||||||
|
|
||||||
/// See also [Bookmarks].
|
/// See also [Bookmarks].
|
||||||
@ProviderFor(Bookmarks)
|
@ProviderFor(Bookmarks)
|
||||||
final bookmarksProvider = NotifierProvider<Bookmarks, BookmarksModel>.internal(
|
final bookmarksProvider =
|
||||||
|
AutoDisposeNotifierProvider<Bookmarks, BookmarksModel>.internal(
|
||||||
Bookmarks.new,
|
Bookmarks.new,
|
||||||
name: r'bookmarksProvider',
|
name: r'bookmarksProvider',
|
||||||
debugGetCreateSourceHash:
|
debugGetCreateSourceHash:
|
||||||
@@ -185,6 +186,6 @@ final bookmarksProvider = NotifierProvider<Bookmarks, BookmarksModel>.internal(
|
|||||||
allTransitiveDependencies: null,
|
allTransitiveDependencies: null,
|
||||||
);
|
);
|
||||||
|
|
||||||
typedef _$Bookmarks = Notifier<BookmarksModel>;
|
typedef _$Bookmarks = AutoDisposeNotifier<BookmarksModel>;
|
||||||
// ignore_for_file: type=lint
|
// ignore_for_file: type=lint
|
||||||
// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member, invalid_use_of_visible_for_testing_member
|
// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member, invalid_use_of_visible_for_testing_member
|
||||||
|
|||||||
Reference in New Issue
Block a user