of static method

Returns the configuration data from the closest YaruToggleButtonTheme ancestor. If there is no ancestor, it returns null.

Implementation

static YaruToggleButtonThemeData? of(BuildContext context) {
  final t =
      context.dependOnInheritedWidgetOfExactType<YaruToggleButtonTheme>();
  return t?.data ?? Theme.of(context).extension<YaruToggleButtonThemeData>();
}