'How to add item to Dart Flutter Secure Storage stringList?
My goal is to save a list with Secure Storage and add new items to this list. There will be a list. There will be items in it. I want to add an item to that list later. In the methods I tried, it did delete the entire list. I couldn't add an item to the already existing list.
How can I do it?
I am currently stuck here:
Future<void> listUpload() async {
final prefences = await SharedPreferences.getInstance();
prefences.setStringList("values", ["Value 1"]);
var printList = prefences.getStringList("testler");
debugPrint(printList.toString());
setState() {
}
}
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
