Interested RSVP Status

Branch: feat/interested-rsvp-status Merged into: develop Date: March 2026

Overview

Upgraded the event details bottom bar from a binary Going/Leave toggle to a full 3-state RSVP system: Interested, Going, and Leave. This implements the MVP roadmap item for event attendance tracking with two distinct engagement levels.

Why It Was Built

The roadmap specified “Interested” and “Going” as two separate RSVP actions (Phase 1 - MVP Completion). The EventAttendeeStatus enum already defined going, interested, not_going, and invited in the data model, but the UI only exposed “Going”. The backend already stored and accepted both statuses via event_attendees — the gap was entirely in the UI and state layer.

What Changed

Data Model (event_model.dart + event_model.g.dart)

  • Added isUserInterested boolean field to Event
  • Updated copyWith() to include the new field
  • Updated the generated JSON serializer/deserializer (is_user_interested key)

State & Logic (event_notifier.dart)

  • Added markInterested(eventId) — calls the repository with EventAttendeeStatus.interested, increments interestedCount in local state
  • Added unmarkInterested(eventId) — removes the RSVP from the backend, decrements count

Repository (event_repository.dart)

  • Added markInterested(id) — thin wrapper calling _api.joinEvent(id, status: EventAttendeeStatus.interested)

UI (event_details_screen.dart)

The _buildBottomBar widget was extended with a new branch for the “neither going nor interested” state:

ScenarioUI
Level lockedSingle disabled lock button
GoingSingle “Esci dall’evento” outlined button
Not going (default)Two-button row: Interested (1x flex) + Ci sono! (2x flex)
Interested activeStar icon fills, button border turns coral, tap removes interest

Architecture Notes

The API (event_api_service.dart) already accepted a status parameter on joinEvent(). The feature was a pure UI + state wiring exercise — no backend changes were needed. This is typical of completing MVP features where the backend contract was defined ahead of the client.