Am trying to get data from an API but I keep getting the error above . Here is how my API response is structured
{"cards":{"TOTAL_PERFORMED":0,"TOTAL_TO_BE_PERFORMED":0,"START_DATE":1619042400,"END_DATE":1619042400}}
And here is how am trying to get the data
Future<Map<List,dynamic>>cards_daily_request()async{
var apiUrl = "https:/s/Dashboard/cards/daily/$rvcid";
var response= await http.get(Uri.encodeFull(apiUrl),headers: {"Authorization":"$token"});
List data;
var extractdata=await json.decode(response.body);
data=await extractdata["cards"];
print(data[0]);
}
Any idea what am doing wrong?