of static method

Implementation

static DesignSystemTheme of(BuildContext context) {
  final scope = context
      .dependOnInheritedWidgetOfExactType<DesignSystemThemeScope>();
  assert(
    scope != null,
    'DesignSystemTheme.of() called with no scope in context.',
  );
  return scope!.theme;
}