You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
So rummaging through some older issues, I found that the expected way to handle an structure like:
User
---List<Favorites>
Is to do something like this:
Map<String, dynamic> jsonObject = json.decode(json.encode(user)); //json is from dart:convert
Instead of the normal user.toJson which works with objects without other nested objects inside of them. This isn't a huge deal, but it just makes the code look a little weird. If there's a better way to do this please let me know. Thanks!