of static method

ThemeData of(
  1. BuildContext context
)

Implementation

static ThemeData of(BuildContext context) {
  final widget = context.dependOnInheritedWidgetOfExactType<Theme>();
  if (widget != null) {
    return widget.data;
  }
  return ThemeData.dark;
}