WidgetEventController constructor

WidgetEventController([
  1. Set<WidgetEvent>? events,
  2. ValueSetter<Set<WidgetEvent>>? onChanged
])

Creates a new instance of WidgetEventController.

Optionally allows setting the initial state of the events.

  • value: The initial set of active WidgetEvents. Defaults to an empty set.
  • onChanged: A callback that will be invoked whenever the set of active events changes.

Implementation

WidgetEventController([
  Set<WidgetEvent>? events,
  this.onChanged,
]) : value = events ?? {};