Skip to content

[Slider] Thumb's center doesn't align with division's center #62567

@hariom08

Description

@hariom08

I'm trying to create a custom slider like the one below :

photo6109691975172205113

For that, I created 2 custom classes from SliderComponentShape and SliderTickMarkShape for the Slider's Thumb and the Slider divisions. In both the class, I was just fiddling around the paint object and radius to create the custom shape for my division and my thumb, and there is nothing fancy.
But the problem is, except the center position in the slider, the thumb doesn't get aligned to any other division's center.
I've posted this problem in the StackOverflow here and explained this very clearly with all the needed codes.

The question is: Shouldn't the thumb's center get naturally aligned to the division's center in all its positions? Or am I missing something?

Metadata

Metadata

Assignees

Labels

f: material designflutter/packages/flutter/material repository.found in release: 3.0Found to occur in 3.0found in release: 3.1Found to occur in 3.1frameworkflutter/packages/flutter repository. See also f: labels.has reproducible stepsThe issue has been confirmed reproducible and is ready to work onr: fixedIssue is closed as already fixed in a newer versionteam-designOwned by Design Languages teamtriaged-designTriaged by Design Languages team

Type

No type

Projects

Status

Done (PR merged)

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions