flutter - How do I save data after closing the Flutter app?
问题描述
I try to create an App, where you can simply add a new TODO. My problem is that after a added a new TODO, and than close my App, my TODO-List is empty. What is the best way to save data in the App? Are there any simple solutions for that?
解决方案
As a basic implementation, I would say you should use shared preference it uses key values to store data, and it's pretty easy to use the data will remain until you clear your cache to uninstall it.
推荐阅读
- python - 如何在 Django 中添加默认不支持的语言?
- python - 如何检查是否在 tkinter 上单击了按钮
- c# - 将 String 转换为 String[] 但在撇号中不使用逗号
- r - ddply 和 group_by 的更快替代方案
- r - 带有 data.table 的每个自变量的线性回归循环
- css - 带有省略号的 CSS3 flexbox 布局在移动 Safari 上不起作用
- sql-server - SQL Server 2012 合并复制 - 全文索引
- mysql - django扩展查询条件`COLLATION`
- python - 如何在标注器之前/之后强制在 spacy 中使用 pos 标签?
- c# - 如何从 Microsoft Graph API C# 中的电子邮件地址获取用户 ID