Vladan Randjelovic
Vladan Randjelovic

Reputation: 31

Flutter range slider with single label

I'm trying to make a custom range slider like the one on this image:

https://prnt.sc/t4etpj

Any help is appreciated.

Upvotes: 0

Views: 494

Answers (1)

Alberto Miola
Alberto Miola

Reputation: 4751

What you're looking for is a widget called RangeSlider from the material library.

RangeSlider(
  values: const RangeValues(1.5, 4.5);,
  onChanged: (RangeValues values) {
    // callback
  },
);

If you want to exactly reproduce what you've shown in the picture, you must create one by your own (preferably with a state management library rather than using plain setState, but that's not required).

Upvotes: 2

Related Questions