We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 5356da6 + be31886 commit b16be1fCopy full SHA for b16be1f
lib/src/interactive_chart.dart
@@ -212,9 +212,10 @@ class _InteractiveChartState extends State<InteractiveChart> {
212
}),
213
onTapCancel: () => setState(() => _tapPosition = null),
214
onTapUp: (_) {
215
- setState(() => _tapPosition = null);
216
- // Fire callback event (if needed)
+ // Fire callback event (if onTap() is available)
+ // call _fireOnTapEvent() before assigning null on _tapPosition
217
if (widget.onTap != null) _fireOnTapEvent();
218
+ setState(() => _tapPosition = null);
219
},
220
// Pan and zoom
221
onScaleStart: (details) => _onScaleStart(details.localFocalPoint),
0 commit comments