Flutter menghapus nilai dari daftar
myList.removeWhere((item) => item.id == '001')
The Biton
myList.removeWhere((item) => item.id == '001')
void main() {
List l = [1, 2, 3,4,5,6,7,8,9];
print('The value of list before removing the list element ${l}');
bool res = l.remove(1);
print('The value of list after removing the list element ${l}');
}
List.remove(value) // deleting item with its content
//Remove a specific value from a list of class
var list = List.filled(1, ClassName(), growable: true);
list.removeWhere((data) => data.id == "7");