Help me to add to list
my code:
List<Map> = [{'a':1}];
I tried List.add(); but it didnt worked for me
CodePudding user response:
First give a name to list
you can use the below code:
final List<Map> mylist = [{'a':1}];
mylist.add({'b':2});
print(mylist);
try this