Q: unable to update the list of items by text field in a flutter. I am not using APIs or local storage unable to update the list of items by text field in a flutter. I am not using APIs or local storage. Only want to dynamically update the data on Screen.

for adding items I used this function on button onpressed function
binLocation.add(BinLocation(binLocation: dropdownValues,quantity: quantity));

and for deleting the item, I am using this line of code during the delete button onpressed in the list
onPressed: ()
   {
    setState(() {                                             
      binLocation.remove(binLocation[index]);
   });
  },

Modal class
class BinLocation {

  final String binLocation;   final String quantity;

  BinLocation ({this.binLocation,this.quantity});

}


A: // change to plural binLocations 
pluralbinLocations[index] = udpateLocation; 

not work?
I'v tried it using flutter demo app, it worked
 final aa = [1];

  void _incrementCounter() {
    setState(() {.
      _counter++;
      aa[0]++;
    });
  }

