-
Notifications
You must be signed in to change notification settings - Fork 659
Add optional save confirmation dialog on app close #1002
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
base: main
Are you sure you want to change the base?
Conversation
|
Hi @5hank6 , have you tested this, as i can see in your code that you havent used the provider you created in ui_providers.dart, also there is no saveData() called on automatic close. |
|
Hi @ShashwatXD, thanks for the careful review 🙌 Yes, I’ve manually tested the flow on macOS:
That said, you’re right — the provider added in
Thanks for pointing this out — updating shortly. |
|
Thanks for checking this 👍 I’ve verified the behavior end-to-end on macOS:
I’ve manually tested all flows (save / discard / no changes), and they work as expected. |
|
Update: Verified:
Tested on macOS. All existing tests pass. |
|
@5hank6 the feature to be added was adding a auto-save flow, you have added too much complexity with the pre-existiing features only. |
|
@ShashwatXD |
|
I have asked the maintainers for the exact flow, we can discuss those in the related issue. |
PR Description
This PR adds an optional save confirmation dialog when closing the app.
Users can control this behavior via Settings → “Show Save Alert on App Close”.
When enabled and there are unsaved changes, the app prompts the user to either
save or discard changes before exiting.
This avoids unnecessary prompts when no changes exist and improves the overall
closing experience.
Related Issues
Closes #993
Checklist
mainAdded/updated tests?
OS tested on