So, my question is, i want to save a json data localy so the user can see his saved projects.
Future saveData() async {
SharedPreferences kitSalvos = await SharedPreferences.getInstance();
kitSalvos.setString('id', id);
kitSalvos.setString('content', content);
}
The content is the json data.
This is what i am doing, but, when i try to create a list of it, it brings other sharedPreferences.
_getDataKits() async {
SharedPreferences kitSalvos = await SharedPreferences.getInstance();
print(kitSalvos.getKeys());
}
Output:
{isLogged, senha, email, 20210408, 20210408040319, token, id, content}
I want to bring only the saved projects (which is the ID and CONTENT) sharedpreferences...
There is a way to make it separeted? So i can only get the ID and CONTENT...
Also, make it one, like and object:
kitsalvos = [ id: ID, content: CONTENT ];
There will be more then 1 saved project, so i need to store all of it separeted...