getPreferredSize abstract method Null safety

Size getPreferredSize(
  1. {required SliderThemeData sliderTheme,
  2. required bool isEnabled}
)

Returns the preferred size of the shape.

It is used to help position the tick marks within the slider.

the sliderTheme argument is the theme assigned to the Slider that this shape belongs to.

The isEnabled argument is false when Slider.onChanged is null and true otherwise. When true, the slider will respond to input.

Implementation

Size getPreferredSize({
  required SliderThemeData sliderTheme,
  required bool isEnabled,
});