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
If I use the mapList as a parameter, then in the script:
fun exec(mapList){
var m : Map<String> = {'key': 'value'}
mapList.add(m)
}
The add will throw an exception because the actual dart type of m is LinkedMap<dynamic, dynamic>, which cannot be inserted into a List<Map<String, dynamic>>.
I think the Map<String, any> is just like dart type Map<String, dynamic> . Can you make this possible?
The text was updated successfully, but these errors were encountered:
rockingdice
changed the title
Cannot insert a script-generated map into one from dart
Cannot insert a script-generated map into a dart generated list
Feb 26, 2021
Consider I have a dart list containing dart maps:
If I use the mapList as a parameter, then in the script:
The
add
will throw an exception because the actual dart type ofm
is LinkedMap<dynamic, dynamic>, which cannot be inserted into a List<Map<String, dynamic>>.I think the Map<String, any> is just like dart type Map<String, dynamic> . Can you make this possible?
The text was updated successfully, but these errors were encountered: