I'm trying to save and load a List using the shared preferences package in flutter.
As shared preferences doesn't support saving Lists other than List<String> with setStringList() (and in my case, a List<String> won't work for what I need), I instead opted to convert my list to a string with .toString(), and saved it with setString().
This works just fine for saving it, but now I can't load the list for later.
I saw others recommend loading the String as JSON, but seemingly .toString() doesn't give me valid JSON, so that's not possible.
I also tried just casting the String to a list... unsurprisingly, that didn't work either.
I can't seem to find any way to convert a List to JSON so I can just save and load it that way, and I can't seemingly find any way to load a .toString()'d list as... well, a list.
I'm not sure what to do now, as I can't seem to find a way to load this List..
Any help would be greatly appreciated!