Toggle Availability Quickly from Profile or Home Screen
The Availability Toggle Widget is a compact inline component — rendered as a labelled switch or pill button with colour-coded status (green for active, amber for paused) — that appears on the peer mentor's profile screen and home screen. Tapping the widget to activate pause still triggers a lightweight confirmation sheet (to prevent accidental taps on a commonly-visited screen), but this sheet is minimal compared to the full Pause Status Screen flow. The widget communicates status changes via BLoC, which calls the Pause Management Service. The full Pause Status Screen remains accessible for mentors who want to add a reason or resume date, but the toggle widget satisfies the majority of quick-change use cases.
User Story
Acceptance Criteria
- Given I am on my profile or home screen, when I see the Availability Toggle Widget, then it shows my current status with a colour-coded label (active/paused)
- Given my status is active, when I tap the toggle widget to pause, then a lightweight confirmation bottom sheet appears before applying the change
- Given I confirm the pause via the widget, when the status is saved, then the widget immediately updates to show paused status and the Pause Management Service is called
- Given my status is paused, when I tap the toggle widget to resume, then the status changes to active without requiring a confirmation step
- Given the widget state changes, when the BLoC emits the updated state, then the widget updates its colour and label in real-time without requiring a full page reload
- Given a network error occurs during a toggle, when the save fails, then the widget reverts to the previous status and shows an error snackbar
Business Value
The toggle widget addresses the core UX requirement of minimal-friction status management for volunteers managing personal health challenges or seasonal commitments. By surfacing availability control on frequently-visited screens rather than requiring deep navigation, the feature lowers the cognitive threshold for keeping availability status accurate — directly improving coordinator planning quality and assignment dispatch efficiency.