Home / IOS Development / android – The custom painter does not change when the list view tile changes

android – The custom painter does not change when the list view tile changes



The problem itself is createState() is not called from CustomSlider when updating the values, you must send a unique key when creating the CustomSlider

child: new CustomSlider(
        key: UniqueKey(),
        leftValue: autoCoolingValue,
        rightValue: autoHeatingValue,
      )

A similar question is answered here.

NB: Also autoCoolingValue and autoHeatingValue values ​​should be updated within setState(), hope you know that exercise.


Source link