I have a question on how to easily use map as a parameter in Dart. Is there any easy way of passing all the key-values pairs of a map object to a function?
For example, I have a map and a function like this:
const testMap = {"a": 1, "b":2};
int testFunc(a, b){
return a + b;
}
and I want to use them like this:
testFunct(**testMap) // not possible in dart (though possible in python)
which should give us 3 as the result.
Any smart solution like this? Thanks!
Please note that ** is the python-way of passing the parameters inside dictionary: docs