Clueless-Community / Spectrum-UI

Spectrum UI is a user-friendly Flutter UI library that offers a variety of beautifully designed widgets and components that are easy to use and can be integrated into your Flutter projects seamlessly.
MIT License
70 stars 99 forks source link

Add to Favorite feature completed #241

Closed Uttkarsh-raj closed 1 year ago

Uttkarsh-raj commented 1 year ago

Pull Request Template

Description:

The add to favorites feature is now fully completed with the recently added widgets and code refactoring of previously written code. The state of the star icon too is not lost so it is clear whether the widget has already been starred or not.

Changes Made:

A new function to the provider which checks if the widgets index is already present or not . If the widget is present it changes the star icon to yellow. This way the state of icon is preserved even after closing and reopening the app. Prior to this the state was lost.

Related Issue:

This pull request is regarding the issue that was raised and i have fixed #174 .

Screenshots/GIFs:

The state of the widgets icon was not been stored and lost.

Screenshot 2023-06-07 151546

The function helps restore the state and also make changes in realtime.

Screenshot 2023-06-07 141929 Screenshot 2023-06-07 150713

Testing Done:

The testing is really easy try adding and removing different widgets from different categories to see the widgets getting added and removed in and from the favorites page .

Additional Notes:

The new widgets which were recently added were also added to this project in this pull request.

Checklist:

Please review and merge this PR at your earliest convenience.

Thank you!

Uttkarsh-raj commented 1 year ago

@Debajyoti14 Please review this pr . I have added the new widgets and refactored the code. Also the star icon state and the widgets are now being saved even after restarting the app after the local storage integration.

Uttkarsh-raj commented 1 year ago

@Debajyoti14 this was a level 3 issue but the merged tag is of level 2 can you check this ?