I am iterating over list and adding the _controller and then I am trying to access the controller inside using indexing : _controllers[index][titleValue]
And, it is working, the first controller is getting assign to to for the first element but, then for the rest other element it is not working....
can anyone pls suggestion where I might be going wrong? or
what could be better solution to implement TextEditingController for each element inside the ListView.builder()?
List<Map<String, TextEditingController>> _controllers = [];
void extractItem(List<dynamic> itemDict) {
for (final item in widget.itemDict) {
_controllers.add({
item['Item_name'] as String: TextEditingController(),
});
}
}```