Here the simple list functions with sample output
Consider the sample list
List sampleList = ["001", "002", "003"];
Here some add to list functions with output
//Add to list
sampleList.add("004");
//Output: 001 002 003 004
//Add to specific index
sampleList.insert(0, "005");
//Output: 005 001 002 003
Here the list remove functions with examples consider the same sample list
sampleList.removeWhere((item) => item.id == '003');
//Output: 001 002
//Remove item from secific index
sampleList.removeAt(2);
//Output: 001 003
//Remove item from last
sampleList.removeLast();
//Output: 001 002
//Remove items between range
sampleList.removeRange(1, 2);
//Output: 002 003