of static method

RadioThemeData of(
  1. BuildContext context
)

Returns the configuration data from the closest RadioTheme ancestor. If there is no ancestor, it returns ThemeData.radioTheme.

Typical usage is as follows:

RadioThemeData theme = RadioTheme.of(context);

Implementation

static RadioThemeData of(BuildContext context) {
  final RadioTheme? radioTheme = context.dependOnInheritedWidgetOfExactType<RadioTheme>();
  return radioTheme?.data ?? Theme.of(context).radioTheme;
}