of method Null safety

SfSliderThemeData of(
  1. BuildContext context
)

The data from the closest SfSliderTheme instance that encloses the given context.

Defaults to SfThemeData.sliderThemeData if there is no SfSliderTheme in the given build context.

Implementation

static SfSliderThemeData of(BuildContext context) {
  final SfSliderTheme? sliderTheme =
      context.dependOnInheritedWidgetOfExactType<SfSliderTheme>();
  return sliderTheme?.data ?? SfTheme.of(context).sliderThemeData;
}