From 5d3bb883b4d850590ce2cf2ef17ce601f99e7f39 Mon Sep 17 00:00:00 2001 From: Julien <120588494+julien4215@users.noreply.github.com> Date: Sat, 11 May 2024 22:54:05 +0200 Subject: [PATCH] allow the user to drag the line on acpl chart --- lib/src/view/analysis/analysis_screen.dart | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/src/view/analysis/analysis_screen.dart b/lib/src/view/analysis/analysis_screen.dart index fc690fbeb0..6579e02641 100644 --- a/lib/src/view/analysis/analysis_screen.dart +++ b/lib/src/view/analysis/analysis_screen.dart @@ -1279,8 +1279,10 @@ class AcplChart extends ConsumerWidget { enabled: false, touchCallback: (FlTouchEvent event, LineTouchResponse? touchResponse) { - if (event is FlTapUpEvent) { - final touchX = event.localPosition.dx; + if (event is FlTapDownEvent || + event is FlPanUpdateEvent || + event is FlLongPressMoveUpdate) { + final touchX = event.localPosition!.dx; final chartWidth = context.size!.width - 32; // Insets on both sides of the chart of 16 final minX = spots.first.x;