initWidgetEvents method
Init widget events with external events controller
@override void initState() { super.initState(); initWidgetEvents(widget.eventsController); }
Implementation
@protected
void initWidgetEvents(WidgetEventController? controller) {
if (controller != null) {
_externalController = controller;
_internalController?.dispose();
_internalController = null;
} else {
_internalController = WidgetEventController();
}
widgetEvents.addListener(didChangeWidgetEvents);
}