removeDispatcher static method
void
removeDispatcher(})
override
Decrements the reference counts for component's event types and
disables the corresponding recognizer flags when the count reaches zero.
Implementation
static void removeDispatcher(
Component component, {
required bool hasDrag,
required bool hasScale,
}) {
final game = component.findRootGame();
if (game == null) {
return;
}
final dispatcher =
game.findByKey(const MultiDragScaleDispatcherKey())
as MultiDragScaleDispatcher?;
if (dispatcher == null) {
return;
}
if (hasDrag) {
dispatcher._disableDrag();
}
if (hasScale) {
dispatcher._disableScale();
}
}