Skip to content
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

Favorites #27

Open
FadiChaalab opened this issue Feb 6, 2020 · 4 comments
Open

Favorites #27

FadiChaalab opened this issue Feb 6, 2020 · 4 comments

Comments

@FadiChaalab
Copy link

Hi am new in flutter.I try it your way to save favorite songs but am not able to find saved songs after restarting the app, i need help

@KarimElghamry
Copy link
Owner

KarimElghamry commented Feb 6, 2020

Hello Fadi, thank you for checking out Chillify!

I am using the shared_preferences package to save data onto the device. Basically, there are three major steps to perform:

  • Convert the list of favorites to a list of strings

  • Save the list using shared preferences

  • Load the List on startup and change it back to song objects, then push it to the favorites stream

If you need further assistance, do not hesitate to comment and I will help you further.

@FadiChaalab
Copy link
Author

Yeah i know that shared preferences is the way to save data but it seems that am having problem with retrieving it after restarting the app it will show as an empty screen

@ashishkhuraishy
Copy link

@KarimElghamry i think it would be better to use local storage instead of shared_preferences, they are commonly used to store a single variable as user name and such.

@huzaifansari54
Copy link

hello sir can i work on this issue i want to contribute on this project kindly help me out

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

No branches or pull requests

4 participants