shape property

OutlinedBorder? shape
final

The OutlinedBorder of the scrollbar's thumb.

Only one of radius and shape may be specified. For a rounded rectangle, it's simplest to just specify radius. By default, the scrollbar thumb's shape is a simple rectangle.

If shape is specified, the thumb will take the shape of the passed OutlinedBorder and fill itself with thumbColor (or grey if it is unspecified).

This is an example of using a StadiumBorder for drawing the shape of the thumb in a RawScrollbar.
link

To create a local project with this code sample, run:
flutter create --sample=widgets.RawScrollbar.shape.1 mysample

Implementation

final OutlinedBorder? shape;