Home > Software engineering >  I have a list of Map like this List<Map<String, Object>>? rows how do i get seperate key
I have a list of Map like this List<Map<String, Object>>? rows how do i get seperate key

Time:11-16

rows = [ { "name": "Ram", "email": "[email protected]", "age": 23, "DOB": "1990-12-01", "indian": false }, { "name": "Shyam", "email": "[email protected]", "age": 18, "DOB": "1995-07-01", "indian": true }, ] and pass to TableRow( key: TabelCell(value:value))

CodePudding user response:

you can do like this

rows.map((e) => TableRow(key : '${e.name}')).toList();
  • Related