of static method

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

Defaults to SfTreemapTheme.treemapThemeData if there is no SfTreemapTheme in the given build context.

Implementation

static SfTreemapThemeData of(BuildContext context) {
  final SfTreemapTheme? sfTreemapTheme =
      context.dependOnInheritedWidgetOfExactType<SfTreemapTheme>();
  return sfTreemapTheme?.data ?? SfTheme.of(context).treemapThemeData;
}