Skip to content

Allow Slider to be "slide only" like YouTube mobile progress bar #113370

@liumcse

Description

@liumcse

Use case

I would like to request a feature on the Slider widget where you can configure it to be "slide only", so that users can only change the value by tap-and-drag. If users just tap anywhere without dragging, it's no-op.

It's similar to the progress bar on YouTube app, you tap anywhere on the progress bar it won't change the video position - you have to slide. Here's a recording to YouTube's sliding behavior: https://drive.google.com/file/d/1kYEIxFB02E-avJCYsk5KWUPtANqzP_C_/view?usp=share_link

Proposal

/// Option 1: A boolean parameter
Slider(
  slideOnly: true
);

/// Option 2: An enum for interaction style
Slider(
  interactionStyle: SliderInteractionStyle.DRAG_ONLY;
);

enum SliderInteractionStyle {
  DEFAULT,
  DRAG_ONLY,
  // ...
}

Metadata

Metadata

Assignees

Labels

P3Issues that are less important to the Flutter projectc: new featureNothing broken; request for a new capabilityc: proposalA detailed proposal for a change to Flutterf: material designflutter/packages/flutter/material repository.frameworkflutter/packages/flutter repository. See also f: labels.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions