WidgetEventController.reg constructor
WidgetEventController.reg(
- Map<
WidgetEvent, bool> registry, { - ValueSetter<
Set< ? onChanged,WidgetEvent> >
Creates a new instance of WidgetEventController based on a map of events.
The map keys represent the WidgetEvents and the map values represent
the desired active state for each event (true for active, false for inactive).
Events with a value of false
in the map will be removed from the set.
Implementation
WidgetEventController.reg(
Map<WidgetEvent, bool> registry, {
this.onChanged,
}) : value = (registry..removeWhere((key, value) => !value)).keys.toSet();