Controls class

Routes events emitted by control devices to the handlers bound to them.

One call binds the lot: the events that reach a handler, the handler, and any groups that switch it on and off.

TODO: Document further.

Constructors

Controls()

Properties

devices → List<ControlDevice>
The devices feeding events in.
no setter
hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

bind(ControlHandler handler, {required Set<ControlEvent> matchers, Set<String> groups = const {}}) → Cleanup
Answers any of matchers with handler, until the returned Cleanup is called or the Node.build that bound it is gone.
disable(String group) → void
Stops the handlers in group answering, until enable.
dispatch(ControlEvent emitted) → bool
Runs the one handler that answers emitted, if any.
dispose() → void
Stops every device, and drops every control.
enable(String group) → void
Lets the handlers in group answer again.
install(ControlDevice device) → void
Starts device and feeds its events to dispatch, until uninstalled.
isEnabled(String group) → bool
Whether group is enabled, which it is until disable.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited
uninstall(ControlDevice device) → void
Stops device and drops it.

Operators

operator ==(Object other) → bool
The equality operator.
inherited