[
{
'id': 6,
'owner': {
'username': 'ghazali',
'email': '[email protected]',
'first_name': 'Abu',
'last_name': 'Ubaidah',
'groups': [],
},
'name': 'Food Hub',
'date_created': '2023-12-27T20:13:13.414637Z',
},
{
'id': 7,
'owner': {
'username': 'ghazali',
'email': '[email protected]',
'first_name': 'Abu',
'last_name': 'Ubaidah',
'groups': [],
},
'name': 'Hamas',
'date_created': '2023-12-27T20:04:56.852096Z',
},
];
how can i decode this list?
I want to use this here
children: [
for (final org in orgs)
const OrganizationCard(
id: org['id'],
tagLine: "We'll find the best for you.",
organizationName: org['name']),
],
i tried multiple kind of typecasting but in vain
3
Answers
You can create a model class out of it. You can use https://app.quicktype.io/