I am using flutter, and I am making an appBar to position itself based on slider. I came up with the below code, As you can see, the slider code is repetitive. Is there any way