[Solved] How to retrieve json data elements in to list view.builder in flutter?


Hope this helps this code will help to access the data inside the contents from your JSON structure and map it to variables.

var jsonDecode = json.decode(jsonFile);
//Decode your json file 

//then map the content details to a variable.

var content = jsonDecode['content'];
// Since data inside your json eg above is a list.
// access the first element of the list and map to a var. 
var firstdata= content[0];
// then map the id and name to a variable.
String id=firstdata['id'];
String name = firstdata['name'];

use this inside the list tile inside a text widget

solved How to retrieve json data elements in to list view.builder in flutter?