Have a look at my code here it's in dart programing language I have a map object which I'm trying to assign inside another map object('question')
. Coming from a Python background this usually works since I'm new to dart I need help.
Map ageData = {
"Below 18": 'hello kid',
"Above 18": 'hello Young adult',
'Between 28-58': 'hello adult',
"Greater Than 58": "hello senior citizen"
};
var question = [{"questionText":"Age Group", "opt":[ageData]}];
// I get error here stating "The instance member 'ageData' can't be
// accessed in an initializer. Try replacing the reference to the
// instance member with a different expression"