maybeStyleOf static method

HeroIconStyle? maybeStyleOf(
  1. BuildContext context
)

Attempts to get the style from an ancestor HeroIconTheme widget. If this is found, the style is returned - otherwise null is returned and a fallback may be determined.

Implementation

static HeroIconStyle? maybeStyleOf(BuildContext context) {
  return context.dependOnInheritedWidgetOfExactType<HeroIconTheme>()?.style;
}