Converting object to an encodable object failed
You don’t need to add any libraries. You just have to implement fromJson and toJson functions in your object. Example: class LinkItem { final String name; final String url; LinkItem({this.name, this.url}); LinkItem.fromJson(Map<String, dynamic> json) : name = json[‘n’], url = json[‘u’]; Map<String, dynamic> toJson() { return { ‘n’: name, ‘u’: url, }; } } Then … Read more