of static method

ThemeState of(
  1. BuildContext context
)

Implementation

static ThemeState of(BuildContext context) {
  final provider = context.dependOnInheritedWidgetOfExactType<BaseThemeProvider>();
  assert(provider != null, '在 BaseThemeProvider 的上下文中找不到 BaseThemeProvider');
  return provider!.notifier!;
}