Is there any library available to save object and restore it.
In android java we using Gson to do this but in flutter there is no Gson
A library like GSON won't be possible in Flutter, since Flutter doesn't support code reflection. Reflection interferes with tree shaking which flutter needs to clean out unused code and give a compact app.
more on the topic and alternatives here
You can use this site to convert your JSONs to class and it prepares the toJson fromJson methods automatically.
I am using this website and it saves my time
no need to think just past the JSON code here then it will generate the prefect dart class code
https://app.quicktype.io/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With