foss42 / apidash

API Dash is a beautiful open-source cross-platform API Client built using Flutter which can help you easily create & customize your API requests, visually inspect responses and generate API integration code. It is supported for macOS, Windows, Linux, Android & iOS. A lightweight alternative to postman/insomnia.
https://apidash.dev
Apache License 2.0
1.59k stars 301 forks source link

Fix prompt only when changes made #365

Closed yashas-hm closed 6 months ago

yashas-hm commented 6 months ago

PR Description

Only shows save prompt when changes are made to the requests

Related Issues

Checklist

Added/updated tests?

animator commented 6 months ago

Idea is good. Approach is incorrect. You need to think more to figure out a better way. Refer to the answer written by the author of riverpod here - https://stackoverflow.com/questions/74466072/riverpod-ref-watchstatenotifierprovider-vs-ref-watchstatenotifierprovider-not

yashas-hm commented 6 months ago

I created a new provider that stores the change state and updates whenever state of collectionProvider is changed.

animator commented 6 months ago

Modify changeMade -> hasUnsavedChanges everywhere.

animator commented 6 months ago

Thanks for the PR. LGTM 🚀