initializeElement method

  1. @override
void initializeElement()
override

Called when this Node is added to the tree or after the widget is updated.

Implementation

@override
void initializeElement() {
  super.initializeElement();

  addEventSubscription(
    type: 'scroll',
    callback: widget.onScroll,
    eventTransformer: (final html.Event event) =>
        EventDetails(event, targetNode: this),
  );
}