maybeOf static method

ThemeProviderState? maybeOf(
  1. BuildContext context
)

Get the ThemeProviderState from the widget tree (without listening)

Implementation

static ThemeProviderState? maybeOf(BuildContext context) {
  final inherited =
      context.dependOnInheritedWidgetOfExactType<_ThemeProviderInherited>();
  return inherited?.state;
}