of static method

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

Defaults to SfThemeData.dateRangePickerTheme if there is no SfDateRangePickerTheme in the given build context.

Implementation

static SfDateRangePickerThemeData of(BuildContext context) {
  final SfDateRangePickerTheme? sfDateRangePickerTheme =
      context.dependOnInheritedWidgetOfExactType<SfDateRangePickerTheme>();
  return sfDateRangePickerTheme?.data ??
      SfTheme.of(context).dateRangePickerThemeData;
}