of static method

ThemeBloc of(
  1. BuildContext context
)

Implementation

static ThemeBloc of(BuildContext context) {
  final provider =
      context.dependOnInheritedWidgetOfExactType<ThemeProvider>();
  assert(provider != null, 'No ThemeProvider found in context');
  return provider!.bloc;
}