TimelineThemeData constructor

TimelineThemeData({
  1. Axis? direction,
  2. Color? color,
  3. double? nodePosition,
  4. bool? nodeItemOverlap,
  5. double? indicatorPosition,
  6. IndicatorThemeData? indicatorTheme,
  7. ConnectorThemeData? connectorTheme,
})

Create a TimelineThemeData that's used to configure a TimelineTheme.

See also:

Implementation

factory TimelineThemeData({
  Axis? direction,
  Color? color,
  double? nodePosition,
  bool? nodeItemOverlap,
  double? indicatorPosition,
  IndicatorThemeData? indicatorTheme,
  ConnectorThemeData? connectorTheme,
}) {
  direction ??= Axis.vertical;
  color ??= Colors
      .blue; // TODO: Need to change the default color to the theme color?
  nodePosition ??= 0.5;
  nodeItemOverlap ??= false;
  indicatorPosition ??= 0.5;
  indicatorTheme ??= IndicatorThemeData();
  connectorTheme ??= ConnectorThemeData();
  return TimelineThemeData.raw(
    direction: direction,
    color: color,
    nodePosition: nodePosition,
    nodeItemOverlap: nodeItemOverlap,
    indicatorPosition: indicatorPosition,
    indicatorTheme: indicatorTheme,
    connectorTheme: connectorTheme,
  );
}