of static method

PIThemeData of(
  1. BuildContext context
)

Implementation

static PIThemeData of(BuildContext context) {
  final _InheritedTheme? inheritedTheme =
      context.dependOnInheritedWidgetOfExactType<_InheritedTheme>();
  final MaterialLocalizations? localizations =
      Localizations.of<MaterialLocalizations>(context, MaterialLocalizations);
  final ScriptCategory category =
      localizations?.scriptCategory ?? ScriptCategory.englishLike;
  final PIThemeData theme = inheritedTheme?.theme.data ?? _kFallbackTheme;
  return theme;
  // return PIThemeData.localize(
  //     theme, theme.typography.geometryThemeFor(category));
}