isBookmarked function
- Ref<
Object?> ref, { - required BookmarkKind kind,
- required String targetId,
Whether the current user has bookmarked the given target. Used by BookmarkButton to flip between filled and outlined glyph.
Implementation
@riverpod
Future<bool> isBookmarked(
Ref ref, {
required BookmarkKind kind,
required String targetId,
}) async {
final ds = ref.watch(supabaseDatasourceProvider);
return ds.isBookmarked(kind: kind, targetId: targetId);
}