register method Null safety

void register(
  1. PointerSignalEvent event,
  2. PointerSignalResolvedCallback callback
)

Registers interest in handling event.

See the documentation for the PointerSignalResolver class on when and how this method should be used.

Implementation

void register(PointerSignalEvent event, PointerSignalResolvedCallback callback) {
  assert(event != null);
  assert(callback != null);
  assert(_currentEvent == null || _isSameEvent(_currentEvent!, event));
  if (_firstRegisteredCallback != null) {
    return;
  }
  _currentEvent = event;
  _firstRegisteredCallback = callback;
}