Fix gauge card tap events

This commit is contained in:
Yegor Vialov 2020-04-29 17:48:15 +00:00
parent 29ee360ec4
commit ddb9a9d4e9

View File

@ -110,35 +110,38 @@ class GaugeCard extends StatelessWidget {
child: Stack( child: Stack(
alignment: Alignment.bottomCenter, alignment: Alignment.bottomCenter,
children: <Widget>[ children: <Widget>[
SfRadialGauge( IgnorePointer(
axes: <RadialAxis>[ ignoring: true,
RadialAxis( child: SfRadialGauge(
maximum: card.max.toDouble(), axes: <RadialAxis>[
minimum: card.min.toDouble(), RadialAxis(
showLabels: false, maximum: card.max.toDouble(),
useRangeColorForAxis: true, minimum: card.min.toDouble(),
showTicks: false, showLabels: false,
canScaleToFit: true, useRangeColorForAxis: true,
ranges: ranges, showTicks: false,
axisLineStyle: AxisLineStyle( canScaleToFit: true,
thickness: 0.3, ranges: ranges,
thicknessUnit: GaugeSizeUnit.factor, axisLineStyle: AxisLineStyle(
color: Colors.transparent thickness: 0.3,
), thicknessUnit: GaugeSizeUnit.factor,
startAngle: 180, color: Colors.transparent
endAngle: 0, ),
pointers: <GaugePointer>[ startAngle: 180,
RangePointer( endAngle: 0,
value: fixedValue, pointers: <GaugePointer>[
sizeUnit: GaugeSizeUnit.factor, RangePointer(
width: 0.3, value: fixedValue,
color: currentColor, sizeUnit: GaugeSizeUnit.factor,
enableAnimation: true, width: 0.3,
animationType: AnimationType.bounceOut, color: currentColor,
) enableAnimation: true,
] animationType: AnimationType.bounceOut,
) )
], ]
)
],
)
), ),
Column( Column(
mainAxisSize: MainAxisSize.max, mainAxisSize: MainAxisSize.max,