How do you change the value of a List[index].fieldname flutter?
7,840
class Person {
String firstName;
String lastName;
}
//assuming contacts is a List<Person>
contacts[index].firstName = 'Tony';

Author by
Admin
Updated on December 06, 2022Comments
-
Admin 15 minutes
How do you change the value of a List[index].fieldname flutter?
-
Sukhchain Singh about 3 yearsWe also need to use
setState
in order to change the data.