From 0bb4badee1849c939001fa447f40c8a8c4b3d1a0 Mon Sep 17 00:00:00 2001 From: softmarshmallow Date: Wed, 2 Sep 2020 13:42:09 +0900 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=A8=20fixes=20#6=20&=200.0.4+8=20relea?= =?UTF-8?q?se?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- example/lib/screen/plain_timeline_demo.dart | 2 +- lib/timeline.dart | 3 ++- pubspec.yaml | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/example/lib/screen/plain_timeline_demo.dart b/example/lib/screen/plain_timeline_demo.dart index 09722e6..c6466bb 100644 --- a/example/lib/screen/plain_timeline_demo.dart +++ b/example/lib/screen/plain_timeline_demo.dart @@ -91,7 +91,7 @@ class _PlainTimelineDemoScreenState extends State { Widget _buildTimeline() { return TimelineTheme( - data: TimelineThemeData(lineColor: Colors.blueAccent), + data: TimelineThemeData(lineColor: Colors.blueAccent, itemGap: 180), child: Timeline( indicatorPosition: IndicatorPosition.top, altOffset: Offset(0, -24), diff --git a/lib/timeline.dart b/lib/timeline.dart index ceeb06f..fa562e4 100644 --- a/lib/timeline.dart +++ b/lib/timeline.dart @@ -210,8 +210,9 @@ class _LineIndicatorPainter extends CustomPainter { final indicatorRadius = indicatorSize / 2; final maxIndicatorRadius = maxIndicatorSize / 2; final indicatorMargin = indicatorRadius + lineGap; - final safeItemGap = (indicatorSize / 2) + lineGap; + final safeItemGap = (indicatorRadius) + itemGap; double topStartY = 0.0; + // region calculate starting point /* switch (indicatorPosition) { diff --git a/pubspec.yaml b/pubspec.yaml index a74ce44..eda2aaa 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: flutter_timeline description: a fully customizable & general timeline widget, based on real-world application references -version: 0.0.4+7 +version: 0.0.4+8 homepage: https://github.com/softmarshmallow/flutter-timeline repository: https://github.com/softmarshmallow/flutter-timeline