of method Null safety

SfDataPagerThemeData? of(
  1. BuildContext context
)

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

Defaults to SfThemeData.dataPagerThemeData if there is no SfDataPagerTheme in the given build context.

Implementation

static SfDataPagerThemeData? of(BuildContext context) {
  final SfDataPagerTheme? sfDataPagerTheme =
      context.dependOnInheritedWidgetOfExactType<SfDataPagerTheme>();
  return sfDataPagerTheme?.data ?? SfTheme.of(context).dataPagerThemeData;
}