of static method

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

Defaults to SfThemeData.rangeSelectorThemeData if there is no SfRangeSelectorTheme in the given build context.

Implementation

static SfRangeSelectorThemeData? of(BuildContext context) {
  final SfRangeSelectorTheme? rangeSelectorTheme =
      context.dependOnInheritedWidgetOfExactType<SfRangeSelectorTheme>();
  return rangeSelectorTheme?.data ??
      SfTheme.of(context).rangeSelectorThemeData;
}