of static method

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

Defaults to SfThemeData.pdfViewerThemeData if there is no SfPdfViewerTheme in the given build context.

Implementation

static SfPdfViewerThemeData? of(BuildContext context) {
  final SfPdfViewerTheme? pdfViewerTheme =
      context.dependOnInheritedWidgetOfExactType<SfPdfViewerTheme>();
  return pdfViewerTheme?.data ?? SfTheme.of(context).pdfViewerThemeData;
}