of static method

MiniTheme of(
  1. BuildContext context
)

Read current MiniTheme from the BuildContext.

Implementation

static MiniTheme of(BuildContext context) {
  final MiniThemeProvider? provider =
      context.dependOnInheritedWidgetOfExactType<MiniThemeProvider>();
  assert(provider != null, 'MiniThemeProvider not found in context');
  return provider!.theme;
}