updateWidgetEvents method
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);
}
}