nativeClear method

  1. @override
void nativeClear()

Releases bridge/native-side resources tied to this listener — for example, an unregister call against a global service or a Dart-side event-handler detach.

Called by dispose before clearListeners so the event source is stopped before local references are severed: any straggler event that arrives in the window between the two calls still finds live callbacks and is delivered as it would have been, rather than silently no-oping against null fields mid-teardown.

Listeners with no native-side state may leave the body empty.

Implementation

@override
void nativeClear() {
  GemKitPlatform.instance.unregisterEventHandler(pointerId);
}