of static method

Implementation

static YaruSwitchThemeData of(BuildContext context) {
  final theme = context.dependOnInheritedWidgetOfExactType<YaruSwitchTheme>();
  return theme?.data ??
      Theme.of(context).extension<YaruSwitchThemeData>() ??
      const YaruSwitchThemeData();
}