- override
Releases any resources used by the object.
This method is called by the owner of this gesture recognizer
when the object is no longer needed (e.g. when a gesture
recognizer is being unregistered from a GestureDetector
, the
GestureDetector widget calls this method).
Source
@override void dispose() { List<_TapGesture> localGestures = new List<_TapGesture>.from(_gestureMap.values); for (_TapGesture gesture in localGestures) gesture.cancel(); // Rejection of each gesture should cause it to be removed from our map assert(_gestureMap.isEmpty); super.dispose(); }