bookmarks function
- Ref<
Object?> ref, { - BookmarkKind? filter,
All bookmarks for the current user, newest first. Pass filter to
scope to one BookmarkKind.
Backed by user_bookmarks (migration 063). RLS scopes the query to
the authenticated user — no extra filter needed.
Implementation
@riverpod
Future<List<Bookmark>> bookmarks(Ref ref, {BookmarkKind? filter}) async {
final ds = ref.watch(supabaseDatasourceProvider);
final models = await ds.getBookmarks(filter: filter);
return models.map((m) => m.toEntity()).toList();
}