user13775947
user13775947

Reputation: 33

Flutter Slider (seekbar) - how to make it shorter in length?

I have a Row widget - within this, I want a slider (as a seek bar for audio) and on the left and right I want labels for the times, as well as a play button, and 2 more icon buttons for share etc. all this is making the row overflow. Is there some way to make the slider shorter in length?

Upvotes: 0

Views: 3406

Answers (2)

KuKu
KuKu

Reputation: 7492

Below code will be expand slide widget remain area.

Row(
   children: <Widget> [
      Expanded(child: Slider(value: 5, onChanged: null)),
      YourButtonWidget(),
      YourButtonWidget(),
      YourButtonWidget(),
   ]
)


Upvotes: 1

Nehal
Nehal

Reputation: 1489

Wrap the slider in a container and change the width/height of the container.

Container(
  width: 50,
  child: Slider(value: 5, onChanged: null),
),  

Upvotes: 0

Related Questions