of static method

ThemeData of(
  1. BuildContext context
)

Implementation

static ThemeData of(BuildContext context) {
  final _InheritedTheme? inheritedTheme =
      context.dependOnInheritedWidgetOfExactType<_InheritedTheme>();

  return inheritedTheme?.theme.data ?? ThemeData.dark();
}