andoriyaprashant / andoriyaprashant/OpSo

[Feature]: Add a "Bookmark" feature so users can save their favourite programs for quick access

Offen
#494 2 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
Dart
Sterne
53
Forks
108
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

## Summary

Many users of OpSo are actively researching which open-source programs to apply to. Currently, they must re-navigate to a program every time they want to reference it. A bookmark feature that persists across app sessions (using `shared_preferences`) would let users save and revisit their shortlisted programs without scrolling through the full list each time.

## Problem

- There is no way to mark or save a program as a favourite or bookmark.
- Users researching multiple programs have no way to quickly return to their shortlist.
- The app has no persistent local state — every session starts fresh.
- `shared_preferences` is already a common Flutter dependency and would not significantly increase bundle size.

## Proposed Solution

**Local persistence** using `shared_preferences` (add to `pubspec.yaml`):

```dart
// Save bookmark
final prefs = await SharedPreferences.getInstance();
List bookmarks = prefs.getStringList('bookmarks') ?? [];
if (!bookmarks.contains(programId)) {
bookmarks.add(programId);
await prefs.setStringList('bookmarks', bookmarks);
}
```

**UI changes:**

1. Add a bookmark icon (`Icons.bookmark_outline` / `Icons.bookmark`) to each program card on the home screen — toggles on tap.
2. Add a "Saved" tab or section at the top of the home screen that shows only bookmarked programs.
3. Show a filled bookmark icon on the program detail screen with a toggle.
4. Persist bookmark state across app restarts via `shared_preferences`.

**Files to modify:**

- `pubspec.yaml` — add `shared_preferences`
- Home screen widget — add bookmark icon to program card, add Saved tab
- Program detail screen — add bookmark toggle
- New file: `lib/services/bookmark_service.dart` — encapsulates all bookmark read/write logic

This is a self-contained feature with a clear scope. I'm happy to implement it end-to-end. Please assign this to me!

**Labels:** `enhancement`, `feature request`, `help wanted`, `GSSoC 2026`

Beitragsleitfaden

Beitragsleitfaden öffnen

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.