of static method

The data from the closest instance of this class that encloses the given context.

Defaults to the current TimelineThemeData.indicatorTheme.

Typical usage is as follows:

 IndicatorThemeData theme = IndicatorTheme.of(context);

Implementation

static IndicatorThemeData of(BuildContext context) {
  final indicatorTheme =
      context.dependOnInheritedWidgetOfExactType<IndicatorTheme>();
  return indicatorTheme?.data ?? TimelineTheme.of(context).indicatorTheme;
}