initWidgetEvents method

  1. @protected
void initWidgetEvents(
  1. WidgetEventController? controller
)

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