onLongPressMoveUpdate method

  1. @mustCallSuper
void onLongPressMoveUpdate(
  1. LongPressMoveUpdateEvent event
)

Implementation

@mustCallSuper
void onLongPressMoveUpdate(LongPressMoveUpdateEvent event) {
  final delivered = <TaggedComponent<LongPressCallbacks>>{};
  event.deliverAtPoint(
    rootComponent: game,
    deliverToAll: true,
    eventHandler: (LongPressCallbacks component) {
      final record = TaggedComponent(event.pointerId, component);
      if (_records.contains(record)) {
        component.onLongPressMoveUpdate(event);
        delivered.add(record);
      }
    },
  );
  for (final record in _records) {
    if (record.pointerId == event.pointerId && !delivered.contains(record)) {
      record.component.onLongPressMoveUpdate(event);
    }
  }
}