-
-
Notifications
You must be signed in to change notification settings - Fork 39
Open
Description
Hi,
I'm getting data from API like I wrote down.
Future<String> getDataTableProvider(context) async {
final response = await http.post(Uri.parse('https://**/DENEME.php'), body: {'tablename': 'TABLENAME'});
rows = json.decode(response.body);
print(rows);
print("Data download successfully");
return Future.value("Data download successfully");
}
But Editable rows don't accept that row variable, turns rows as null. When I copy print of rows (print(rows);) and use it to define rows like;
rows = [
{
"name": 'James LongName Joe',
"date": '23/09/2020',
"month": 'June',
"status": 'completed'
},
{
"name": 'Daniel Paul',
"month": 'March',
"status": 'new',
"date": '12/4/2020',
},
{
"month": 'May',
"name": 'Mark Zuckerberg',
"date": '09/4/1993',
"status": 'expert'
},
{
"name": 'Jack',
"status": 'legend',
"date": '01/7/1820',
"month": 'December',
},
];
It works. I can get the same data with the same format when I use "json.decode(response.body)" but it doesn't work.
Why it could be?
(rows variable defined as List. And response has a right shape which package example requires.)
Metadata
Metadata
Assignees
Labels
No labels