of static method

The closest instance of this class's data value that encloses the given context.

If there is no ancestor, it returns TimelineThemeData.connectorTheme. Applications can assume that the returned value will not be null.

Typical usage is as follows:

ConnectorThemeData theme = ConnectorTheme.of(context);

Implementation

static ConnectorThemeData of(BuildContext context) {
  final connectorTheme =
      context.dependOnInheritedWidgetOfExactType<ConnectorTheme>();
  return connectorTheme?.data ?? TimelineTheme.of(context).connectorTheme;
}