of static method

Implementation

static PlatformThemeState? of(BuildContext context) {
  _PlatformThemeState? state =
      context.findAncestorStateOfType<_PlatformThemeState>();

  return state?.state;
}