of static method

The data from the closest SfGaugeTheme instance that encloses the given context.

Defaults to SfGaugeTheme.gaugeThemeData if there is no SfGaugeTheme in the given build context.

Implementation

static SfGaugeThemeData? of(BuildContext context) {
  final SfGaugeTheme? sfGaugeTheme =
      context.dependOnInheritedWidgetOfExactType<SfGaugeTheme>();
  return sfGaugeTheme?.data ?? SfTheme.of(context).gaugeThemeData;
}