edvin
08/19/2018, 7:31 AMPerson
as a data class, with two immutable members in the constructor. The generated toString
function of a data class includes these two, but ignores the observable properties you added to the body of the class. So the observable properties updated as they should, but of course the immutable members can't be changed, so the toString stays the same. By removing the data
keyword and also the val
keyword in front of each constructor parameter, the app behaves as you expected 🙂