You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I need to post an object array ([{}, {}]) to my node.js server, something similar to this:
finalList<Map<String, dynamic>> a = [
{'a':'b'}
];
final response =awaitRequests.post(
API_URL,
json: a,
headers:HEADERS
);
However, the json parameter of the post method asks for Map<String, dynamic>, returning the following error: The argument type 'List<Map<String, dynamic>>' can't be assigned to the parameter type 'Map<String, dynamic>'.
Any thoughts on this?
Thank you!
The text was updated successfully, but these errors were encountered:
I need to post an object array (
[{}, {}]
) to my node.js server, something similar to this:However, the
json
parameter of thepost
method asks forMap<String, dynamic>
, returning the following error:The argument type 'List<Map<String, dynamic>>' can't be assigned to the parameter type 'Map<String, dynamic>'.
Any thoughts on this?
Thank you!
The text was updated successfully, but these errors were encountered: