of static method

SThemeData of(
  1. BuildContext context
)

Returns the SThemeData from the closest STheme ancestor.

If there is no ancestor, this will throw an error. Use maybeOf if the theme might not exist.

Implementation

static SThemeData
    of(BuildContext context) {
  return context
      .dependOnInheritedWidgetOfExactType<_STheme>()!
      .data;
}