styleOf static method

HeroIconStyle styleOf(
  1. BuildContext context
)

Assumes that there is an ancestor HeroIconTheme theme and gets the style property from it. If there is, in fact, no ancestor, an exception is thrown.

Implementation

static HeroIconStyle styleOf(BuildContext context) {
  final HeroIconStyle? result = maybeStyleOf(context);
  assert(result != null, 'There is no HeroIconStyle in context.');
  return result!;
}