From ddb9a9d4e90b4f32b9819a6da44267533c357db0 Mon Sep 17 00:00:00 2001 From: Yegor Vialov Date: Wed, 29 Apr 2020 17:48:15 +0000 Subject: [PATCH] Fix gauge card tap events --- lib/cards/gauge_card.dart | 61 ++++++++++++++++++++------------------- 1 file changed, 32 insertions(+), 29 deletions(-) diff --git a/lib/cards/gauge_card.dart b/lib/cards/gauge_card.dart index 31e9c7a..a50343e 100644 --- a/lib/cards/gauge_card.dart +++ b/lib/cards/gauge_card.dart @@ -110,35 +110,38 @@ class GaugeCard extends StatelessWidget { child: Stack( alignment: Alignment.bottomCenter, children: [ - SfRadialGauge( - axes: [ - RadialAxis( - maximum: card.max.toDouble(), - minimum: card.min.toDouble(), - showLabels: false, - useRangeColorForAxis: true, - showTicks: false, - canScaleToFit: true, - ranges: ranges, - axisLineStyle: AxisLineStyle( - thickness: 0.3, - thicknessUnit: GaugeSizeUnit.factor, - color: Colors.transparent - ), - startAngle: 180, - endAngle: 0, - pointers: [ - RangePointer( - value: fixedValue, - sizeUnit: GaugeSizeUnit.factor, - width: 0.3, - color: currentColor, - enableAnimation: true, - animationType: AnimationType.bounceOut, - ) - ] - ) - ], + IgnorePointer( + ignoring: true, + child: SfRadialGauge( + axes: [ + RadialAxis( + maximum: card.max.toDouble(), + minimum: card.min.toDouble(), + showLabels: false, + useRangeColorForAxis: true, + showTicks: false, + canScaleToFit: true, + ranges: ranges, + axisLineStyle: AxisLineStyle( + thickness: 0.3, + thicknessUnit: GaugeSizeUnit.factor, + color: Colors.transparent + ), + startAngle: 180, + endAngle: 0, + pointers: [ + RangePointer( + value: fixedValue, + sizeUnit: GaugeSizeUnit.factor, + width: 0.3, + color: currentColor, + enableAnimation: true, + animationType: AnimationType.bounceOut, + ) + ] + ) + ], + ) ), Column( mainAxisSize: MainAxisSize.max,