Skip to content

Implement Stopwatch Overlay Feature #523 #821

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

Gaurav-Kushwaha-1225
Copy link
Contributor

Description

I implemented Overlay Functionality in the stopwatch module using this package. According to this, we can use the top left icon of the stopwatch screen to open the stopwatch overlay, which can be used on all screens. The timer controls are on the app screen itself as usual, but the stopwatch counting can be seen in the overlay UI.

Proposed Changes

  • Overlay UI Implementation:

    • Created a new StopwatchOverlayPop widget to display the stopwatch timer in the overlay.
    • Designed the overlay UI with a transparent background and a centered stopwatch display.
  • Overlay Entry Point:

    • Added a new overlayMain function in main.dart to serve as the entry point for the overlay window.
  • Permissions:

    • Implemented a requestPermission function to handle overlay permission requests using the flutter_overlay_window package.
  • Overlay Integration in Stopwatch:

    • Added a button in the stopwatch screen to toggle the overlay window in the stopwatch_view.dart.
  • Overlay Data Sharing in Stopwatch Controller:

    • Used the FlutterOverlayWindow.shareData method to share the stopwatch timer data with the overlay in real time.
    • Ensured the overlay updates when the timer starts, stops, or resets.

Fixes #523

Screenshots

Watch the feature demo here.

Checklist

  • Tests have been added or updated to cover the changes
  • Documentation has been updated to reflect the changes
  • Code follows the established coding style guidelines
  • All tests are passing

@Gaurav-Kushwaha-1225 Gaurav-Kushwaha-1225 changed the title Issue#523 Implement Stopwatch Overlay Feature #523 Apr 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Enhancement : Implement overlay popup for stopwatch functionality to appear over all apps.
1 participant