updateWidgetEvents method

  1. @protected
void updateWidgetEvents(
  1. WidgetEventController? newController
)

Update widget events with external events controller

@override void didUpdateWidget(covariant MyWidget oldWidget) { super.didUpdateWidget(oldWidget); updateWidgetEvents( oldWidget.eventController, widget.eventController, ); }

Implementation

@protected
void updateWidgetEvents(WidgetEventController? newController) {
  if (newController != _externalController) {
    _externalController?.removeListener(didChangeWidgetEvents);
    initWidgetEvents(newController);
  }
}