londonappbrewery / todoey-flutter

Completed version of the Todoey project in the Complete Flutter Bootcamp
https://www.appbrewery.co
75 stars 123 forks source link

Why is the list vanishing after re opening the app on android devices? #6

Open faizanmohiuddin482 opened 4 years ago

YahalomsGuy commented 4 years ago

This application is used during a course, It is basically meant to teach about state management , not to be for production, Therefore, the data you type in to the application is not saved anywhere , not to a database , not to an XML, nowhere!

That's why it does not exist the next time you run the app. Guy

Raj-kar commented 4 years ago

Use Sqlite to Save your Data

lustorbraun commented 4 years ago

Use Sqlite to Save your Data

@FlutterRaj with Sqlite can we save data even when user is not connected to internet? .....if Internet is not required, can you tell me sources where to learn connecting it to sql

Raj-kar commented 4 years ago

Use Sqlite to Save your Data

@FlutterRaj with Sqlite can we save data even when user is not connected to internet? .....if Internet is not required, can you tell me sources where to learn connecting it to sql

Yes you can use sqlite completely without internet because it's basically use your phone data storage. There are many databases for store data offline but sqlite is supported by both android and iOS.

Now you can learn basic from the official documentation of sqlite , also there are many videos on YouTube- you must definitely check those videos .. After that, Now if you want to completely master sqlite,then you can take any sqlite course from udemy or any other online platform..!

VarunArora14 commented 4 years ago

Which would be the easiest and best way to store the tasks as we need to only store two values - name and ischecked of each task and the number of tasks user enters would not be very large.

Raj-kar commented 4 years ago

You can use sqlite database.. It's easy and very straightforward in flutter. But if user reset phone or uninstall the application, your data may lost !

But in case if you want to save your data on cloud, for backup and restore. Mean user can acess data with another phone or data will be restored if user reset his/her phone. You can use firebase there, it's also simple and pretty straightforward.

Depending on you needs, you can choose any one !

VarunArora14 commented 4 years ago

ok. Thanks

Hrushikar commented 4 years ago

Use Sqlite to Save your Data

@FlutterRaj with Sqlite can we save data even when user is not connected to internet? .....if Internet is not required, can you tell me sources where to learn connecting it to sql

Yes you can use sqlite completely without internet because it's basically use your phone data storage. There are many databases for store data offline but sqlite is supported by both android and iOS.

Now you can learn basic from the official documentation of sqlite , also there are many videos on YouTube- you must definitely check those videos .. After that, Now if you want to completely master sqlite,then you can take any sqlite course from udemy or any other online platform..!

Thanks for the solution. Can you also suggest some good videos from Youtube? Because, there are many videos and I am not able to decide which one is better.

Also, can you suggest any way to use xml to store data instead of a database?

Melanee-Melanee commented 3 years ago

You must use a new package to save your data offline, In this regard, I did use 'Shared_preferences' package. for more detail contact me.

Abhishek-dab commented 3 years ago

Hey, I integrated firebase in this app which stores the name of the task as well as whether the task is done or not based on the user's uid in cloud firestore. This helps the user to login into the app and store the data even if he deletes the app. Here is the Github repo link --> [https://github.com/Abhishek-dab/Todo-List]().