11import 'package:flutter/foundation.dart' ;
22import 'package:flutter/material.dart' ;
3+ import 'package:flutter_timeline/indicator_position.dart' ;
34
4- @immutable
5+ /// [TimelineThemeData] is passed through [TimelineTheme] , works like general flutter theme object.
56class TimelineThemeData with Diagnosticable {
67 TimelineThemeData ({
78 this .gutterSpacing = 12.0 ,
@@ -11,6 +12,7 @@ class TimelineThemeData with Diagnosticable {
1112 this .strokeCap = StrokeCap .butt,
1213 this .lineColor = Colors .lightBlueAccent,
1314 this .style = PaintingStyle .stroke,
15+ this .indicatorPosition = IndicatorPosition .center,
1416 }) : assert (itemGap >= 0 ),
1517 assert (lineGap >= 0 );
1618
@@ -22,6 +24,9 @@ class TimelineThemeData with Diagnosticable {
2224 final double itemGap;
2325 final double gutterSpacing;
2426
27+ /// the position of the indicator. this affects the placing of the indicator, and following line measurement
28+ final IndicatorPosition indicatorPosition;
29+
2530 /// Whether all the properties of this object are non-null.
2631 bool get isConcrete => lineColor != null ; // &&
2732
@@ -35,11 +40,8 @@ class TimelineThemeData with Diagnosticable {
3540 strokeWidth = 4.0 ,
3641 style = PaintingStyle .stroke,
3742 itemGap = 24.0 ,
38- gutterSpacing = 12.0 ;
39-
40- // : color = const Color(0xFF000000),
41- // _opacity = 1.0,
42- // size = 24.0;
43+ gutterSpacing = 12.0 ,
44+ indicatorPosition = IndicatorPosition .center;
4345
4446 TimelineThemeData copyWith (
4547 {Color lineColor, StrokeCap strokeCap, double strokeWidth}) {
0 commit comments