Skip to content
This repository has been archived by the owner on Jan 9, 2023. It is now read-only.

Pie chart + widget rebuild when callback on click of a segment breaks if clicked repeatedly #425

Open
harrisbaitalrayan opened this issue Mar 13, 2020 · 2 comments

Comments

@harrisbaitalrayan
Copy link

Have a pie chart on which select callback is used using selectionModels. On the updatedListener , a method is called which redraws the widget. If the click is done repeatedly ( somewhat faster ) the pie breaks with following exception.

flutter: The following NoSuchMethodError was thrown while handling a gesture:
flutter: The method 'containsPoint' was called on null.
flutter: Receiver: null
flutter: Tried calling: containsPoint(Instance of 'Point')
flutter:
flutter: When the exception was thrown, this was the stack:
flutter: #0 Object.noSuchMethod (dart:core-patch/object_patch.dart:53:5)
flutter: #1 BaseChart.pointWithinRenderer. (package:charts_common/src/chart/common/base_chart.dart:211:14)
flutter: #2 SetMixin.any (dart:collection/set.dart:196:15)
flutter: #3 BaseChart.pointWithinRenderer (package:charts_common/src/chart/common/base_chart.dart:208:28)
flutter: #4 SelectNearest._onTapTest (package:charts_common/src/chart/common/behavior/selection/select_nearest.dart:156:19)
flutter: #5 ProxyGestureListener._populateActiveListeners. (package:charts_common/src/common/proxy_gesture_listener.dart:131:30)
flutter: #6 List.forEach (dart:core-patch/growable_array.dart:282:8)
flutter: #7 ProxyGestureListener._populateActiveListeners (package:charts_common/src/common/proxy_gesture_listener.dart:130:20)
flutter: #8 ProxyGestureListener.onTapTest (package:charts_common/src/common/proxy_gesture_listener.dart:37:12)

@harrisbaitalrayan
Copy link
Author

I think the issue is when repeatedly clicking, a click occurs when widget tree redraw is still in progress which breaks.

@harrisbaitalrayan
Copy link
Author

Hi, is there an update on this ?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant