CCExtractor / CCExtractor/ultimate_alarm_clock
Feature: Stopwatch Persistent Notification
- Dominant language
- Dart
- Stars
- 112
- Forks
- 227
- PR merge metrics
- No merged PRs in 30d
Description
### Description
### Problem
Currently, when the stopwatch is running and the user navigates back to the home screen or switches apps, there’s no visible indication that the stopwatch is still active. Users have to reopen the app to check the elapsed time, which is inconvenient.
### Proposed Solution
Implement a **persistent notification** that:
- Displays the current running stopwatch time (updates every second).
- Remains visible as long as the stopwatch is running.
- Includes actionable buttons:
- **Pause**
- **Reset**
- **Open App**
The notification should automatically dismiss itself when the stopwatch is stopped or reset.
### Suggested Implementation
- Use [`flutter_local_notifications`](https://pub.dev/packages/flutter_local_notifications) for displaying notifications.
- Use [`android_alarm_manager_plus`](https://pub.dev/packages/android_alarm_manager_plus) or a foreground service to update the notification every second while the app is in the background.
- Connect the notification updates to the `StopwatchController` (or equivalent stopwatch logic) so that the displayed time is always accurate.
- Handle actions (Pause/Reset) via intent callbacks or notification action handlers.
### Benefits
- Users can easily track elapsed time without opening the app.
- Makes the stopwatch feature more robust and professional.
- Enhances user experience, especially for tasks that require continuous time tracking in the background.
### Video
https://github.com/user-attachments/assets/a5a69fe3-5eb8-43ed-87ea-efd454036226
---
> I’d be happy to contribute if guidance or PR support is needed!
### Screenshots
_No response_
Contributor guide
Assessment
This issue has not been assessed yet.