The method 'push' isn't defined for the type 'Object'. I'm getting this error if I try to add a another procedure in the values array.
void main() {
var myset = {
"procedureResult": {
"procedureSections": [
{
"section": "BasicInformation",
"values": [
{
"procedure": "Angio"
}
]
}
]
}
};
myset['procedureResult']!['procedureSections']![0]['values']!.push({'procedure2':'MRI'})
print(myset['procedureResult']!['procedureSections']![0]['values']!.push({'procedure2':'MRI'}));
}