Future<String> getData() async {
http.Response response = await http.post(
Uri.encodeFull("https:.........."),
headers: {
"Accept" : "application/json"
}
,body: {
"email" : "test123@gmail.com",
"password" : "password123"
}
);
List data = JSON.decode(response.body);
print(data[0]["access_token"]);
}
ERROR: '_InternalLinkedHashMap<String, dynamic>' is not a subtype of type 'List<dynamic>