of static method

Resolves the effective FeedbackOSTheme from the BuildContext.

Checks for an enclosing FeedbackOSThemeProvider first, then falls back to the global runtime theme FeedbackOSTheme.current.

Implementation

static FeedbackOSTheme of(BuildContext context) {
  final provider =
      context.dependOnInheritedWidgetOfExactType<FeedbackOSThemeProvider>();
  if (provider != null) {
    return provider.theme;
  }
  return current;
}